merge with stable
authorMatt Mackall <mpm@selenic.com>
Thu, 01 Jan 2015 16:47:14 -0600
changeset 23706 3314664606e6
parent 23705 28a302e9225d (current diff)
parent 23698 4308087f2fbd (diff)
child 23707 ae5447de4c11
merge with stable
hgext/largefiles/lfcommands.py
hgext/largefiles/overrides.py
tests/test-largefiles-update.t
--- a/.hgsigs	Wed Dec 24 03:26:48 2014 -0800
+++ b/.hgsigs	Thu Jan 01 16:47:14 2015 -0600
@@ -99,3 +99,4 @@
 643c58303fb0ec020907af28b9e486be299ba043 0 iQIVAwUAVGKawCBXgaxoKi1yAQL7zxAAjpXKNvzm/PKVlTfDjuVOYZ9H8w9QKUZ0vfrNJrN6Eo6hULIostbdRc25FcMWocegTqvKbz3IG+L2TKOIdZJS9M9QS4URybUd37URq4Jai8kMiJY31KixNNnjO2G1B39aIXUhY+EPx12aY31/OVy4laXIVtN6qpSncjo9baXSOMZmx6RyA1dbyfwXRjT/aODCGHZXgLJHS/kHlkCsThVlqYQ4rUCDkXIeMqIGF1CR0KjfmKpp1fS14OMgpLgdnt9+pnBZ+qcf1YdpOeQob1zwunjMYOyYC74FyOTdwaynU2iDsuBrmkE8kgEedIn7+WWe9fp/6TQJMVOeTQPZBNSRRSUYCw5Tg/0L/+jLtzjc2mY4444sDPbR7scrtU+/GtvlR5z0Y5pofwEdFME7PZNOp9a4kMiSa7ZERyGdN7U1pDu9JU6BZRz+nPzW217PVnTF7YFV/GGUzMTk9i7EZb5M4T9r9gfxFSMPeT5ct712CdBfyRlsSbSWk8XclTXwW385kLVYNDtOukWrvEiwxpA14Xb/ZUXbIDZVf5rP2HrZHMkghzeUYPjRn/IlgYUt7sDNmqFZNIc9mRFrZC9uFQ/Nul5InZodNODQDM+nHpxaztt4xl4qKep8SDEPAQjNr8biC6T9MtLKbWbSKDlqYYNv0pb2PuGub3y9rvkF1Y05mgM=
 902554884335e5ca3661d63be9978eb4aec3f68a 0 iQIVAwUAVH0KMyBXgaxoKi1yAQLUKxAAjgyYpmqD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RGKOFfuprYFP1WwTWnVoNX9c=
--- a/.hgtags	Wed Dec 24 03:26:48 2014 -0800
+++ b/.hgtags	Thu Jan 01 16:47:14 2015 -0600
@@ -112,3 +112,4 @@
 643c58303fb0ec020907af28b9e486be299ba043 3.2.1
 902554884335e5ca3661d63be9978eb4aec3f68a 3.2.2
 6dad422ecc5adb63d9fa649eeb8e05a5f9bc4900 3.2.3
+1265a3a71d75396f5d4cf6935ae7d9ba5407a547 3.2.4
--- a/hgext/largefiles/lfcommands.py	Wed Dec 24 03:26:48 2014 -0800
+++ b/hgext/largefiles/lfcommands.py	Thu Jan 01 16:47:14 2015 -0600
@@ -519,19 +519,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 lfiles:
             statuswriter(_('%d largefiles updated, %d removed\n') % (updated,
--- a/hgext/largefiles/overrides.py	Wed Dec 24 03:26:48 2014 -0800
+++ b/hgext/largefiles/overrides.py	Thu Jan 01 16:47:14 2015 -0600
@@ -496,10 +496,14 @@
 
 def mergerecordupdates(orig, repo, actions, branchmerge):
     if 'lfmr' in actions:
-        # this should be executed before 'orig', to execute 'remove'
-        # before all other actions
+        lfdirstate = lfutil.openlfdirstate(repo.ui, repo)
         for lfile, args, msg in actions['lfmr']:
+            # this should be executed before 'orig', to execute 'remove'
+            # before all other actions
             repo.dirstate.remove(lfile)
+            # make sure lfile doesn't get synclfdirstate'd as normal
+            lfdirstate.add(lfile)
+        lfdirstate.write()
 
     return orig(repo, actions, branchmerge)
 
--- a/tests/test-largefiles-update.t	Wed Dec 24 03:26:48 2014 -0800
+++ b/tests/test-largefiles-update.t	Thu Jan 01 16:47:14 2015 -0600
@@ -25,6 +25,20 @@
   $ hg commit -m '#2'
   created new head
 
+Test that lfdirstate keeps track of last modification of largefiles and
+prevents unnecessary hashing of content - also after linear/noop update
+
+  $ sleep 1
+  $ hg st
+  $ hg debugdirstate --large --nodate
+  n 644          7 large1
+  n 644         13 large2
+  $ hg up
+  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ hg debugdirstate --large --nodate
+  n 644          7 large1
+  n 644         13 large2
+
 Test that "hg merge" updates largefiles from "other" correctly
 
 (getting largefiles from "other" normally)