[Updated] D8531: flags: account for flag change when tracking rename relevant to merge
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Thu May 28 16:39:30 UTC 2020
Closed by commit rHGd452acc8cce8: flags: account for flag change when tracking rename relevant to merge (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/D8531?vs=21395&id=21499
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D8531/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D8531
AFFECTED FILES
mercurial/copies.py
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
@@ -111,29 +111,25 @@
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 !)
+ 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
$ hg st --copies
- M z (false !)
- a (false !)
+ M z
+ a
$ [ -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 !)
+ 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
$ hg st --copies
M z
- a (false !)
+ a
R a
$ [ -x z ] || echo "executable bit lost"
- executable bit lost (true !)
$ cd ..
diff --git a/mercurial/copies.py b/mercurial/copies.py
--- a/mercurial/copies.py
+++ b/mercurial/copies.py
@@ -534,9 +534,9 @@
# thing in pathcopies(): pathcopies(x, y) can return a copy where the
# destination doesn't exist in y.
pass
- elif m2[src] != mb[src]:
- if not _related(c2[src], base[src]):
- return
+ elif mb[src] != m2[src] and not _related(c2[src], base[src]):
+ return
+ elif mb[src] != m2[src] or mb.flags(src) != m2.flags(src):
# modified on side 2
for dst in dsts1:
copy[dst] = src
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/c338c837/attachment-0002.html>
More information about the Mercurial-patches
mailing list