Reporting "nearly-exact" adds

Martin Geisler mg at daimi.au.dk
Fri Jun 6 02:33:35 CDT 2008


Adrian Buehlmann <adrian at cadifra.com> writes:

> On 06.06.2008 00:54, Paul Moore wrote:
>> Not that simply. Consider hg add a*. This has to report what matched
>> the wildcards.
>
> I think you are wrong (checked on FreeBSD):
>
> %hg sta
> ? b.txt
> ? x/a.txt
> %hg add *txt
> %hg sta
> A b.txt
> ? x/a.txt
> %hg version
> Mercurial Distributed SCM (version bae2e9c838e9)
>
> hg add returned *no* output, despite b.txt having matched

I think that is the expected behavior: the *shell* expands the *txt
part of the command line, and so hg is invoked as 'hg add b.txt'.

So from the point of view of hg, you explicitly told it what files you
wanted added, and it wont bother repeating those file names.


As far as I know, the Windows shell wont expand filenames before
invoking programs, so I guess hg does the expansion there.

-- 
Martin Geisler

VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multi-Party Computation) to Python. See: http://viff.dk/.



More information about the Mercurial-devel mailing list