hgext/largefiles/lfcommands.py
changeset 22197 f72d73937853
parent 22095 cb62d77c7a01
child 22296 650b5b6e75ed
--- a/hgext/largefiles/lfcommands.py	Fri Aug 15 20:28:51 2014 +0900
+++ b/hgext/largefiles/lfcommands.py	Fri Aug 15 20:28:51 2014 +0900
@@ -443,6 +443,7 @@
         lfiles = set(lfutil.listlfiles(repo)) | set(lfdirstate)
 
         if filelist is not None:
+            filelist = set(filelist)
             lfiles = [f for f in lfiles if f in filelist]
 
         update = {}
@@ -512,6 +513,19 @@
 
             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,