Mercurial > hg
diff tests/test-copies.t @ 42142:5382d8f8530b
changelog: parse copy metadata if available in extras
This lets read back the copy metadata we just started writing. There
are still many places left to teach about getting the copy information
from the changeset, but we have enough ({file_copies}, specifically)
that we can add it now and have some test coverage of it.
Differential Revision: https://phab.mercurial-scm.org/D6186
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Wed, 27 Dec 2017 22:05:20 -0800 |
parents | 7694b685bb10 |
children | 57203e0210f8 c1850798f995 |
line wrap: on
line diff
--- a/tests/test-copies.t Wed Dec 27 19:49:36 2017 -0800 +++ b/tests/test-copies.t Wed Dec 27 22:05:20 2017 -0800 @@ -1,4 +1,4 @@ -#testcases filelog compatibility +#testcases filelog compatibility changeset $ cat >> $HGRCPATH << EOF > [extensions] @@ -14,6 +14,14 @@ > EOF #endif +#if changeset + $ cat >> $HGRCPATH << EOF + > [experimental] + > copies.read-from = changeset-only + > copies.write-to = changeset-only + > EOF +#endif + $ REPONUM=0 $ newrepo() { > cd $TESTTMP @@ -376,11 +384,13 @@ o 0 add x on branch 1 x $ hg debugp1copies -r 2 + x -> z (changeset !) $ hg debugp2copies -r 2 - x -> z + x -> z (no-changeset !) $ hg debugpathcopies 1 2 + x -> z (changeset !) $ hg debugpathcopies 0 2 - x -> z + x -> z (no-changeset !) Copy x->y on one side of merge and copy x->z on the other side. Pathcopies from one parent of the merge to the merge should include the copy from the other side. @@ -539,6 +549,9 @@ Grafting revision 4 on top of revision 2, showing that it respect the rename: +TODO: Make this work with copy info in changesets (probably by writing a +changeset-centric version of copies.mergecopies()) +#if no-changeset $ hg up 2 -q $ hg graft -r 4 --base 3 --hidden grafting 4:af28412ec03c "added d, modified b" (tip) @@ -554,6 +567,8 @@ b +baba +#endif + Test to make sure that fullcopytracing algorithm don't fail when both the merging csets are dirty (a dirty cset is one who is not the descendant of merge base) -------------------------------------------------------------------------------------------------