mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-12 08:56:13 +01:00
- fixed misleading note (#644550 ("osc don't branch particular project"))
This commit is contained in:
parent
55f580f988
commit
09cee2a9f0
@ -2419,11 +2419,16 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
print >>sys.stderr, 'Using existing branch project: %s' % targetprj
|
print >>sys.stderr, 'Using existing branch project: %s' % targetprj
|
||||||
|
|
||||||
devloc = None
|
devloc = None
|
||||||
if not exists and (srcprj is not None and srcprj != args[0] or \
|
if not exists and (srcprj != args[0] or srcpkg != args[1]):
|
||||||
srcprj is None and targetprj != expected):
|
try:
|
||||||
devloc = srcprj or targetprj
|
root = ET.fromstring(''.join(show_attribute_meta(apiurl, args[0], None, None,
|
||||||
if not srcprj and 'branches:' in targetprj:
|
conf.config['maintained_update_project_attribute'], False, False)))
|
||||||
devloc = targetprj.split('branches:')[1]
|
# this might raise an AttributeError
|
||||||
|
uproject = root.find('attribute').find('value').text
|
||||||
|
print '\nNote: The branch has been created from the configured update project: %s' \
|
||||||
|
% uproject
|
||||||
|
except (AttributeError, urllib2.HTTPError), e:
|
||||||
|
devloc = srcprj
|
||||||
print '\nNote: The branch has been created of a different project,\n' \
|
print '\nNote: The branch has been created of a different project,\n' \
|
||||||
' %s,\n' \
|
' %s,\n' \
|
||||||
' which is the primary location of where development for\n' \
|
' which is the primary location of where development for\n' \
|
||||||
@ -2447,7 +2452,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
% (apiopt, targetprj, package)
|
% (apiopt, targetprj, package)
|
||||||
print_request_list(apiurl, args[0], args[1])
|
print_request_list(apiurl, args[0], args[1])
|
||||||
if devloc:
|
if devloc:
|
||||||
print_request_list(apiurl, devloc, args[1])
|
print_request_list(apiurl, devloc, srcpkg)
|
||||||
|
|
||||||
|
|
||||||
def do_undelete(self, subcmd, opts, *args):
|
def do_undelete(self, subcmd, opts, *args):
|
||||||
|
11
osc/core.py
11
osc/core.py
@ -4332,12 +4332,13 @@ def branch_pkg(apiurl, src_project, src_package, nodevelproject=False, rev=None,
|
|||||||
except urllib2.HTTPError, e:
|
except urllib2.HTTPError, e:
|
||||||
if not return_existing:
|
if not return_existing:
|
||||||
raise
|
raise
|
||||||
msg = ''.join(e.readlines())
|
root = ET.fromstring(e.read())
|
||||||
msg = msg.split('<summary>')[1]
|
summary = root.find('summary')
|
||||||
msg = msg.split('</summary>')[0]
|
if summary is None:
|
||||||
m = re.match(r"branch target package already exists: (\S+)/(\S+)", msg)
|
raise oscerr.APIError('unexpected response:\n%s' % ET.tostring(root))
|
||||||
|
m = re.match(r"branch target package already exists: (\S+)/(\S+)", summary.text)
|
||||||
if not m:
|
if not m:
|
||||||
e.msg += '\n' + msg
|
e.msg += '\n' + summary.text
|
||||||
raise
|
raise
|
||||||
return (True, m.group(1), m.group(2), None, None)
|
return (True, m.group(1), m.group(2), None, None)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user