Mercurial > public > mercurial-scm > hg
diff mercurial/manifest.py @ 42376:89c0c8edc9d4 stable
tests: demonstrate broken manifest generation with the pure module
This will be fixed next. But I don't fully understand how 'b.txt' is actually
removed properly in the second test, given what's broken. Also, I'm not sure
why 'bb.txt' is flagged as not being in the manifest, when it clearly appears
to be.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Thu, 23 May 2019 21:39:19 -0400 |
parents | e4ac7e63c213 |
children | 0546ead39a7e |
line wrap: on
line diff
--- a/mercurial/manifest.py Mon May 20 10:08:28 2019 +0200 +++ b/mercurial/manifest.py Thu May 23 21:39:19 2019 -0400 @@ -35,6 +35,9 @@ parsers = policy.importmod(r'parsers') propertycache = util.propertycache +# Allow tests to more easily test the alternate path in manifestdict.fastdelta() +FASTDELTA_TEXTDIFF_THRESHOLD = 1000 + def _parse(data): # This method does a little bit of excessive-looking # precondition checking. This is so that the behavior of this @@ -558,7 +561,7 @@ addbuf = util.buffer(base) changes = list(changes) - if len(changes) < 1000: + if len(changes) < FASTDELTA_TEXTDIFF_THRESHOLD: # start with a readonly loop that finds the offset of # each line and creates the deltas for f, todelete in changes: