mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-10 06:46:15 +01:00
fallback to unexpanded diff mode on "osc diff" on merge error. Same behaviour as rdiff is doing.
This commit is contained in:
parent
d11e9f8514
commit
8fed7847e4
1
NEWS
1
NEWS
@ -5,6 +5,7 @@
|
|||||||
- add "createrequest -a add_group" option to create a group request
|
- add "createrequest -a add_group" option to create a group request
|
||||||
- add "createrequest -a add_me" shortcut
|
- add "createrequest -a add_me" shortcut
|
||||||
- add "less" command, doing the same as "osc cat" but with pager
|
- add "less" command, doing the same as "osc cat" but with pager
|
||||||
|
- fallback to unexpanded diff mode on "osc diff" on merge error.
|
||||||
|
|
||||||
0.130
|
0.130
|
||||||
- new "revert" command to restore the original working copy file (without
|
- new "revert" command to restore the original working copy file (without
|
||||||
|
@ -2662,8 +2662,26 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
for i in pac.get_diff(rev1):
|
for i in pac.get_diff(rev1):
|
||||||
sys.stdout.write(''.join(i))
|
sys.stdout.write(''.join(i))
|
||||||
else:
|
else:
|
||||||
|
try:
|
||||||
diff += server_diff(pac.apiurl, pac.prjname, pac.name, rev1,
|
diff += server_diff(pac.apiurl, pac.prjname, pac.name, rev1,
|
||||||
pac.prjname, pac.name, rev2, not opts.plain, opts.missingok)
|
pac.prjname, pac.name, rev2, not opts.plain, opts.missingok)
|
||||||
|
except urllib2.HTTPError, e:
|
||||||
|
if not e.code in [ 400, 403, 404, 500 ]:
|
||||||
|
raise
|
||||||
|
|
||||||
|
msg = None
|
||||||
|
body = None
|
||||||
|
try:
|
||||||
|
body = e.read()
|
||||||
|
if not 'bad link' in body:
|
||||||
|
raise e
|
||||||
|
except:
|
||||||
|
raise e
|
||||||
|
|
||||||
|
diff = "## diff on expanded link not possible, showing unexpanded version\n"
|
||||||
|
diff += server_diff(pac.apiurl, pac.prjname, pac.name, rev1,
|
||||||
|
pac.prjname, pac.name, rev2, not opts.plain, opts.missingok,
|
||||||
|
expand=False)
|
||||||
run_pager(diff)
|
run_pager(diff)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user