[Updated] D8532: flags: add a test for merging exec flag change with rename and file change

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Thu May 28 16:39:35 UTC 2020


Closed by commit rHG783f059509e4: flags: add a test for merging exec flag change with rename and file change (authored by marmoute).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D8532?vs=21396&id=21500

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D8532/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D8532

AFFECTED FILES
  tests/test-merge-exec.t

CHANGE DETAILS

diff --git a/tests/test-merge-exec.t b/tests/test-merge-exec.t
--- a/tests/test-merge-exec.t
+++ b/tests/test-merge-exec.t
@@ -133,3 +133,83 @@
 
 
   $ cd ..
+
+Testing merging mode change with rename + modification on both side
+===================================================================
+
+
+  $ hg clone base-repo rename+mod-merge-repo
+  updating to branch default
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ cd rename+mod-merge-repo
+
+make "a" executable on one side
+
+  $ chmod +x a
+  $ cat << EOF > a
+  > 1
+  > x
+  > 3
+  > 4
+  > 5
+  > 6
+  > 7
+  > 8
+  > 9
+  > EOF
+  $ hg status
+  M a
+  $ hg ci -m "make a executable, and change start"
+  $ [ -x a ] || echo "executable bit not recorded"
+  $ hg up ".^"
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+
+make "a" renamed on the other side
+
+  $ hg mv a z
+  $ hg st --copies
+  A z
+    a
+  R a
+  $ cat << EOF > z
+  > 1
+  > 2
+  > 3
+  > 4
+  > 5
+  > 6
+  > 7
+  > x
+  > 9
+  > EOF
+  $ hg ci -m "rename a to z, and change end"
+  created new head
+
+merge them (from the rename side)
+
+  $ hg merge 'desc("make a executable")'
+  merging z and a to z
+  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
+  (branch merge, don't forget to commit)
+  $ hg st --copies
+  M z
+    a
+  $ [ -x z ] || echo "executable bit lost"
+  executable bit lost
+
+merge them (from the chmod side)
+
+  $ hg up -C 'desc("make a executable")'
+  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ hg merge 'desc("rename a to z")'
+  merging a and z to z
+  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
+  (branch merge, don't forget to commit)
+  $ hg st --copies
+  M z
+    a
+  R a
+  $ [ -x z ] || echo "executable bit lost"
+  executable bit lost
+
+  $ cd ..



To: marmoute, #hg-reviewers, durin42
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20200528/a99213ba/attachment-0002.html>


More information about the Mercurial-patches mailing list