[PATCH] add: do not retrieve directories/missing files from dirstate.walk

Nicolas Dumazet nicdumz at gmail.com
Thu Dec 10 20:38:38 CST 2009


2009/12/11 Matt Mackall <mpm at selenic.com>:
> On Thu, 2009-12-10 at 20:01 +0900, Nicolas Dumazet wrote:
>> # HG changeset patch
>> # User Nicolas Dumazet <nicdumz.commits at gmail.com>
>> # Date 1260437938 -32400
>> # Node ID 73ff53b16c9e18e15af43d0131629e005570e7ad
>> # Parent  2b630e4c8f2f626f1e5d0f88646463968860f8ac
>> add: do not retrieve directories/missing files from dirstate.walk
>>
>> It should suppress a bogus hg add warning when adding a directory over
>> a previously committed file.
>
> What was the bogus warning you got? With the following script, I get:
>
> rm -rf a
> hg init a
> cd a
>
> touch a
> hg ci -qAm0
>
> hg mv a b
> mkdir a
> hg add a
>
>
> a not added: only files and symlinks supported currently
>
> And that message is correct and unrelated to the rename?

I was missing a step in my test. resending.

>
> I'm also not sure how missing files come into it, as there should be
> none in this case. 'a' is removed.

keyword "existing_only" should be more appropriate?
In clear, we only need files that are present on the filesystem when
doing the add
We don't care about the other ones.

-- 
Nicolas Dumazet — NicDumZ


More information about the Mercurial-devel mailing list