mercurial/hg.py
changeset 768 20e95c245bc3
parent 765 1e31d97c3d70
child 772 f05deda58457
child 793 445970ccf57a
--- a/mercurial/hg.py
+++ b/mercurial/hg.py
@@ -1506,7 +1506,9 @@ class localrepository:
             m, o, flag = merge[f]
             self.merge3(f, m, o)
             util.set_exec(self.wjoin(f), flag)
-            if moddirstate:
+            if moddirstate and mode == 'm':
+                # only update dirstate on branch merge, otherwise we
+                # could mark files with changes as unchanged
                 self.dirstate.update([f], mode)
 
         remove.sort()