[PATCH 3 of 3 stable] largefiles: backout f72d73937853 - linear updates handle m -> a differently
Mads Kiilerich
mads at kiilerich.com
Wed Dec 31 08:06:00 CST 2014
# HG changeset patch
# User Mads Kiilerich <madski at unity3d.com>
# Date 1420033563 -3600
# Wed Dec 31 14:46:03 2014 +0100
# Branch stable
# Node ID 1265a3a71d75396f5d4cf6935ae7d9ba5407a547
# Parent 997a96cf63443db2f8d4682d25d367e9344b2cdb
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.
diff --git a/hgext/largefiles/lfcommands.py b/hgext/largefiles/lfcommands.py
--- a/hgext/largefiles/lfcommands.py
+++ b/hgext/largefiles/lfcommands.py
@@ -513,19 +513,6 @@ def updatelfiles(ui, repo, filelist=None
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,
diff --git a/tests/test-largefiles-update.t b/tests/test-largefiles-update.t
--- a/tests/test-largefiles-update.t
+++ b/tests/test-largefiles-update.t
@@ -36,9 +36,8 @@ prevents unnecessary hashing of content
$ 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
More information about the Mercurial-devel
mailing list