1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-12-26 18:06:13 +01:00

osc submitreq create DESTPRJ [DESTPKG]

This commit is contained in:
Michal Vyskocil 2009-05-04 12:53:03 +00:00
parent 92bbac0afd
commit ad88054cf8
2 changed files with 12 additions and 3 deletions

1
NEWS
View File

@ -3,6 +3,7 @@
- make submit request listing fast by server side filtering
- allow pulling of conflicting changes via "osc repairlink"
- bugfix: templates in edit commit message causes an empty commit logs
- osc sr create consumes DESTPRJ [DESTPKG] arguments only
0.117:
- support checkout of single package via "osc co PACKAGE" when local dir is project

View File

@ -498,6 +498,7 @@ class Osc(cmdln.Cmdln):
usage:
osc submitreq create [-m TEXT]
osc submitreq create [-m TEXT] DESTPRJ [DESTPKG]
osc submitreq create [-m TEXT] SOURCEPRJ SOURCEPKG DESTPRJ [DESTPKG]
osc submitreq list [PRJ [PKG]]
osc submitreq log ID
@ -534,18 +535,25 @@ class Osc(cmdln.Cmdln):
# collect specific arguments
if cmd == 'create':
if len(args) == 0:
if len(args) <= 2:
# try using the working copy at hand
p = findpacs(os.curdir)[0]
src_project = p.prjname
src_package = p.name
if p.islink():
if len(args) == 0 and p.islink():
dst_project = p.linkinfo.project
dst_package = p.linkinfo.package
apiurl = p.apiurl
elif len(args) > 0:
dst_project = args[0]
if len(args) == 2:
dst_package = args[1]
else:
dst_package = src_package
else:
sys.exit('Package \'%s\' is not a source link, so I cannot guess the submit target.\n'
'Please provide it the target via commandline arguments.' % p.name)
modified = [i for i in p.filenamelist if p.status(i) != ' ' and p.status(i) != '?']
if len(modified) > 0:
print 'Your working copy has local modifications.'