hgext/largefiles/overrides.py
changeset 15860 3ecce805ac13
parent 15794 0d91211dd12f
child 15914 264087940d5b
--- a/hgext/largefiles/overrides.py	Wed Jan 11 15:38:31 2012 +0100
+++ b/hgext/largefiles/overrides.py	Wed Jan 11 16:53:51 2012 +0100
@@ -612,8 +612,15 @@
     return result
 
 def hg_merge(orig, repo, node, force=None, remind=True):
-    result = orig(repo, node, force, remind)
-    lfcommands.updatelfiles(repo.ui, repo)
+    # Mark the repo as being in the middle of a merge, so that
+    # updatelfiles() will know that it needs to trust the standins in
+    # the working copy, not in the standins in the current node
+    repo._ismerging = True
+    try:
+        result = orig(repo, node, force, remind)
+        lfcommands.updatelfiles(repo.ui, repo)
+    finally:
+        repo._ismerging = False
     return result
 
 # When we rebase a repository with remotely changed largefiles, we need to