Skip to content
Snippets Groups Projects
Commit b885f28f authored by Matt Mackall's avatar Matt Mackall
Browse files

fetch: fix and document exit codes (issue2356)

parent e23895ae
No related branches found
No related tags found
No related merge requests found
......@@ -29,6 +29,8 @@
order, use --switch-parent.
See :hg:`help dates` for a list of formats valid for -d/--date.
Returns 0 on success.
'''
date = opts.get('date')
......@@ -86,7 +88,7 @@
if newchildren[0] != parent:
return hg.clean(repo, newchildren[0])
else:
return
return 0
# Are there more than one additional branch heads?
newchildren = [n for n in newchildren if n != parent]
......@@ -99,7 +101,7 @@
ui.status(_('not merging with %d other new branch heads '
'(use "hg heads ." and "hg merge" to merge them)\n') %
(len(newheads) - 1))
return
return 1
# Otherwise, let's merge.
err = False
......@@ -132,6 +134,8 @@
'with local\n') % (repo.changelog.rev(n),
short(n)))
return err
finally:
release(lock, wlock)
......
......@@ -305,6 +305,7 @@
adding file changes
added 3 changesets with 2 changes to 1 files (+2 heads)
not merging with 1 other new branch heads (use "hg heads ." and "hg merge" to merge them)
[1]
parent should be 3 (fetch did not merge anything)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment