$ 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
Related email thread: http://markmail.org/message/ii65ruzgkkppguae
Other side effect detected this cycle: http://www.selenic.com/hg/rev/eb6867b98223
Fixed by http://selenic.com/repo/hg/rev/90f8b8dd0326 Matt Mackall <mpm@selenic.com> push: return 1 if no changes found (issue3228) (please test the fix)
--- Bug imported by bugzilla@serpentine.com 2012-05-12 09:27 EDT --- This bug was previously known as _bug_ 3228 at http://mercurial.selenic.com/bts/issue3228