push return code broken?

Markus Zapke-Gründemann markuszapke at gmx.net
Fri Jan 27 11:26:29 CST 2012


Hi,

could it be that the return code of push is always zero? I created the
following test where the last push operation fails because it returns zero. But
push docs say "Returns 0 if push was successful, 1 if nothing to push.".

  $ hg init r1
  $ echo c1 > r1/f1
  $ hg commit -R r1 -Am f1
  adding f1
  $ hg clone r1 r2
  updating to branch default
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
  $ cd r2
  $ echo c2 > f2
  $ hg commit -Am f2
  adding f2
  $ hg out --template "{desc}\n"
  comparing with $TESTTMP/r1
  searching for changes
  f2
  $ hg push
  pushing to $TESTTMP/r1
  searching for changes
  adding changesets
  adding manifests
  adding file changes
  added 1 changesets with 1 changes to 1 files
  $ hg out
  comparing with $TESTTMP/r1
  searching for changes
  no changes found
  [1]
  $ hg push
  pushing to $TESTTMP/r1
  searching for changes
  no changes found
  [1]


Regards

Markus


More information about the Mercurial-devel mailing list