pushing only one head

Bill Barry after.fallout at gmail.com
Thu Apr 8 11:18:13 CDT 2010


venizio krups wrote:
> yes. one can also bookmark the public head 'say @publichead' and then
> it's just a matter of hg push -r @publichead which can be then aliased
> to something informative like pushpublic. if you get used to hg
> pushpublic, you'll think twice when you have to do a bare hg push.
> reduces the chances for user error.


+1

[alias]
pp = push -r @publichead


 >hg pp
...

makes lives easier. Use something shorter than push to make it even 
harder to screw up.


 From a different angle it wouldn't be very difficult to write a simple 
extension that wraps the push command and aborts if -r is not specified.


More information about the Mercurial mailing list