largefiles: backout f72d73937853 - linear updates handle m -> a differently
f72d73937853 introduced a significant performance regression: All largefiles
were marked 'normallookup' by linear (or noop) updates and had to be rehashed
by the next command.
The previous change introduced a different solution to the problem f72d73937853
solved and we can thus back it out again.
--- a/hgext/largefiles/lfcommands.py Wed Dec 31 14:46:02 2014 +0100
+++ b/hgext/largefiles/lfcommands.py Wed Dec 31 14:46:03 2014 +0100
@@ -513,19 +513,6 @@
lfutil.synclfdirstate(repo, lfdirstate, lfile, normallookup)
- if filelist is not None:
- # If "local largefile" is chosen at file merging, it is
- # not listed in "filelist" (= dirstate syncing is
- # omitted), because the standin file is not changed before and
- # after merging.
- # But the status of such files may have to be changed by
- # merging. For example, locally modified ("M") largefile
- # has to become re-added("A"), if it is "normal" file in
- # the target revision of linear-merging.
- for lfile in lfdirstate:
- if lfile not in filelist:
- lfutil.synclfdirstate(repo, lfdirstate, lfile, True)
-
lfdirstate.write()
if printmessage and lfiles:
ui.status(_('%d largefiles updated, %d removed\n') % (updated,
--- a/tests/test-largefiles-update.t Wed Dec 31 14:46:02 2014 +0100
+++ b/tests/test-largefiles-update.t Wed Dec 31 14:46:03 2014 +0100
@@ -36,9 +36,8 @@
$ hg up
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg debugdirstate --large --nodate
- n 0 -1 large1
- n 0 -1 large2
-BAD: ^^
+ n 644 7 large1
+ n 644 13 large2
Test that "hg merge" updates largefiles from "other" correctly