For now it is equivalent to the filelog case, but introducing this early helps
make the comings changesets clearer.
Details
Details
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
For now it is equivalent to the filelog case, but introducing this early helps
make the comings changesets clearer.
| Lint Skipped |
| Unit Tests Skipped |
| Path | Packages | |||
|---|---|---|---|---|
| M | tests/test-copies.t (21 lines) |
| Commit | Parents | Author | Summary | Date |
|---|---|---|---|---|
| e5038a958853 | 367ab8425e28 | Pierre-Yves David | Oct 6 2019, 11:36 PM |
| #testcases filelog compatibility changeset | #testcases filelog compatibility changeset sidedata | ||||
| $ cat >> $HGRCPATH << EOF | $ cat >> $HGRCPATH << EOF | ||||
| > [extensions] | > [extensions] | ||||
| > rebase= | > rebase= | ||||
| > [alias] | > [alias] | ||||
| > l = log -G -T '{rev} {desc}\n{files}\n' | > l = log -G -T '{rev} {desc}\n{files}\n' | ||||
| > EOF | > EOF | ||||
| #if compatibility | #if compatibility | ||||
| $ cat >> $HGRCPATH << EOF | $ cat >> $HGRCPATH << EOF | ||||
| > [experimental] | > [experimental] | ||||
| > copies.read-from = compatibility | > copies.read-from = compatibility | ||||
| > EOF | > EOF | ||||
| #endif | #endif | ||||
| #if changeset | #if changeset | ||||
| $ cat >> $HGRCPATH << EOF | $ cat >> $HGRCPATH << EOF | ||||
| > [experimental] | > [experimental] | ||||
| > copies.read-from = changeset-only | > copies.read-from = changeset-only | ||||
| > copies.write-to = changeset-only | > copies.write-to = changeset-only | ||||
| > EOF | > EOF | ||||
| #endif | #endif | ||||
| #if sidedata | |||||
| $ cat >> $HGRCPATH << EOF | |||||
| > [format] | |||||
| > exp-use-copies-side-data-changeset = yes | |||||
| > EOF | |||||
| #endif | |||||
| $ REPONUM=0 | $ REPONUM=0 | ||||
| $ newrepo() { | $ newrepo() { | ||||
| > cd $TESTTMP | > cd $TESTTMP | ||||
| > REPONUM=`expr $REPONUM + 1` | > REPONUM=`expr $REPONUM + 1` | ||||
| > hg init repo-$REPONUM | > hg init repo-$REPONUM | ||||
| > cd repo-$REPONUM | > cd repo-$REPONUM | ||||
| > } | > } | ||||
| $ hg debugp1copies -r 2 | $ hg debugp1copies -r 2 | ||||
| x -> z | x -> z | ||||
| $ hg debugp2copies -r 2 | $ hg debugp2copies -r 2 | ||||
| It's a little weird that it shows up on both sides | It's a little weird that it shows up on both sides | ||||
| $ hg debugpathcopies 1 2 | $ hg debugpathcopies 1 2 | ||||
| x -> z | x -> z | ||||
| $ hg debugpathcopies 0 2 | $ hg debugpathcopies 0 2 | ||||
| x -> z (filelog !) | x -> z (filelog !) | ||||
| x -> z (sidedata !) | |||||
| Copy file that exists on both sides of the merge, different content | Copy file that exists on both sides of the merge, different content | ||||
| $ newrepo | $ newrepo | ||||
| $ echo branch1 > x | $ echo branch1 > x | ||||
| $ hg ci -Aqm 'add x on branch 1' | $ hg ci -Aqm 'add x on branch 1' | ||||
| $ hg co -q null | $ hg co -q null | ||||
| $ echo branch2 > x | $ echo branch2 > x | ||||
| $ hg ci -Aqm 'add x on branch 2' | $ hg ci -Aqm 'add x on branch 2' | ||||
| o 0 add x | o 0 add x | ||||
| x | x | ||||
| $ hg debugp1copies -r 3 | $ hg debugp1copies -r 3 | ||||
| y -> z | y -> z | ||||
| $ hg debugp2copies -r 3 | $ hg debugp2copies -r 3 | ||||
| $ hg debugpathcopies 2 3 | $ hg debugpathcopies 2 3 | ||||
| y -> z | y -> z | ||||
| $ hg debugpathcopies 1 3 | $ hg debugpathcopies 1 3 | ||||
| y -> z (no-filelog !) | y -> z (no-filelog no-sidedata !) | ||||
| Create x and y, then rename x to z on one side of merge, and rename y to z and | Create x and y, then rename x to z on one side of merge, and rename y to z and | ||||
| modify z on the other side. When storing copies in the changeset, we don't | modify z on the other side. When storing copies in the changeset, we don't | ||||
| filter out copies whose target was created on the other side of the merge. | filter out copies whose target was created on the other side of the merge. | ||||
| $ newrepo | $ newrepo | ||||
| $ echo x > x | $ echo x > x | ||||
| $ echo y > y | $ echo y > y | ||||
| $ hg ci -Aqm 'add x and y' | $ hg ci -Aqm 'add x and y' | ||||
| | | z | | | z | ||||
| | o 2 rename y to z | | o 2 rename y to z | ||||
| | | y z | | | y z | ||||
| o | 1 rename x to z | o | 1 rename x to z | ||||
| |/ x z | |/ x z | ||||
| o 0 add x and y | o 0 add x and y | ||||
| x y | x y | ||||
| $ hg debugpathcopies 1 4 | $ hg debugpathcopies 1 4 | ||||
| y -> z (no-filelog !) | y -> z (no-filelog no-sidedata !) | ||||
| $ hg debugpathcopies 2 4 | $ hg debugpathcopies 2 4 | ||||
| x -> z (no-filelog !) | x -> z (no-filelog no-sidedata !) | ||||
| $ hg debugpathcopies 0 4 | $ hg debugpathcopies 0 4 | ||||
| x -> z (filelog !) | x -> z (filelog !) | ||||
| x -> z (sidedata !) | |||||
| y -> z (compatibility !) | y -> z (compatibility !) | ||||
| y -> z (changeset !) | y -> z (changeset !) | ||||
| $ hg debugpathcopies 1 5 | $ hg debugpathcopies 1 5 | ||||
| y -> z (no-filelog !) | y -> z (no-filelog no-sidedata !) | ||||
| $ hg debugpathcopies 2 5 | $ hg debugpathcopies 2 5 | ||||
| x -> z (no-filelog !) | x -> z (no-filelog no-sidedata !) | ||||
| $ hg debugpathcopies 0 5 | $ hg debugpathcopies 0 5 | ||||
| x -> z | x -> z | ||||
| Test for a case in fullcopytracing algorithm where neither of the merging csets | Test for a case in fullcopytracing algorithm where neither of the merging csets | ||||
| is a descendant of the merge base. This test reflects that the algorithm | is a descendant of the merge base. This test reflects that the algorithm | ||||
| correctly finds the copies: | correctly finds the copies: | ||||