mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-13 06:00:37 +01:00
- do_detachbranch: added --message option; added some more error handling
This commit is contained in:
parent
b318ec1698
commit
fa5e07f792
@ -2083,6 +2083,8 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
pac.update(rev=pac.latest_rev())
|
pac.update(rev=pac.latest_rev())
|
||||||
|
|
||||||
|
|
||||||
|
@cmdln.option('-m', '--message', metavar='TEXT',
|
||||||
|
help='specify message TEXT')
|
||||||
def do_detachbranch(self, subcmd, opts, *args):
|
def do_detachbranch(self, subcmd, opts, *args):
|
||||||
"""${cmd_name}: replace a link with its expanded sources
|
"""${cmd_name}: replace a link with its expanded sources
|
||||||
|
|
||||||
@ -2107,14 +2109,17 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
raise oscerr.WrongArgs('Too few arguments (required none or two)')
|
raise oscerr.WrongArgs('Too few arguments (required none or two)')
|
||||||
|
|
||||||
try:
|
try:
|
||||||
copy_pac(apiurl, project, package, apiurl, project, package, expand=True)
|
copy_pac(apiurl, project, package, apiurl, project, package, expand=True, comment=opts.message)
|
||||||
except urllib2.HTTPError, e:
|
except urllib2.HTTPError, e:
|
||||||
root = ET.fromstring(show_files_meta(apiurl, project, package, 'latest', expand=False))
|
root = ET.fromstring(show_files_meta(apiurl, project, package, 'latest', expand=False))
|
||||||
li = Linkinfo()
|
li = Linkinfo()
|
||||||
li.read(root.find('linkinfo'))
|
li.read(root.find('linkinfo'))
|
||||||
if li.islink() and li.haserror():
|
if li.islink() and li.haserror():
|
||||||
raise oscerr.LinkExpandError(project, package, li.error)
|
raise oscerr.LinkExpandError(project, package, li.error)
|
||||||
raise e
|
elif not li.islink():
|
||||||
|
print >>sys.stderr, 'package \'%s/%s\' is no link' % (project, package)
|
||||||
|
else:
|
||||||
|
raise e
|
||||||
|
|
||||||
|
|
||||||
@cmdln.option('-C', '--cicount', choices=['add', 'copy', 'local'],
|
@cmdln.option('-C', '--cicount', choices=['add', 'copy', 'local'],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user