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

FUJIWARA Katsunori foozy at lares.dti.ne.jp
Fri Feb 17 16:07:34 UTC 2012


# HG changeset patch
# User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
# Date 1329494573 -32400
# Branch stable
# Node ID cfd96890bca019419355b3968899df9b3ae73148
# Parent  f02f94342c38f4e26cf707f98e6a04e58fa52fd3
largefiles: show status for files added on another branch correctly

!!!! THIS PATCH IS JUST FOR RFC !!!!

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.

But there is performance problem:

    - if 'changectx.dirs' is built at manifest build time of it, cost
      of building it up is requested to all 'changectx.manifest' users.
      but scan of manifest is only once.

    - if 'changectx.dirs' is built at required time of it, cost of
      building it up is requested only to 'changectx.dirs' users.  but
      scan of manifest is twice ("manifest reading in", and "build
      dirs up")

to limit performance impact scope, the later seems to be better, does
not ?

or any other good solutions ?

BTW, why is 'ctx[file]' in 'inctx()' not 'file in ctx.manifest()' ?
for removed files ?

even if so, removed file seems to be detected by comparison between
manifest of contexts in 'localrepository.status()' (when this patch
series is applied).

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



More information about the Mercurial-devel mailing list