Escaping characters for hg update?
Matt Mackall
mpm at selenic.com
Tue Nov 20 05:45:32 UTC 2012
On Mon, 2012-11-19 at 23:14 -0600, Kevin Bullock wrote:
> On 19 Nov 2012, at 2:02 PM, Matt Mackall wrote:
>
> > On Sun, 2012-11-18 at 10:41 -0800, v wrote:
> > > hg 2.3.1 on Windows 7 x64
> > >
> > > I just tried again with all extensions disabled, and get this:
> > >
> > > hg init foo
> > > cd foo
> > >
> > > hg branch "a a"
> > > marked working directory as branch a a
> > > (branches are permanent and global, did you want a bookmark?)
> > >
> > > hg up "a a"
> > > hg: parse error at 2: invalid token
> >
> > (I see our newest two crew members got this wrong!)
> >
>
>
> Duly noted. I didn't actually try to repro; will do so next time.
Wasn't meant as a chastisement. The fact that we support the weird
fallback behavior is not documented, so this has every appearance of
being the right behavior with the workaround you guys provided rather
than a very bizarre bug on v's machine.
The double quoting thing absolutely is needed to use such a name in a
revset, of course:
hg update -r '"a a"^'
Most notably, it applies to names with dashes:
hg update -r 'p1("2.4-rc")'
Otherwise, it gets interpreted as "2.4 and not rc". But a bare name
should always work:
hg update 2.4-rc
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial
mailing list