update to nearest head

John Sparrow johnsparrowuk at hotmail.co.uk
Sun Apr 4 06:40:57 CDT 2010


Great, thanks. I'm on Windows so the nested command doesn't work (I guess that's a Linux scripting feature?). I bodged it like this:

 

hg heads -r . --template "@hg up {node}\r\n" > _updatetemp.cmd
call .\_updatetemp.cmd
del _updatetemp.cmd


Which seems to work great!


 
> Not an easy way, no. But the following command will show you heads
> descended from the current revision:
> 
> hg heads -r .
> 
> So you can do:
> 
> hg up `hg heads -r . --template "{node}\n"`
> 
> But if you have more than one such head, hg up will barf.
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial/attachments/20100404/e975aed9/attachment.htm>


More information about the Mercurial mailing list