[issue1565] "hg fetch" should call changegroup hook after merge

Ted Pavlic mercurial-bugs at selenic.com
Thu Mar 19 07:31:39 CDT 2009


New submission from Ted Pavlic <ted at tedpavlic.com>:

At the moment, "hg fetch" issues the "changegroup" hook after its internal "hg
pull". Tooks like pull-diffstat:

http://www.selenic.com/mercurial/wiki/index.cgi/DiffstatOfPulledChanges

will then show a diffstat *before* any merges occur. Such diffstats are not
useful; they are confusing, misleading, and a waste of time on slow systems.
However, there's presently no clean way to call an HG_NODE-type hook *after* a
fetch, and existing solutions still may not disable the changegroup hook that
occurs after the pull within the fetch.

One existing solution is to create "pre-" and "post-" hooks for push, pull,
unbundle, and fetch where the "pre-" hook sets the equivalent of HG_NODE and the
"post-" hook does what the changegroup hook is supposed to do. However, there
are certainly some "changegroup" hooks that are desirable to run before the merge.

There needs to be a clean way of extending the changegroup hook functionality to
fetch for things like diffstat while leaving the existing functionality for
other hooks that really must be run after a pull.

----------
messages: 8858
nosy: TedPavlic
priority: wish
status: unread
title: "hg fetch" should call changegroup hook after merge
topic: merge, push, update

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



More information about the Mercurial-devel mailing list