[Bug 4833] New: Impossible to list all commits being pushed / sent out in an outgoing or preoutgoing hook
mercurial-bugs at selenic.com
mercurial-bugs at selenic.com
Fri Sep 18 15:03:31 UTC 2015
http://bz.selenic.com/show_bug.cgi?id=4833
Bug ID: 4833
Summary: Impossible to list all commits being pushed / sent out
in an outgoing or preoutgoing hook
Product: Mercurial
Version: 3.5
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: bug
Priority: normal
Component: Mercurial
Assignee: bugzilla at selenic.com
Reporter: gabor.stefanik at nng.com
CC: mercurial-devel at selenic.com
The outgoing hook receives only a single changeset ID (hash) as a clue about
what is being sent out, which is not enough to identify all commits being sent
(because a bundle may have multiple roots, and its heads may not always be
heads in the repository where it was generated, especially with "push -r REV"
commands). The current information is sufficient only if we are pushing
everything in a repo (not just some specified revisions), and the push bundle
has only one root.
The preoutgoing hook doesn't receive even that limited information.
To really know what's being bundled, a list of all roots and all heads of the
bundle need to be passed to the hook. IMO the best way to do this is to pass a
revset string like this:
(3+5)::(18) where 3 and 5 are the roots of the bundle and 18 is the only head
(which may or may not be a head in the repository itself - what matters is that
it is a head within the bundle).
I suggest keeping the node / $HG_NODE parameter unchanged for backwards
compatibility (in case of the outgoing hook), and adding a "revs" / $HG_REVS
parameter to both the outgoing and preoutgoing hooks, containing a revset as
above.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Mercurial-devel
mailing list