Warn when parents != tip?

Matt Mackall mpm at selenic.com
Wed Apr 14 11:22:26 CDT 2010


On Wed, 2010-04-14 at 11:36 +0100, Keith Edmunds wrote:
> I've recently converted from svn to hg. Developing on two systems and
> pushing changes between them, I've been burnt a couple of times because I
> haven't done an 'hg up' after having received a push. I understand what it
> is going on, and why, but has anyone come up with a warning when working
> in a repository where the parents are not the tip? I'm imagining some
> clever bash prompt or similar.

Here's one idea to get you started:

[hooks]
pre-commit = hg summary | grep -qv "new branch head" && echo "uh-oh"

-- 
http://selenic.com : development and support for Mercurial and Linux




More information about the Mercurial mailing list