correctly update dirstate after update+mode change (issue1456)
authorBenoit Boissinot <benoit.boissinot@ens-lyon.org>
Wed, 07 Jan 2009 02:11:17 +0100
changeset 7569 89207edf3973
parent 7568 12df451ce205
child 7608 560e3e882aba
child 7612 069b29656401
correctly update dirstate after update+mode change (issue1456)
mercurial/merge.py
tests/test-up-issue1456
tests/test-up-issue1456.out
--- a/mercurial/merge.py	Tue Jan 06 10:30:22 2009 +0100
+++ b/mercurial/merge.py	Wed Jan 07 02:11:17 2009 +0100
@@ -369,7 +369,9 @@
                 repo.dirstate.forget(f)
         elif m == "f": # forget
             repo.dirstate.forget(f)
-        elif m in "ge": # get or exec change
+        elif m == "e": # exec change
+            repo.dirstate.normaldirty(f)
+        elif m == "g": # get
             if branchmerge:
                 repo.dirstate.normaldirty(f)
             else:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-up-issue1456	Wed Jan 07 02:11:17 2009 +0100
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+rm -rf a
+hg init a
+cd a
+
+echo foo > foo
+hg ci -qAm0
+chmod +x foo
+hg ci -m1
+hg co -q 0
+echo dirty > foo
+sleep 1
+hg up -q
+cat foo
+hg st -A
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-up-issue1456.out	Wed Jan 07 02:11:17 2009 +0100
@@ -0,0 +1,2 @@
+dirty
+M foo