shooting in the foot with caret ^ on windows
Simon King
simon at simonking.org.uk
Mon Jul 21 09:25:17 UTC 2014
On Mon, Jul 21, 2014 at 3:53 AM, anatoly techtonik <techtonik at gmail.com> wrote:
> On Mon, Jul 21, 2014 at 2:10 AM, Matt Mackall <mpm at selenic.com> wrote:
>> On Sun, 2014-07-20 at 13:53 +0300, anatoly techtonik wrote:
>>> C:\discovery>hg log -r tip^ --style compact
>>> 108 6dab298d9851 2014-05-16 21:40 +0300 techtonik
>>> graphics/pysdl2/demofire.py: 1.5 - Fire Plane (not optimized)
>> ...
>>> It would be nice to mention this on
>>> http://www.selenic.com/hg/help/revsets and link to
>>> cross-platform alternative.
>>
>> Docs: sure, send a patch.
>
> Is there online editor somewhere?
>
>> As for a shell-safe alternative, the following symbols aren't suitable:
>>
>> `~!@#$%&*()_-+=\|:;'"<>,./?
>>
>> ..because they're either used by a common shell and/or revsets already.
>> As that's every single other symbol on a US keyboard, I'm going to have
>> to deny your request.
>
> Isn't something like parents(tip)[3] is an safe alternative to tip^3 ?
(aside: tip^3 doesn't make sense - a changeset can have at most 2 parents)
I'm not sure I understand what you mean by safe. That wouldn't work in bash:
$: hg log -r parents(tip)
-bash: syntax error near unexpected token `('
It's also much longer to type than just putting quotes around the caret version:
hg log -r "tip^2"
Simon
More information about the Mercurial
mailing list