Filename expansion (Re: hg add with special file names)

Jan Hudec bulb at ucw.cz
Fri Sep 23 07:48:48 CDT 2005


On Thu, Sep 22, 2005 at 14:57:27 -0700, Bryan O'Sullivan wrote:
> On Thu, 2005-09-22 at 23:27 +0200, Thibault North wrote:
> 
> > Trying to add some files, I got the following response. Seems to be a bug ?
> 
> No.  Remember that Mercurial treats names as patterns.  You've escaped
> the { and } characters from the shell, but not from Mercurial itself.
> To protect from both, you really want '\{foo\}' or, if you're feeling
> very masochistic, something like \\\{foo\\\}.

The default behaviour is broken on Unix and this is a proof. On Unix the
shell does the expansion, so programs don't have to. So programs don't
and mercurial's default behaviour should be consistent. Of course on
windows the glob: is a good default, as there the applications do
expansion themselves normally.

There is one more thing -- hg add should say something when passed a
file that does not exist (it should always say someting IMHO (without
some -q))

--
						 Jan 'Bulb' Hudec <bulb at ucw.cz>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://www.selenic.com/pipermail/mercurial/attachments/20050923/eb03b304/attachment.pgp


More information about the Mercurial mailing list