Mercurial > hg-stable
changeset 44787:9438c84d1dce stable
flags: also test merging a rename with and exec flag change
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.
Differential Revision: https://phab.mercurial-scm.org/D8530
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sat, 16 May 2020 20:37:44 +0200 |
parents | bf5ed664f467 |
children | d452acc8cce8 |
files | tests/test-merge-exec.t |
diffstat | 1 files changed, 57 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-merge-exec.t Sat May 16 20:37:33 2020 +0200 +++ b/tests/test-merge-exec.t Sat May 16 20:37:44 2020 +0200 @@ -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 ..