Mercurial > hg
annotate tests/test-copies.t @ 46408:e948ad0dcbe2
copies: add an devel option to trace all files
Filelog based copy tracing only trace copy for file that have been added. This
is a trade off between skipping some rare copy case in exchange for avoiding
atrocious-to-the-point-of-unusable performance.
The changeset centric copy tracing does not need this trade off and naturally
trace all copy, include the one involving non-new files.
In order to ease the comparison from both algorithm, we add a small devel option
to trace copy for all files in the target revisions.
Differential Revision: https://phab.mercurial-scm.org/D9796
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sat, 16 Jan 2021 00:03:18 +0100 |
parents | 1d6d1a15a963 |
children | 86ee73018e62 |
rev | line source |
---|---|
43139
f78ad4caa5ad
sidedatacopies: introduce a sidedata testcase for test-copies.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
42645
diff
changeset
|
1 #testcases filelog compatibility changeset sidedata |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
2 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
3 $ cat >> $HGRCPATH << EOF |
41931
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
4 > [extensions] |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
5 > rebase= |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
6 > [alias] |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
7 > l = log -G -T '{rev} {desc}\n{files}\n' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
8 > EOF |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
9 |
41756
49ad315b39ee
copies: do copy tracing based on ctx.p[12]copies() if configured
Martin von Zweigbergk <martinvonz@google.com>
parents:
41755
diff
changeset
|
10 #if compatibility |
49ad315b39ee
copies: do copy tracing based on ctx.p[12]copies() if configured
Martin von Zweigbergk <martinvonz@google.com>
parents:
41755
diff
changeset
|
11 $ cat >> $HGRCPATH << EOF |
49ad315b39ee
copies: do copy tracing based on ctx.p[12]copies() if configured
Martin von Zweigbergk <martinvonz@google.com>
parents:
41755
diff
changeset
|
12 > [experimental] |
49ad315b39ee
copies: do copy tracing based on ctx.p[12]copies() if configured
Martin von Zweigbergk <martinvonz@google.com>
parents:
41755
diff
changeset
|
13 > copies.read-from = compatibility |
49ad315b39ee
copies: do copy tracing based on ctx.p[12]copies() if configured
Martin von Zweigbergk <martinvonz@google.com>
parents:
41755
diff
changeset
|
14 > EOF |
49ad315b39ee
copies: do copy tracing based on ctx.p[12]copies() if configured
Martin von Zweigbergk <martinvonz@google.com>
parents:
41755
diff
changeset
|
15 #endif |
49ad315b39ee
copies: do copy tracing based on ctx.p[12]copies() if configured
Martin von Zweigbergk <martinvonz@google.com>
parents:
41755
diff
changeset
|
16 |
42142
5382d8f8530b
changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents:
41932
diff
changeset
|
17 #if changeset |
5382d8f8530b
changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents:
41932
diff
changeset
|
18 $ cat >> $HGRCPATH << EOF |
5382d8f8530b
changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents:
41932
diff
changeset
|
19 > [experimental] |
5382d8f8530b
changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents:
41932
diff
changeset
|
20 > copies.read-from = changeset-only |
5382d8f8530b
changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents:
41932
diff
changeset
|
21 > copies.write-to = changeset-only |
5382d8f8530b
changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents:
41932
diff
changeset
|
22 > EOF |
5382d8f8530b
changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents:
41932
diff
changeset
|
23 #endif |
5382d8f8530b
changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents:
41932
diff
changeset
|
24 |
43139
f78ad4caa5ad
sidedatacopies: introduce a sidedata testcase for test-copies.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
42645
diff
changeset
|
25 #if sidedata |
f78ad4caa5ad
sidedatacopies: introduce a sidedata testcase for test-copies.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
42645
diff
changeset
|
26 $ cat >> $HGRCPATH << EOF |
f78ad4caa5ad
sidedatacopies: introduce a sidedata testcase for test-copies.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
42645
diff
changeset
|
27 > [format] |
f78ad4caa5ad
sidedatacopies: introduce a sidedata testcase for test-copies.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
42645
diff
changeset
|
28 > exp-use-copies-side-data-changeset = yes |
f78ad4caa5ad
sidedatacopies: introduce a sidedata testcase for test-copies.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
42645
diff
changeset
|
29 > EOF |
f78ad4caa5ad
sidedatacopies: introduce a sidedata testcase for test-copies.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
42645
diff
changeset
|
30 #endif |
f78ad4caa5ad
sidedatacopies: introduce a sidedata testcase for test-copies.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
42645
diff
changeset
|
31 |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
32 $ REPONUM=0 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
33 $ newrepo() { |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
34 > cd $TESTTMP |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
35 > REPONUM=`expr $REPONUM + 1` |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
36 > hg init repo-$REPONUM |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
37 > cd repo-$REPONUM |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
38 > } |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
39 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
40 Simple rename case |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
41 $ newrepo |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
42 $ echo x > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
43 $ hg ci -Aqm 'add x' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
44 $ hg mv x y |
41755
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
45 $ hg debugp1copies |
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
46 x -> y |
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
47 $ hg debugp2copies |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
48 $ hg ci -m 'rename x to y' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
49 $ hg l |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
50 @ 1 rename x to y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
51 | x y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
52 o 0 add x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
53 x |
41755
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
54 $ hg debugp1copies -r 1 |
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
55 x -> y |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
56 $ hg debugpathcopies 0 1 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
57 x -> y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
58 $ hg debugpathcopies 1 0 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
59 y -> x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
60 Test filtering copies by path. We do filtering by destination. |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
61 $ hg debugpathcopies 0 1 x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
62 $ hg debugpathcopies 1 0 x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
63 y -> x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
64 $ hg debugpathcopies 0 1 y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
65 x -> y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
66 $ hg debugpathcopies 1 0 y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
67 |
42645
8c5a36805d5d
copies: fix crash on in changeset-centric tracing from commit to itself
Martin von Zweigbergk <martinvonz@google.com>
parents:
42621
diff
changeset
|
68 Copies not including commit changes |
8c5a36805d5d
copies: fix crash on in changeset-centric tracing from commit to itself
Martin von Zweigbergk <martinvonz@google.com>
parents:
42621
diff
changeset
|
69 $ newrepo |
8c5a36805d5d
copies: fix crash on in changeset-centric tracing from commit to itself
Martin von Zweigbergk <martinvonz@google.com>
parents:
42621
diff
changeset
|
70 $ echo x > x |
8c5a36805d5d
copies: fix crash on in changeset-centric tracing from commit to itself
Martin von Zweigbergk <martinvonz@google.com>
parents:
42621
diff
changeset
|
71 $ hg ci -Aqm 'add x' |
8c5a36805d5d
copies: fix crash on in changeset-centric tracing from commit to itself
Martin von Zweigbergk <martinvonz@google.com>
parents:
42621
diff
changeset
|
72 $ hg mv x y |
8c5a36805d5d
copies: fix crash on in changeset-centric tracing from commit to itself
Martin von Zweigbergk <martinvonz@google.com>
parents:
42621
diff
changeset
|
73 $ hg debugpathcopies . . |
8c5a36805d5d
copies: fix crash on in changeset-centric tracing from commit to itself
Martin von Zweigbergk <martinvonz@google.com>
parents:
42621
diff
changeset
|
74 $ hg debugpathcopies . 'wdir()' |
8c5a36805d5d
copies: fix crash on in changeset-centric tracing from commit to itself
Martin von Zweigbergk <martinvonz@google.com>
parents:
42621
diff
changeset
|
75 x -> y |
8c5a36805d5d
copies: fix crash on in changeset-centric tracing from commit to itself
Martin von Zweigbergk <martinvonz@google.com>
parents:
42621
diff
changeset
|
76 $ hg debugpathcopies 'wdir()' . |
8c5a36805d5d
copies: fix crash on in changeset-centric tracing from commit to itself
Martin von Zweigbergk <martinvonz@google.com>
parents:
42621
diff
changeset
|
77 y -> x |
8c5a36805d5d
copies: fix crash on in changeset-centric tracing from commit to itself
Martin von Zweigbergk <martinvonz@google.com>
parents:
42621
diff
changeset
|
78 |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
79 Copy a file onto another file |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
80 $ newrepo |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
81 $ echo x > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
82 $ echo y > y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
83 $ hg ci -Aqm 'add x and y' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
84 $ hg cp -f x y |
41755
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
85 $ hg debugp1copies |
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
86 x -> y |
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
87 $ hg debugp2copies |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
88 $ hg ci -m 'copy x onto y' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
89 $ hg l |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
90 @ 1 copy x onto y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
91 | y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
92 o 0 add x and y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
93 x y |
41755
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
94 $ hg debugp1copies -r 1 |
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
95 x -> y |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
96 $ hg debugpathcopies 0 1 |
46399
1d6d1a15a963
copies: simplify the conditional for _filter's case 3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
45817
diff
changeset
|
97 x -> y (no-filelog !) |
46408
e948ad0dcbe2
copies: add an devel option to trace all files
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
46399
diff
changeset
|
98 $ hg debugpathcopies 0 1 --config devel.copy-tracing.trace-all-files=yes |
e948ad0dcbe2
copies: add an devel option to trace all files
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
46399
diff
changeset
|
99 x -> y |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
100 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
101 Copy a file onto another file with same content. If metadata is stored in changeset, this does not |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
102 produce a new filelog entry. The changeset's "files" entry should still list the file. |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
103 $ newrepo |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
104 $ echo x > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
105 $ echo x > x2 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
106 $ hg ci -Aqm 'add x and x2 with same content' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
107 $ hg cp -f x x2 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
108 $ hg ci -m 'copy x onto x2' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
109 $ hg l |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
110 @ 1 copy x onto x2 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
111 | x2 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
112 o 0 add x and x2 with same content |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
113 x x2 |
41755
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
114 $ hg debugp1copies -r 1 |
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
115 x -> x2 |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
116 $ hg debugpathcopies 0 1 |
46399
1d6d1a15a963
copies: simplify the conditional for _filter's case 3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
45817
diff
changeset
|
117 x -> x2 (no-filelog !) |
46408
e948ad0dcbe2
copies: add an devel option to trace all files
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
46399
diff
changeset
|
118 $ hg debugpathcopies 0 1 --config devel.copy-tracing.trace-all-files=yes |
e948ad0dcbe2
copies: add an devel option to trace all files
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
46399
diff
changeset
|
119 x -> x2 |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
120 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
121 Rename file in a loop: x->y->z->x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
122 $ newrepo |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
123 $ echo x > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
124 $ hg ci -Aqm 'add x' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
125 $ hg mv x y |
41755
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
126 $ hg debugp1copies |
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
127 x -> y |
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
128 $ hg debugp2copies |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
129 $ hg ci -m 'rename x to y' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
130 $ hg mv y z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
131 $ hg ci -m 'rename y to z' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
132 $ hg mv z x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
133 $ hg ci -m 'rename z to x' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
134 $ hg l |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
135 @ 3 rename z to x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
136 | x z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
137 o 2 rename y to z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
138 | y z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
139 o 1 rename x to y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
140 | x y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
141 o 0 add x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
142 x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
143 $ hg debugpathcopies 0 3 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
144 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
145 Copy x to z, then remove z, then copy x2 (same content as x) to z. With copy metadata in the |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
146 changeset, the two copies here will have the same filelog entry, so ctx['z'].introrev() might point |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
147 to the first commit that added the file. We should still report the copy as being from x2. |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
148 $ newrepo |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
149 $ echo x > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
150 $ echo x > x2 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
151 $ hg ci -Aqm 'add x and x2 with same content' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
152 $ hg cp x z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
153 $ hg ci -qm 'copy x to z' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
154 $ hg rm z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
155 $ hg ci -m 'remove z' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
156 $ hg cp x2 z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
157 $ hg ci -m 'copy x2 to z' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
158 $ hg l |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
159 @ 3 copy x2 to z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
160 | z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
161 o 2 remove z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
162 | z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
163 o 1 copy x to z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
164 | z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
165 o 0 add x and x2 with same content |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
166 x x2 |
41755
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
167 $ hg debugp1copies -r 3 |
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
168 x2 -> z |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
169 $ hg debugpathcopies 0 3 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
170 x2 -> z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
171 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
172 Create x and y, then rename them both to the same name, but on different sides of a fork |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
173 $ newrepo |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
174 $ echo x > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
175 $ echo y > y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
176 $ hg ci -Aqm 'add x and y' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
177 $ hg mv x z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
178 $ hg ci -qm 'rename x to z' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
179 $ hg co -q 0 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
180 $ hg mv y z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
181 $ hg ci -qm 'rename y to z' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
182 $ hg l |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
183 @ 2 rename y to z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
184 | y z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
185 | o 1 rename x to z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
186 |/ x z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
187 o 0 add x and y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
188 x y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
189 $ hg debugpathcopies 1 2 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
190 z -> x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
191 y -> z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
192 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
193 Fork renames x to y on one side and removes x on the other |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
194 $ newrepo |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
195 $ echo x > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
196 $ hg ci -Aqm 'add x' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
197 $ hg mv x y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
198 $ hg ci -m 'rename x to y' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
199 $ hg co -q 0 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
200 $ hg rm x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
201 $ hg ci -m 'remove x' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
202 created new head |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
203 $ hg l |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
204 @ 2 remove x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
205 | x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
206 | o 1 rename x to y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
207 |/ x y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
208 o 0 add x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
209 x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
210 $ hg debugpathcopies 1 2 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
211 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
212 Merge rename from other branch |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
213 $ newrepo |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
214 $ echo x > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
215 $ hg ci -Aqm 'add x' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
216 $ hg mv x y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
217 $ hg ci -m 'rename x to y' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
218 $ hg co -q 0 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
219 $ echo z > z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
220 $ hg ci -Aqm 'add z' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
221 $ hg merge -q 1 |
41755
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
222 $ hg debugp1copies |
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
223 $ hg debugp2copies |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
224 $ hg ci -m 'merge rename from p2' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
225 $ hg l |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
226 @ 3 merge rename from p2 |
42621
99ebde4fec99
commit: improve the files field of changelog for merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
42594
diff
changeset
|
227 |\ |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
228 | o 2 add z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
229 | | z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
230 o | 1 rename x to y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
231 |/ x y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
232 o 0 add x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
233 x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
234 Perhaps we should indicate the rename here, but `hg status` is documented to be weird during |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
235 merges, so... |
41755
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
236 $ hg debugp1copies -r 3 |
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
237 $ hg debugp2copies -r 3 |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
238 $ hg debugpathcopies 0 3 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
239 x -> y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
240 $ hg debugpathcopies 1 2 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
241 y -> x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
242 $ hg debugpathcopies 1 3 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
243 $ hg debugpathcopies 2 3 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
244 x -> y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
245 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
246 Copy file from either side in a merge |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
247 $ newrepo |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
248 $ echo x > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
249 $ hg ci -Aqm 'add x' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
250 $ hg co -q null |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
251 $ echo y > y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
252 $ hg ci -Aqm 'add y' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
253 $ hg merge -q 0 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
254 $ hg cp y z |
41755
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
255 $ hg debugp1copies |
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
256 y -> z |
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
257 $ hg debugp2copies |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
258 $ hg ci -m 'copy file from p1 in merge' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
259 $ hg co -q 1 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
260 $ hg merge -q 0 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
261 $ hg cp x z |
41755
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
262 $ hg debugp1copies |
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
263 $ hg debugp2copies |
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
264 x -> z |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
265 $ hg ci -qm 'copy file from p2 in merge' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
266 $ hg l |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
267 @ 3 copy file from p2 in merge |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
268 |\ z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
269 +---o 2 copy file from p1 in merge |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
270 | |/ z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
271 | o 1 add y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
272 | y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
273 o 0 add x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
274 x |
41755
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
275 $ hg debugp1copies -r 2 |
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
276 y -> z |
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
277 $ hg debugp2copies -r 2 |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
278 $ hg debugpathcopies 1 2 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
279 y -> z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
280 $ hg debugpathcopies 0 2 |
41755
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
281 $ hg debugp1copies -r 3 |
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
282 $ hg debugp2copies -r 3 |
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
283 x -> z |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
284 $ hg debugpathcopies 1 3 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
285 $ hg debugpathcopies 0 3 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
286 x -> z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
287 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
288 Copy file that exists on both sides of the merge, same content on both sides |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
289 $ newrepo |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
290 $ echo x > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
291 $ hg ci -Aqm 'add x on branch 1' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
292 $ hg co -q null |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
293 $ echo x > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
294 $ hg ci -Aqm 'add x on branch 2' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
295 $ hg merge -q 0 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
296 $ hg cp x z |
41755
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
297 $ hg debugp1copies |
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
298 x -> z |
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
299 $ hg debugp2copies |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
300 $ hg ci -qm 'merge' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
301 $ hg l |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
302 @ 2 merge |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
303 |\ z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
304 | o 1 add x on branch 2 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
305 | x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
306 o 0 add x on branch 1 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
307 x |
41755
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
308 $ hg debugp1copies -r 2 |
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
309 x -> z |
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
310 $ hg debugp2copies -r 2 |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
311 It's a little weird that it shows up on both sides |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
312 $ hg debugpathcopies 1 2 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
313 x -> z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
314 $ hg debugpathcopies 0 2 |
41756
49ad315b39ee
copies: do copy tracing based on ctx.p[12]copies() if configured
Martin von Zweigbergk <martinvonz@google.com>
parents:
41755
diff
changeset
|
315 x -> z (filelog !) |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
316 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
317 Copy file that exists on both sides of the merge, different content |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
318 $ newrepo |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
319 $ echo branch1 > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
320 $ hg ci -Aqm 'add x on branch 1' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
321 $ hg co -q null |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
322 $ echo branch2 > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
323 $ hg ci -Aqm 'add x on branch 2' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
324 $ hg merge -q 0 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
325 warning: conflicts while merging x! (edit, then use 'hg resolve --mark') |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
326 [1] |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
327 $ echo resolved > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
328 $ hg resolve -m x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
329 (no more unresolved files) |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
330 $ hg cp x z |
41755
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
331 $ hg debugp1copies |
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
332 x -> z |
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
333 $ hg debugp2copies |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
334 $ hg ci -qm 'merge' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
335 $ hg l |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
336 @ 2 merge |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
337 |\ x z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
338 | o 1 add x on branch 2 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
339 | x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
340 o 0 add x on branch 1 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
341 x |
41755
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
342 $ hg debugp1copies -r 2 |
42142
5382d8f8530b
changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents:
41932
diff
changeset
|
343 x -> z (changeset !) |
43146
0171483b082f
sidedatacopies: read rename information from sidedata
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43139
diff
changeset
|
344 x -> z (sidedata !) |
41755
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
345 $ hg debugp2copies -r 2 |
43146
0171483b082f
sidedatacopies: read rename information from sidedata
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43139
diff
changeset
|
346 x -> z (no-changeset no-sidedata !) |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
347 $ hg debugpathcopies 1 2 |
42142
5382d8f8530b
changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents:
41932
diff
changeset
|
348 x -> z (changeset !) |
43146
0171483b082f
sidedatacopies: read rename information from sidedata
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43139
diff
changeset
|
349 x -> z (sidedata !) |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
350 $ hg debugpathcopies 0 2 |
43146
0171483b082f
sidedatacopies: read rename information from sidedata
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43139
diff
changeset
|
351 x -> z (no-changeset no-sidedata !) |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
352 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
353 Copy x->y on one side of merge and copy x->z on the other side. Pathcopies from one parent |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
354 of the merge to the merge should include the copy from the other side. |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
355 $ newrepo |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
356 $ echo x > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
357 $ hg ci -Aqm 'add x' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
358 $ hg cp x y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
359 $ hg ci -qm 'copy x to y' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
360 $ hg co -q 0 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
361 $ hg cp x z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
362 $ hg ci -qm 'copy x to z' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
363 $ hg merge -q 1 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
364 $ hg ci -m 'merge copy x->y and copy x->z' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
365 $ hg l |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
366 @ 3 merge copy x->y and copy x->z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
367 |\ |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
368 | o 2 copy x to z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
369 | | z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
370 o | 1 copy x to y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
371 |/ y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
372 o 0 add x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
373 x |
41755
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
374 $ hg debugp1copies -r 3 |
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
375 $ hg debugp2copies -r 3 |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
376 $ hg debugpathcopies 2 3 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
377 x -> y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
378 $ hg debugpathcopies 1 3 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
379 x -> z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
380 |
42594
d013099c551b
copies: filter invalid copies only at end of pathcopies() (issue6163)
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
381 Copy x to y on one side of merge, create y and rename to z on the other side. |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
382 $ newrepo |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
383 $ echo x > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
384 $ hg ci -Aqm 'add x' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
385 $ hg cp x y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
386 $ hg ci -qm 'copy x to y' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
387 $ hg co -q 0 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
388 $ echo y > y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
389 $ hg ci -Aqm 'add y' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
390 $ hg mv y z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
391 $ hg ci -m 'rename y to z' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
392 $ hg merge -q 1 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
393 $ hg ci -m 'merge' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
394 $ hg l |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
395 @ 4 merge |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
396 |\ |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
397 | o 3 rename y to z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
398 | | y z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
399 | o 2 add y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
400 | | y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
401 o | 1 copy x to y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
402 |/ y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
403 o 0 add x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
404 x |
41755
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
405 $ hg debugp1copies -r 3 |
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
406 y -> z |
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
407 $ hg debugp2copies -r 3 |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
408 $ hg debugpathcopies 2 3 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
409 y -> z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
410 $ hg debugpathcopies 1 3 |
43146
0171483b082f
sidedatacopies: read rename information from sidedata
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43139
diff
changeset
|
411 y -> z (no-filelog !) |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
412 |
42486
35d674a3d5db
copies: don't filter out copy targets created on other side of merge commit
Martin von Zweigbergk <martinvonz@google.com>
parents:
42427
diff
changeset
|
413 Create x and y, then rename x to z on one side of merge, and rename y to z and |
35d674a3d5db
copies: don't filter out copy targets created on other side of merge commit
Martin von Zweigbergk <martinvonz@google.com>
parents:
42427
diff
changeset
|
414 modify z on the other side. When storing copies in the changeset, we don't |
35d674a3d5db
copies: don't filter out copy targets created on other side of merge commit
Martin von Zweigbergk <martinvonz@google.com>
parents:
42427
diff
changeset
|
415 filter out copies whose target was created on the other side of the merge. |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
416 $ newrepo |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
417 $ echo x > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
418 $ echo y > y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
419 $ hg ci -Aqm 'add x and y' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
420 $ hg mv x z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
421 $ hg ci -qm 'rename x to z' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
422 $ hg co -q 0 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
423 $ hg mv y z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
424 $ hg ci -qm 'rename y to z' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
425 $ echo z >> z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
426 $ hg ci -m 'modify z' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
427 $ hg merge -q 1 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
428 warning: conflicts while merging z! (edit, then use 'hg resolve --mark') |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
429 [1] |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
430 $ echo z > z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
431 $ hg resolve -qm z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
432 $ hg ci -m 'merge 1 into 3' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
433 Try merging the other direction too |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
434 $ hg co -q 1 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
435 $ hg merge -q 3 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
436 warning: conflicts while merging z! (edit, then use 'hg resolve --mark') |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
437 [1] |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
438 $ echo z > z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
439 $ hg resolve -qm z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
440 $ hg ci -m 'merge 3 into 1' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
441 created new head |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
442 $ hg l |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
443 @ 5 merge 3 into 1 |
42621
99ebde4fec99
commit: improve the files field of changelog for merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
42594
diff
changeset
|
444 |\ z |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
445 +---o 4 merge 1 into 3 |
42621
99ebde4fec99
commit: improve the files field of changelog for merges
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents:
42594
diff
changeset
|
446 | |/ z |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
447 | o 3 modify z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
448 | | z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
449 | o 2 rename y to z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
450 | | y z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
451 o | 1 rename x to z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
452 |/ x z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
453 o 0 add x and y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
454 x y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
455 $ hg debugpathcopies 1 4 |
43146
0171483b082f
sidedatacopies: read rename information from sidedata
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43139
diff
changeset
|
456 y -> z (no-filelog !) |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
457 $ hg debugpathcopies 2 4 |
43146
0171483b082f
sidedatacopies: read rename information from sidedata
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43139
diff
changeset
|
458 x -> z (no-filelog !) |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
459 $ hg debugpathcopies 0 4 |
41756
49ad315b39ee
copies: do copy tracing based on ctx.p[12]copies() if configured
Martin von Zweigbergk <martinvonz@google.com>
parents:
41755
diff
changeset
|
460 x -> z (filelog !) |
43146
0171483b082f
sidedatacopies: read rename information from sidedata
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43139
diff
changeset
|
461 y -> z (no-filelog !) |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
462 $ hg debugpathcopies 1 5 |
43146
0171483b082f
sidedatacopies: read rename information from sidedata
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43139
diff
changeset
|
463 y -> z (no-filelog !) |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
464 $ hg debugpathcopies 2 5 |
43146
0171483b082f
sidedatacopies: read rename information from sidedata
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43139
diff
changeset
|
465 x -> z (no-filelog !) |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
466 $ hg debugpathcopies 0 5 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
467 x -> z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
468 |
45816
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
469 Create x and y, then remove y and rename x to y on one side of merge, and |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
470 modify x on the other side. The modification to x from the second side |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
471 should be propagated to y. |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
472 $ newrepo |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
473 $ echo original > x |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
474 $ hg add x |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
475 $ echo unrelated > y |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
476 $ hg add y |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
477 $ hg commit -m 'add x and y' |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
478 $ hg remove y |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
479 $ hg commit -m 'remove y' |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
480 $ hg rename x y |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
481 $ hg commit -m 'rename x to y' |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
482 $ hg checkout -q 0 |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
483 $ echo modified > x |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
484 $ hg commit -m 'modify x' |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
485 created new head |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
486 $ hg l |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
487 @ 3 modify x |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
488 | x |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
489 | o 2 rename x to y |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
490 | | x y |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
491 | o 1 remove y |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
492 |/ y |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
493 o 0 add x and y |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
494 x y |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
495 #if filelog |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
496 $ hg merge 2 |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
497 file 'x' was deleted in other [merge rev] but was modified in local [working copy]. |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
498 You can use (c)hanged version, (d)elete, or leave (u)nresolved. |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
499 What do you want to do? u |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
500 1 files updated, 0 files merged, 0 files removed, 1 files unresolved |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
501 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
502 [1] |
45817
58e7ee23ddbd
copies: handle more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45816
diff
changeset
|
503 This should ideally be "modified", but we will probably not be able to fix |
58e7ee23ddbd
copies: handle more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45816
diff
changeset
|
504 that in the filelog case. |
45816
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
505 $ cat y |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
506 original |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
507 #else |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
508 $ hg merge 2 |
45817
58e7ee23ddbd
copies: handle more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45816
diff
changeset
|
509 merging x and y to y |
58e7ee23ddbd
copies: handle more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45816
diff
changeset
|
510 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
45816
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
511 (branch merge, don't forget to commit) |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
512 $ cat y |
45817
58e7ee23ddbd
copies: handle more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45816
diff
changeset
|
513 modified |
45816
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
514 #endif |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
515 Same as above, but in the opposite direction |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
516 #if filelog |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
517 $ hg co -qC 2 |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
518 $ hg merge 3 |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
519 file 'x' was deleted in local [working copy] but was modified in other [merge rev]. |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
520 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved. |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
521 What do you want to do? u |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
522 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
523 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
524 [1] |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
525 BROKEN: should be "modified" |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
526 $ cat y |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
527 original |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
528 #else |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
529 $ hg co -qC 2 |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
530 $ hg merge 3 |
45817
58e7ee23ddbd
copies: handle more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45816
diff
changeset
|
531 merging y and x to y |
58e7ee23ddbd
copies: handle more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45816
diff
changeset
|
532 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
45816
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
533 (branch merge, don't forget to commit) |
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
534 $ cat y |
45817
58e7ee23ddbd
copies: handle more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45816
diff
changeset
|
535 modified |
45816
4b79e92a5ef8
tests: test more cases where a file got replaced by a copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
45798
diff
changeset
|
536 #endif |
41930
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
537 |
45703
d1c44591e751
tests: add test of copies suggested by Pierre-Yves on D9159
Martin von Zweigbergk <martinvonz@google.com>
parents:
43146
diff
changeset
|
538 Create x and y, then rename x to z on one side of merge, and rename y to z and |
d1c44591e751
tests: add test of copies suggested by Pierre-Yves on D9159
Martin von Zweigbergk <martinvonz@google.com>
parents:
43146
diff
changeset
|
539 then delete z on the other side. |
d1c44591e751
tests: add test of copies suggested by Pierre-Yves on D9159
Martin von Zweigbergk <martinvonz@google.com>
parents:
43146
diff
changeset
|
540 $ newrepo |
d1c44591e751
tests: add test of copies suggested by Pierre-Yves on D9159
Martin von Zweigbergk <martinvonz@google.com>
parents:
43146
diff
changeset
|
541 $ echo x > x |
d1c44591e751
tests: add test of copies suggested by Pierre-Yves on D9159
Martin von Zweigbergk <martinvonz@google.com>
parents:
43146
diff
changeset
|
542 $ echo y > y |
d1c44591e751
tests: add test of copies suggested by Pierre-Yves on D9159
Martin von Zweigbergk <martinvonz@google.com>
parents:
43146
diff
changeset
|
543 $ hg ci -Aqm 'add x and y' |
d1c44591e751
tests: add test of copies suggested by Pierre-Yves on D9159
Martin von Zweigbergk <martinvonz@google.com>
parents:
43146
diff
changeset
|
544 $ hg mv x z |
d1c44591e751
tests: add test of copies suggested by Pierre-Yves on D9159
Martin von Zweigbergk <martinvonz@google.com>
parents:
43146
diff
changeset
|
545 $ hg ci -qm 'rename x to z' |
d1c44591e751
tests: add test of copies suggested by Pierre-Yves on D9159
Martin von Zweigbergk <martinvonz@google.com>
parents:
43146
diff
changeset
|
546 $ hg co -q 0 |
d1c44591e751
tests: add test of copies suggested by Pierre-Yves on D9159
Martin von Zweigbergk <martinvonz@google.com>
parents:
43146
diff
changeset
|
547 $ hg mv y z |
d1c44591e751
tests: add test of copies suggested by Pierre-Yves on D9159
Martin von Zweigbergk <martinvonz@google.com>
parents:
43146
diff
changeset
|
548 $ hg ci -qm 'rename y to z' |
d1c44591e751
tests: add test of copies suggested by Pierre-Yves on D9159
Martin von Zweigbergk <martinvonz@google.com>
parents:
43146
diff
changeset
|
549 $ hg rm z |
d1c44591e751
tests: add test of copies suggested by Pierre-Yves on D9159
Martin von Zweigbergk <martinvonz@google.com>
parents:
43146
diff
changeset
|
550 $ hg ci -m 'delete z' |
d1c44591e751
tests: add test of copies suggested by Pierre-Yves on D9159
Martin von Zweigbergk <martinvonz@google.com>
parents:
43146
diff
changeset
|
551 $ hg merge -q 1 |
d1c44591e751
tests: add test of copies suggested by Pierre-Yves on D9159
Martin von Zweigbergk <martinvonz@google.com>
parents:
43146
diff
changeset
|
552 $ echo z > z |
d1c44591e751
tests: add test of copies suggested by Pierre-Yves on D9159
Martin von Zweigbergk <martinvonz@google.com>
parents:
43146
diff
changeset
|
553 $ hg ci -m 'merge 1 into 3' |
d1c44591e751
tests: add test of copies suggested by Pierre-Yves on D9159
Martin von Zweigbergk <martinvonz@google.com>
parents:
43146
diff
changeset
|
554 Try merging the other direction too |
d1c44591e751
tests: add test of copies suggested by Pierre-Yves on D9159
Martin von Zweigbergk <martinvonz@google.com>
parents:
43146
diff
changeset
|
555 $ hg co -q 1 |
d1c44591e751
tests: add test of copies suggested by Pierre-Yves on D9159
Martin von Zweigbergk <martinvonz@google.com>
parents:
43146
diff
changeset
|
556 $ hg merge -q 3 |
d1c44591e751
tests: add test of copies suggested by Pierre-Yves on D9159
Martin von Zweigbergk <martinvonz@google.com>
parents:
43146
diff
changeset
|
557 $ echo z > z |
d1c44591e751
tests: add test of copies suggested by Pierre-Yves on D9159
Martin von Zweigbergk <martinvonz@google.com>
parents:
43146
diff
changeset
|
558 $ hg ci -m 'merge 3 into 1' |
d1c44591e751
tests: add test of copies suggested by Pierre-Yves on D9159
Martin von Zweigbergk <martinvonz@google.com>
parents:
43146
diff
changeset
|
559 created new head |
d1c44591e751
tests: add test of copies suggested by Pierre-Yves on D9159
Martin von Zweigbergk <martinvonz@google.com>
parents:
43146
diff
changeset
|
560 $ hg l |
d1c44591e751
tests: add test of copies suggested by Pierre-Yves on D9159
Martin von Zweigbergk <martinvonz@google.com>
parents:
43146
diff
changeset
|
561 @ 5 merge 3 into 1 |
d1c44591e751
tests: add test of copies suggested by Pierre-Yves on D9159
Martin von Zweigbergk <martinvonz@google.com>
parents:
43146
diff
changeset
|
562 |\ z |
d1c44591e751
tests: add test of copies suggested by Pierre-Yves on D9159
Martin von Zweigbergk <martinvonz@google.com>
parents:
43146
diff
changeset
|
563 +---o 4 merge 1 into 3 |
d1c44591e751
tests: add test of copies suggested by Pierre-Yves on D9159
Martin von Zweigbergk <martinvonz@google.com>
parents:
43146
diff
changeset
|
564 | |/ z |
d1c44591e751
tests: add test of copies suggested by Pierre-Yves on D9159
Martin von Zweigbergk <martinvonz@google.com>
parents:
43146
diff
changeset
|
565 | o 3 delete z |
d1c44591e751
tests: add test of copies suggested by Pierre-Yves on D9159
Martin von Zweigbergk <martinvonz@google.com>
parents:
43146
diff
changeset
|
566 | | z |
d1c44591e751
tests: add test of copies suggested by Pierre-Yves on D9159
Martin von Zweigbergk <martinvonz@google.com>
parents:
43146
diff
changeset
|
567 | o 2 rename y to z |
d1c44591e751
tests: add test of copies suggested by Pierre-Yves on D9159
Martin von Zweigbergk <martinvonz@google.com>
parents:
43146
diff
changeset
|
568 | | y z |
d1c44591e751
tests: add test of copies suggested by Pierre-Yves on D9159
Martin von Zweigbergk <martinvonz@google.com>
parents:
43146
diff
changeset
|
569 o | 1 rename x to z |
d1c44591e751
tests: add test of copies suggested by Pierre-Yves on D9159
Martin von Zweigbergk <martinvonz@google.com>
parents:
43146
diff
changeset
|
570 |/ x z |
d1c44591e751
tests: add test of copies suggested by Pierre-Yves on D9159
Martin von Zweigbergk <martinvonz@google.com>
parents:
43146
diff
changeset
|
571 o 0 add x and y |
d1c44591e751
tests: add test of copies suggested by Pierre-Yves on D9159
Martin von Zweigbergk <martinvonz@google.com>
parents:
43146
diff
changeset
|
572 x y |
d1c44591e751
tests: add test of copies suggested by Pierre-Yves on D9159
Martin von Zweigbergk <martinvonz@google.com>
parents:
43146
diff
changeset
|
573 $ hg debugpathcopies 1 4 |
d1c44591e751
tests: add test of copies suggested by Pierre-Yves on D9159
Martin von Zweigbergk <martinvonz@google.com>
parents:
43146
diff
changeset
|
574 $ hg debugpathcopies 2 4 |
d1c44591e751
tests: add test of copies suggested by Pierre-Yves on D9159
Martin von Zweigbergk <martinvonz@google.com>
parents:
43146
diff
changeset
|
575 x -> z (no-filelog !) |
d1c44591e751
tests: add test of copies suggested by Pierre-Yves on D9159
Martin von Zweigbergk <martinvonz@google.com>
parents:
43146
diff
changeset
|
576 $ hg debugpathcopies 0 4 |
45798
ff7e0ca666e8
copies: make sure deleted copy info do not overwriting unrelated ones
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
45771
diff
changeset
|
577 x -> z (no-changeset no-compatibility !) |
45703
d1c44591e751
tests: add test of copies suggested by Pierre-Yves on D9159
Martin von Zweigbergk <martinvonz@google.com>
parents:
43146
diff
changeset
|
578 $ hg debugpathcopies 1 5 |
d1c44591e751
tests: add test of copies suggested by Pierre-Yves on D9159
Martin von Zweigbergk <martinvonz@google.com>
parents:
43146
diff
changeset
|
579 $ hg debugpathcopies 2 5 |
d1c44591e751
tests: add test of copies suggested by Pierre-Yves on D9159
Martin von Zweigbergk <martinvonz@google.com>
parents:
43146
diff
changeset
|
580 x -> z (no-filelog !) |
d1c44591e751
tests: add test of copies suggested by Pierre-Yves on D9159
Martin von Zweigbergk <martinvonz@google.com>
parents:
43146
diff
changeset
|
581 $ hg debugpathcopies 0 5 |
d1c44591e751
tests: add test of copies suggested by Pierre-Yves on D9159
Martin von Zweigbergk <martinvonz@google.com>
parents:
43146
diff
changeset
|
582 x -> z |
d1c44591e751
tests: add test of copies suggested by Pierre-Yves on D9159
Martin von Zweigbergk <martinvonz@google.com>
parents:
43146
diff
changeset
|
583 |
d1c44591e751
tests: add test of copies suggested by Pierre-Yves on D9159
Martin von Zweigbergk <martinvonz@google.com>
parents:
43146
diff
changeset
|
584 |
42272
cbff7f996dc4
tests: avoid the word "dirty" to mean "not a descendant of merge base"
Martin von Zweigbergk <martinvonz@google.com>
parents:
42222
diff
changeset
|
585 Test for a case in fullcopytracing algorithm where neither of the merging csets |
cbff7f996dc4
tests: avoid the word "dirty" to mean "not a descendant of merge base"
Martin von Zweigbergk <martinvonz@google.com>
parents:
42222
diff
changeset
|
586 is a descendant of the merge base. This test reflects that the algorithm |
cbff7f996dc4
tests: avoid the word "dirty" to mean "not a descendant of merge base"
Martin von Zweigbergk <martinvonz@google.com>
parents:
42222
diff
changeset
|
587 correctly finds the copies: |
41930
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
588 |
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
589 $ cat >> $HGRCPATH << EOF |
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
590 > [experimental] |
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
591 > evolution.createmarkers=True |
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
592 > evolution.allowunstable=True |
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
593 > EOF |
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
594 |
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
595 $ newrepo |
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
596 $ echo a > a |
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
597 $ hg add a |
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
598 $ hg ci -m "added a" |
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
599 $ echo b > b |
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
600 $ hg add b |
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
601 $ hg ci -m "added b" |
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
602 |
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
603 $ hg mv b b1 |
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
604 $ hg ci -m "rename b to b1" |
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
605 |
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
606 $ hg up ".^" |
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
607 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
608 $ echo d > d |
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
609 $ hg add d |
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
610 $ hg ci -m "added d" |
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
611 created new head |
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
612 |
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
613 $ echo baba >> b |
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
614 $ hg ci --amend -m "added d, modified b" |
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
615 |
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
616 $ hg l --hidden |
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
617 @ 4 added d, modified b |
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
618 | b d |
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
619 | x 3 added d |
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
620 |/ d |
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
621 | o 2 rename b to b1 |
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
622 |/ b b1 |
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
623 o 1 added b |
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
624 | b |
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
625 o 0 added a |
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
626 a |
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
627 |
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
628 Grafting revision 4 on top of revision 2, showing that it respect the rename: |
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
629 |
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
630 $ hg up 2 -q |
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
631 $ hg graft -r 4 --base 3 --hidden |
42406
f385ba70e4af
changelog: optionally store added and removed files in changeset extras
Martin von Zweigbergk <martinvonz@google.com>
parents:
42272
diff
changeset
|
632 grafting 4:af28412ec03c "added d, modified b" (tip) (no-changeset !) |
f385ba70e4af
changelog: optionally store added and removed files in changeset extras
Martin von Zweigbergk <martinvonz@google.com>
parents:
42272
diff
changeset
|
633 grafting 4:6325ca0b7a1c "added d, modified b" (tip) (changeset !) |
41930
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
634 merging b1 and b to b1 |
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
635 |
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
636 $ hg l -l1 -p |
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
637 @ 5 added d, modified b |
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
638 | b1 |
42222
57203e0210f8
copies: calculate mergecopies() based on pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
42142
diff
changeset
|
639 ~ diff -r 5a4825cc2926 -r 94a2f1a0e8e2 b1 (no-changeset !) |
42426
a1f87294471f
copies: also encode p[12]copies destination as index into "files" list
Martin von Zweigbergk <martinvonz@google.com>
parents:
42406
diff
changeset
|
640 ~ diff -r 0a0ed3b3251c -r d544fb655520 b1 (changeset !) |
41930
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
641 --- a/b1 Thu Jan 01 00:00:00 1970 +0000 |
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
642 +++ b/b1 Thu Jan 01 00:00:00 1970 +0000 |
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
643 @@ -1,1 +1,2 @@ |
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
644 b |
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
645 +baba |
cbdd2b56d4c3
copies: add test that makes both the merging csets dirty and run w/o error
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41756
diff
changeset
|
646 |
42272
cbff7f996dc4
tests: avoid the word "dirty" to mean "not a descendant of merge base"
Martin von Zweigbergk <martinvonz@google.com>
parents:
42222
diff
changeset
|
647 Test to make sure that fullcopytracing algorithm doesn't fail when neither of the |
cbff7f996dc4
tests: avoid the word "dirty" to mean "not a descendant of merge base"
Martin von Zweigbergk <martinvonz@google.com>
parents:
42222
diff
changeset
|
648 merging csets is a descendant of the base. |
41932
7694b685bb10
copies: handle a case when both merging csets are not descendant of merge base
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41931
diff
changeset
|
649 ------------------------------------------------------------------------------------------------- |
41931
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
650 |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
651 $ newrepo |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
652 $ echo a > a |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
653 $ hg add a |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
654 $ hg ci -m "added a" |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
655 $ echo b > b |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
656 $ hg add b |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
657 $ hg ci -m "added b" |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
658 |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
659 $ echo foobar > willconflict |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
660 $ hg add willconflict |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
661 $ hg ci -m "added willconflict" |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
662 $ echo c > c |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
663 $ hg add c |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
664 $ hg ci -m "added c" |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
665 |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
666 $ hg l |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
667 @ 3 added c |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
668 | c |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
669 o 2 added willconflict |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
670 | willconflict |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
671 o 1 added b |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
672 | b |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
673 o 0 added a |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
674 a |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
675 |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
676 $ hg up ".^^" |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
677 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
678 $ echo d > d |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
679 $ hg add d |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
680 $ hg ci -m "added d" |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
681 created new head |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
682 |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
683 $ echo barfoo > willconflict |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
684 $ hg add willconflict |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
685 $ hg ci --amend -m "added willconflict and d" |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
686 |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
687 $ hg l |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
688 @ 5 added willconflict and d |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
689 | d willconflict |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
690 | o 3 added c |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
691 | | c |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
692 | o 2 added willconflict |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
693 |/ willconflict |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
694 o 1 added b |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
695 | b |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
696 o 0 added a |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
697 a |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
698 |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
699 $ hg rebase -r . -d 2 -t :other |
45771
f90a5c211251
rebase: change and standarize template for rebase's one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents:
45703
diff
changeset
|
700 rebasing 5:5018b1509e94 tip "added willconflict and d" (no-changeset !) |
f90a5c211251
rebase: change and standarize template for rebase's one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents:
45703
diff
changeset
|
701 rebasing 5:af8d273bf580 tip "added willconflict and d" (changeset !) |
41931
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
702 |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
703 $ hg up 3 -q |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
704 $ hg l --hidden |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
705 o 6 added willconflict and d |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
706 | d willconflict |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
707 | x 5 added willconflict and d |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
708 | | d willconflict |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
709 | | x 4 added d |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
710 | |/ d |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
711 +---@ 3 added c |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
712 | | c |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
713 o | 2 added willconflict |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
714 |/ willconflict |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
715 o 1 added b |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
716 | b |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
717 o 0 added a |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
718 a |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
719 |
42272
cbff7f996dc4
tests: avoid the word "dirty" to mean "not a descendant of merge base"
Martin von Zweigbergk <martinvonz@google.com>
parents:
42222
diff
changeset
|
720 Now if we trigger a merge between revision 3 and 6 using base revision 4, |
cbff7f996dc4
tests: avoid the word "dirty" to mean "not a descendant of merge base"
Martin von Zweigbergk <martinvonz@google.com>
parents:
42222
diff
changeset
|
721 neither of the merging csets will be a descendant of the base revision: |
41931
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
722 |
41932
7694b685bb10
copies: handle a case when both merging csets are not descendant of merge base
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41931
diff
changeset
|
723 $ hg graft -r 6 --base 4 --hidden -t :other |
42406
f385ba70e4af
changelog: optionally store added and removed files in changeset extras
Martin von Zweigbergk <martinvonz@google.com>
parents:
42272
diff
changeset
|
724 grafting 6:99802e4f1e46 "added willconflict and d" (tip) (no-changeset !) |
42427
027f1567f97f
copies: separate added/removed files by newline instead of null
Martin von Zweigbergk <martinvonz@google.com>
parents:
42426
diff
changeset
|
725 grafting 6:b19f0df72728 "added willconflict and d" (tip) (changeset !) |