Escaping characters for hg update?
Matt Mackall
mpm at selenic.com
Mon Nov 19 20:02:30 UTC 2012
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!)
I can't reproduce even this much on Linux or on Windows. Which is good,
because this is supposed to work:
- Mercurial first tries to parse things as a simple revision
- if that fails, it attempts to parse it as a revset
Code for that is here:
http://www.selenic.com/hg/file/fd903f89e42b/mercurial/scmutil.py#l613
This logic is required for backwards compatibility with weird pre-revset
branchnames.
> hg branch "a,a"
> hg up "a,a"
> hg: parse error: can't use a list in this context
Works for me.
> 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"
> abort: unknown revision 'a'!
Works for me (this name is no longer accepted for new branches by 2.4,
but I have something like 60 versions installed).
All of the above cases ARE VALID and WORK. Further, branches with spaces
are tested in the test suite and have been regularly tested by the
buildbot for quite some time. So something is wrong here on the original
poster's install/config.
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial
mailing list