[issue3228] Push doesn't return documented exit code.

David Sedlock bugs at mercurial.selenic.com
Mon Jan 30 04:22:55 CST 2012


New submission from David Sedlock <David.Sedlock at lantiq.com>:

$ hg help push
...
  Returns 0 if push was successful, 1 if nothing to push.
  
$ hg init team
$ hg clone team clone
updating to branch default
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cd clone
$ hg push; echo $?
pushing to C:\tmp\push_return_code\team
no changes found
0
$ touch file.txt; hg commit -A -m file
adding file.txt
$ hg push; echo $?
pushing to C:\tmp\push_return_code\team
searching for changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files
0

Compare outgoing, which behaves as documented:

$ hg help out
...
    Returns 0 if there are outgoing changes, 1 otherwise.

$ hg out; echo $?
comparing with C:\tmp\push_return_code\team
searching for changes
no changes found
1
$ echo line>>file.txt; hg commit -m file
$ hg out; echo $?
comparing with C:\tmp\push_return_code\team
searching for changes
changeset:   1:58c9c9504e2f
tag:         tip
summary:     file
0

----------
messages: 18769
nosy: sedlock
priority: bug
status: unread
title: Push doesn't return documented exit code.

____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue3228>
____________________________________________________


More information about the Mercurial-devel mailing list