Mercurial > hg
diff tests/test-mq-qrefresh @ 7566:5f7e3f17aece
mq: drop copy records when refreshing regular patches (issue1441)
Copy information was saved in a common loop, then refined in a git-only block.
The problem was the latter did filter out renames occuring in the current
patch and irrelevant to commit. In the non-git case, copy records still existed
in the dirstate, referencing removed files, making the commit to fail. Git and
non-git copy handling paths are now separated for simplicity.
Reported by Gary Bernhardt
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Sun, 04 Jan 2009 21:32:40 +0100 |
parents | 09ed32b79656 |
children | 08a0f04b56bd b8801b58bbd8 |
line wrap: on
line diff
--- a/tests/test-mq-qrefresh Sun Jan 04 19:10:42 2009 +0100 +++ b/tests/test-mq-qrefresh Sun Jan 04 21:32:40 2009 +0100 @@ -123,15 +123,12 @@ echo cd .. - - -echo "[diff]" >> $HGRCPATH -echo "git=True" >> $HGRCPATH - # Test qrefresh --git losing copy metadata echo % create test repo hg init repo cd repo +echo "[diff]" >> .hg/hgrc +echo "git=True" >> .hg/hgrc echo a > a hg ci -Am adda hg copy a ab @@ -146,3 +143,27 @@ hg qdiff cd .. +# Test issue 1441: qrefresh confused after hg rename +echo % issue1441 without git patches +hg init repo-1441 +cd repo-1441 +echo a > a +hg add a +hg qnew -f p +hg mv a b +hg qrefresh +hg qdiff --nodates +cd .. + +echo % issue1441 with git patches +hg init repo-1441-git +cd repo-1441-git +echo "[diff]" >> .hg/hgrc +echo "git=True" >> .hg/hgrc +echo a > a +hg add a +hg qnew -f p +hg mv a b +hg qrefresh +hg qdiff --nodates +cd .. \ No newline at end of file