[PATCH 8 of 8 STABLE RFC] largefiles: show status for files added on another branch correctly

FUJIWARA Katsunori foozy at lares.dti.ne.jp
Sat Feb 18 09:41:20 UTC 2012


At Sat, 18 Feb 2012 01:07:34 +0900,
FUJIWARA Katsunori wrote:

> current implementation fails with tests added by this patch.
> 
> 'inctx()' defined in 'lfiles_repo.status()' can't examines whether
> specified directory is related to the context or not.
> 
> I think that introducing 'dirs()' like as one of 'dirstate' to
> 'changectx' can resolve this problem.

> diff -r f02f94342c38 -r cfd96890bca0 tests/test-largefiles.t
> --- a/tests/test-largefiles.t	Sat Feb 18 01:02:53 2012 +0900
> +++ b/tests/test-largefiles.t	Sat Feb 18 01:02:53 2012 +0900
> @@ -1079,11 +1079,16 @@
>    $ hg status -A --rev . --rev 4 another/e.txt
>    A another/e.txt
>  
> +  $ hg status -A --rev 4 another
> +  R another/e.txt
>    $ hg status -A --rev 4 --rev . another
>    R another/e.txt
>    $ hg status -A --rev . --rev 4 another
>    A another/e.txt
>  
> +  $ hg status -A --rev 4 sub/a.txt another
> +  R another/e.txt
> +  C sub/a.txt
>    $ hg status -A --rev 4 --rev . sub/a.txt another
>    R another/e.txt
>    C sub/a.txt

Sorry, my confirmation was not enough.

I regognize that above added test fails, because "hg status" shows "No
such file or directory" message for specified "directory pattern".

But this also occures on normal files without largefiles extensions.

Current 'localrepository.status()' shows this message when specified
patterns are not in source (revision '4' in ths case) context.

        if not parentworking:
            def bad(f, msg):
                if f not in ctx1:
                    self.ui.warn('%s: %s\n' % (self.dirstate.pathto(f), msg))
            match.bad = bad

For normal files, examination of '(f not in ctx1) and (f not in
ctx1.dirs())' instead of 'f not in ctx1' in above code seems to
resolve this problem.

In addition to it, 'inctx()' defined in 'lfiles_repo.status()' should
examine 'f in ctx.dirs()' for largefiles.

----------------------------------------------------------------------
[FUJIWARA Katsunori]                             foozy at lares.dti.ne.jp



More information about the Mercurial-devel mailing list