[Updated] D8529: flags: introduce explicit testing for merging change to exec flag

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


Closed by commit rHGbf5ed664f467: flags: introduce explicit testing for merging change to exec flag (authored by marmoute).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D8529?vs=21393&id=21497

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

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

AFFECTED FILES
  tests/test-merge-exec.t

CHANGE DETAILS

diff --git a/tests/test-merge-exec.t b/tests/test-merge-exec.t
new file mode 100644
--- /dev/null
+++ b/tests/test-merge-exec.t
@@ -0,0 +1,82 @@
+===============================================
+Testing merge involving change to the exec flag
+===============================================
+
+#require execbit
+
+
+Initial setup
+==============
+
+
+  $ hg init base-repo
+  $ cd base-repo
+  $ cat << EOF > a
+  > 1
+  > 2
+  > 3
+  > 4
+  > 5
+  > 6
+  > 7
+  > 8
+  > 9
+  > EOF
+  $ touch b
+  $ hg add a b
+  $ hg commit -m "initial commit"
+  $ cd ..
+
+Testing merging mode change
+===========================
+
+setup
+
+Change on one side, executable bit on the other
+
+  $ hg clone base-repo simple-merge-repo
+  updating to branch default
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ cd simple-merge-repo
+  $ chmod +x a
+  $ hg ci -m "make a executable, no change"
+  $ [ -x a ] || echo "executable bit not recorded"
+  $ hg up ".^"
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ cat << EOF > a
+  > 1
+  > 2
+  > 3
+  > 4
+  > 5
+  > 6
+  > 7
+  > x
+  > 9
+  > EOF
+  $ hg commit -m "edit end of file"
+  created new head
+
+merge them (from the update side)
+
+  $ hg merge 'desc("make a executable, no change")'
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  (branch merge, don't forget to commit)
+  $ hg st
+  M a
+  $ [ -x a ] || echo "executable bit lost"
+
+merge them (from the chmod side)
+
+  $ hg up -C 'desc("make a executable, no change")'
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ hg merge 'desc("edit end of file")'
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  (branch merge, don't forget to commit)
+  $ hg st
+  M a
+  $ [ -x a ] || echo "executable bit lost"
+
+
+  $ cd ..
+



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


More information about the Mercurial-patches mailing list