[Request] [+++ ] D8530: flags: also test merging a rename with and exec flag change

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Sat May 16 20:11:37 UTC 2020


marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This case is currently buggy and was not tested. This is probably a quite old
  regression. The next changeset fix this case. Move exec+rename related bug will
  gain a test later.
  
  To highlight the expected behavior the currently missing line are marked with (false !)
  and the bad one with (true !)
  
  note: we should probably gain explicit "test bool" for this usecases.

REPOSITORY
  rHG Mercurial

BRANCH
  stable

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

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
@@ -80,3 +80,60 @@
 
   $ cd ..
 
+Testing merging mode change with rename
+=======================================
+
+  $ hg clone base-repo rename-merge-repo
+  updating to branch default
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ cd rename-merge-repo
+
+make "a" executable on one side
+
+  $ chmod +x a
+  $ hg status
+  M a
+  $ hg ci -m "make a executable"
+  $ [ -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
+  $ hg ci -m "rename a to z"
+  created new head
+
+merge them (from the rename side)
+
+  $ hg merge 'desc("make a executable")'
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved (false !)
+  0 files updated, 0 files merged, 0 files removed, 0 files unresolved (true !)
+  (branch merge, don't forget to commit)
+  $ hg st --copies
+  M z (false !)
+    a (false !)
+  $ [ -x z ] || echo "executable bit lost"
+  executable bit lost (true !)
+
+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")'
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved (false !)
+  1 files updated, 0 files merged, 1 files removed, 0 files unresolved (true !)
+  (branch merge, don't forget to commit)
+  $ hg st --copies
+  M z
+    a (false !)
+  R a
+  $ [ -x z ] || echo "executable bit lost"
+  executable bit lost (true !)
+
+
+  $ cd ..



To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20200516/dd493f9c/attachment.html>


More information about the Mercurial-patches mailing list