1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-10 06:46:15 +01:00

- backward compatibility fix (only a recent api/backend supports the missingok parameter)

This commit is contained in:
Marcus Huewe 2010-04-21 15:18:20 +02:00
parent d3a01a72c0
commit ba7993ffb0

View File

@ -1243,8 +1243,17 @@ Please submit there instead, or use --nodevelproject to force direct submission.
r.actions[0].dst_project, r.actions[0].dst_package, None,
r.actions[0].src_project, r.actions[0].src_package, r.actions[0].src_rev, opts.unified, True)
except urllib2.HTTPError, e:
e.osc_msg = 'Diff not possible'
raise
if e.code != 400:
e.osc_msg = 'Diff not possible'
raise
# backward compatiblity: only a recent api/backend supports the missingok parameter
try:
print server_diff(conf.config['apiurl'],
r.actions[0].dst_project, r.actions[0].dst_package, None,
r.actions[0].src_project, r.actions[0].src_package, r.actions[0].src_rev, opts.unified, False)
except urllib2.HTTPError, e:
e.osc_msg = 'Diff not possible'
raise
# checkout
elif cmd == 'checkout' or cmd == 'co':