preoutgoing (or other) hook to verify destination push URL
Peter Toft
pto at linuxbog.dk
Thu Feb 16 09:34:21 UTC 2012
On Wed, 15 Feb 2012 17:02:30 -0600, Matt Mackall wrote:
> On Wed,
2012-02-15 at 16:55 -0500, Stephen Morton wrote:
>> I'm implementing
Mercurial in a corporate environment and would like to create a hook
that gives users a warning if they are about to push to a location that
is not the official central repository. They won't be blocked, they'll
just get prompted for confirmation. (e.g. In case they're accidentally
pushing to the other local repo that they cloned from. "I swear, I did
push my changes.") But I've found through experimentation that in Hg
2.02 the preoutgoing hook does not have an "url" parameter.
http://www.selenic.com/mercurial/hgrc.5.html#hooks [1] does not mention
an url parameter
http://hgbook.red-bean.com/read/handling-repository-events-with-hooks.html#sec:hook:preoutgoingsays
[2] that there is an url parameter. 1) Which is correct? (And if it's
red-bean, is this therefore a bug in 2.02?)
> The book has always been
wrong on this point. But perhaps this is a feature we should
add.
"like"
Links:
------
[1]
http://www.selenic.com/mercurial/hgrc.5.html#hooks
[2]
http://hgbook.red-bean.com/read/handling-repository-events-with-hooks.html#sec:hook:preoutgoingsays
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20120216/e1a925bc/attachment-0002.html>
More information about the Mercurial
mailing list