Using '..' to refer to parent revision

Adrian Buehlmann adrian at cadifra.com
Tue May 13 07:58:46 UTC 2008


On 13.05.2008 00:53, Julian Cowley wrote:
> On Mon, 12 May 2008, Adrian Buehlmann wrote:
>> On 12.05.2008 00:00, Julian Cowley wrote:
>>> I was just thinking that having a '..' would be really useful (assuming
>>> there's only one parent).  Then one could do something like:
>>>
>>> hg diff -r ..
>>> hg up ..
>>>
>>> Perhaps there is another way to do this?
>> http://www.selenic.com/mercurial/wiki/index.cgi/ParentrevspecExtension
> 
> Excellent, that's what I was looking for.  The syntax is a little odd in 
> my opinion, but it does work.  The examples above become:
> 
> hg diff -r .^
> hg up .^
> 

For Windows users using cmd.exe:

Character ^ is interpreted as an escape character by cmd.exe. So, if you want
to get ^ through to hg you have to use something like

> hg log -r.^^

which counts as a single ^ or

> hg log -r."^"

If you ignore that, you will get a funny "More?":

> hg log -r.^
More?

I will add a note about that to the ParentrevspecExtension wiki page.



More information about the Mercurial mailing list