unclear documentation of the outgoing hook

Daniel.Lauber at lantiq.com Daniel.Lauber at lantiq.com
Fri Feb 11 11:49:55 CST 2011


During an aborted push the outgoing hook is executed. The reason for the abort can be for example "authorization failed" or "ssl required". See the debug-log of the push below.

In the documentation of the hgrc file (hgrc.5.txt), there is the following description of the outgoing hook:
Run after sending changes from local repository to another. ID of first changeset sent is in $HG_NODE. Source of operation is in $HG_SOURCE; see "preoutgoing" hook for description.

What I see is that the outgoing hook is executed before sending data to the remote repository. Is this the expected behavior?

Thanks,
Daniel

Push debug log:
===============
  $ hg -v --debug --cwd ../test2 push http://localhost:$HGPORT/

  using http://localhost:$HGPORT/
  sending between command
  pushing to http://localhost:$HGPORT/
  sending capabilities command
  capabilities: changegroupsubset stream lookup pushkey unbundle=HG10GZ,HG10BZ,HG10UN branchmap
  sending heads command
  searching for changes
  common changesets up to cb9a9f314b8b
  sending branchmap command
  running hook preoutgoing: python ../printenv.py preoutgoing 0
  1 changesets found
  list of changesets:
  ba677d0156c1196c1a699fa53f390dcfc3ce3872
  bundling changes: 0 chunks
  bundling changes: 1 chunks
  bundling changes: 2 chunks
  bundling changes: 3 chunks
  bundling manifests: 0 chunks
  bundling manifests: 1 chunks
  bundling manifests: 2 chunks
  bundling manifests: 3 chunks
  bundling files: a 0 chunks
  bundling files: a 1 chunks
  bundling files: a 2 chunks
  bundling files: a 3 chunks
>>running hook outgoing: python ../printenv.py outgoing 0
  sending unbundle command
  sending 271 bytes
  abort: authorization failed


More information about the Mercurial-devel mailing list