--- a/hgext/largefiles/reposetup.py Wed Dec 14 15:41:08 2011 +0100
+++ b/hgext/largefiles/reposetup.py Fri Dec 09 17:35:00 2011 +0100
@@ -192,9 +192,18 @@
continue
if lfile not in lfdirstate:
removed.append(lfile)
- # Handle unknown and ignored differently
- lfiles = (modified, added, removed, missing, [], [], clean)
+
+ # Filter result lists
result = list(result)
+
+ # Largefiles are not really removed when they're
+ # still in the normal dirstate. Likewise, normal
+ # files are not really removed if it's still in
+ # lfdirstate. This happens in merges where files
+ # change type.
+ removed = [f for f in removed if f not in repo.dirstate]
+ result[2] = [f for f in result[2] if f not in lfdirstate]
+
# Unknown files
result[4] = [f for f in unknown
if (repo.dirstate[f] == '?' and
@@ -206,6 +215,7 @@
normals = [[fn for fn in filelist
if not lfutil.isstandin(fn)]
for filelist in result]
+ lfiles = (modified, added, removed, missing, [], [], clean)
result = [sorted(list1 + list2)
for (list1, list2) in zip(normals, lfiles)]
else: