Mercurial > hg-stable
changeset 6802:04503b757935
Merge with crew-stable
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Mon, 07 Jul 2008 09:31:32 +0200 |
parents | cc7114d96548 (current diff) 71e339714586 (diff) |
children | 4a8b9cf62a6b |
files | hgext/mq.py |
diffstat | 3 files changed, 62 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/mq.py Sat Jul 05 14:35:36 2008 +0200 +++ b/hgext/mq.py Mon Jul 07 09:31:32 2008 +0200 @@ -1129,7 +1129,7 @@ f = repo.file(dst) src = f.renamed(man[dst]) if src: - copies[src[0]] = copies.get(dst, []) + copies.setdefault(src[0], []).extend(copies.get(dst, [])) if dst in a: copies[src[0]].append(dst) # we can't copy a file created by the patch itself
--- a/tests/test-mq-qrefresh Sat Jul 05 14:35:36 2008 +0200 +++ b/tests/test-mq-qrefresh Mon Jul 07 09:31:32 2008 +0200 @@ -82,3 +82,28 @@ cat .hg/patches/mqbase | \ sed -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" +cd .. + + + +echo "[diff]" >> $HGRCPATH +echo "git=True" >> $HGRCPATH + +# Test qrefresh --git losing copy metadata +echo % create test repo +hg init repo +cd repo +echo a > a +hg ci -Am adda +hg copy a ab +echo b >> ab +hg copy a ac +echo c >> ac +echo % capture changes +hg qnew -f p1 +hg qdiff +echo % refresh and check changes again +hg qref +hg qdiff +cd .. +
--- a/tests/test-mq-qrefresh.out Sat Jul 05 14:35:36 2008 +0200 +++ b/tests/test-mq-qrefresh.out Mon Jul 07 09:31:32 2008 +0200 @@ -159,3 +159,39 @@ @@ -1,1 +1,1 @@ -base +patched +% create test repo +adding a +% capture changes +diff --git a/a b/ab +copy from a +copy to ab +--- a/a ++++ b/ab +@@ -1,1 +1,2 @@ + a ++b +diff --git a/a b/ac +copy from a +copy to ac +--- a/a ++++ b/ac +@@ -1,1 +1,2 @@ + a ++c +% refresh and check changes again +diff --git a/a b/ab +copy from a +copy to ab +--- a/a ++++ b/ab +@@ -1,1 +1,2 @@ + a ++b +diff --git a/a b/ac +copy from a +copy to ac +--- a/a ++++ b/ac +@@ -1,1 +1,2 @@ + a ++c