Mercurial > hg
annotate tests/test-copies-unrelated.t @ 48831:40e35034eac8
setup: unconditionally do this python 3 step
Differential Revision: https://phab.mercurial-scm.org/D12275
author | Augie Fackler <augie@google.com> |
---|---|
date | Wed, 02 Mar 2022 10:13:09 -0500 |
parents | 16c361152133 |
children |
rev | line source |
---|---|
43140
12b8a2ef8d04
sidedatacopies: introduce a sidedata testcase for test-copies-unrelated.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
42595
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 |
43140
12b8a2ef8d04
sidedatacopies: introduce a sidedata testcase for test-copies-unrelated.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
42595
diff
changeset
|
25 #if sidedata |
12b8a2ef8d04
sidedatacopies: introduce a sidedata testcase for test-copies-unrelated.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
42595
diff
changeset
|
26 $ cat >> $HGRCPATH << EOF |
12b8a2ef8d04
sidedatacopies: introduce a sidedata testcase for test-copies-unrelated.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
42595
diff
changeset
|
27 > [format] |
12b8a2ef8d04
sidedatacopies: introduce a sidedata testcase for test-copies-unrelated.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
42595
diff
changeset
|
28 > exp-use-copies-side-data-changeset = yes |
12b8a2ef8d04
sidedatacopies: introduce a sidedata testcase for test-copies-unrelated.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
42595
diff
changeset
|
29 > EOF |
12b8a2ef8d04
sidedatacopies: introduce a sidedata testcase for test-copies-unrelated.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
42595
diff
changeset
|
30 #endif |
12b8a2ef8d04
sidedatacopies: introduce a sidedata testcase for test-copies-unrelated.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
42595
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 Copy a file, then delete destination, then copy again. This does not create a new filelog entry. |
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' |
42590
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
44 $ echo x2 > x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
45 $ hg ci -m 'modify x' |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
46 $ hg co -q 0 |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
47 $ hg cp x y |
42590
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
48 $ hg ci -qm 'copy x to y' |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
49 $ hg rm y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
50 $ hg ci -m 'remove y' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
51 $ hg cp -f x y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
52 $ hg ci -m 'copy x onto y (again)' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
53 $ hg l |
42590
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
54 @ 4 copy x onto y (again) |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
55 | y |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
56 o 3 remove y |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
57 | y |
42590
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
58 o 2 copy x to y |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
59 | y |
42590
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
60 | o 1 modify x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
61 |/ x |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
62 o 0 add x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
63 x |
42590
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
64 $ hg debugp1copies -r 4 |
41755
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
65 x -> y |
42590
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
66 $ hg debugpathcopies 0 4 |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
67 x -> y |
42590
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
68 $ hg graft -r 1 |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
69 grafting 1:* "modify x" (glob) |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
70 merging y and x to y |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
71 $ hg co -qC 1 |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
72 $ hg graft -r 4 |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
73 grafting 4:* "copy x onto y (again)" (glob) |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
74 merging x and y to y |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
75 |
42590
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
76 Copy x to y, then remove y, then add back y. With copy metadata in the |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
77 changeset, this could easily end up reporting y as copied from x (if we don't |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
78 unmark it as a copy when it's removed). Despite x and y not being related, we |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
79 want grafts to propagate across the rename. |
41751
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 $ hg ci -Aqm 'add x' |
42590
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
83 $ echo x2 > x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
84 $ hg ci -m 'modify x' |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
85 $ hg co -q 0 |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
86 $ hg mv x y |
42590
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
87 $ hg ci -qm 'rename x to y' |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
88 $ hg rm y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
89 $ hg ci -qm 'remove y' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
90 $ echo x > y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
91 $ hg ci -Aqm 'add back y' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
92 $ hg l |
42590
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
93 @ 4 add back y |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
94 | y |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
95 o 3 remove y |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
96 | y |
42590
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
97 o 2 rename x to y |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
98 | x y |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
99 | o 1 modify x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
100 |/ x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
101 o 0 add x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
102 x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
103 $ hg debugpathcopies 0 4 |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
104 BROKEN: This should succeed and merge the changes from x into y |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
105 $ hg graft -r 1 |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
106 grafting 1:* "modify x" (glob) |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
107 file 'x' was deleted in local [local] but was modified in other [graft]. |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
108 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved. |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
109 What do you want to do? u |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
110 abort: unresolved conflicts, can't continue |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
111 (use 'hg resolve' and 'hg graft --continue') |
44725
16c361152133
graft: exit 1 on conflicts, like merge
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
43298
diff
changeset
|
112 [1] |
42590
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
113 |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
114 Add x, remove it, then add it back, then rename x to y. Similar to the case |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
115 above, but here the break in history is before the rename. |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
116 $ newrepo |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
117 $ echo x > x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
118 $ hg ci -Aqm 'add x' |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
119 $ echo x2 > x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
120 $ hg ci -m 'modify x' |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
121 $ hg co -q 0 |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
122 $ hg rm x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
123 $ hg ci -qm 'remove x' |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
124 $ echo x > x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
125 $ hg ci -Aqm 'add x again' |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
126 $ hg mv x y |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
127 $ hg ci -m 'rename x to y' |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
128 $ hg l |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
129 @ 4 rename x to y |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
130 | x y |
42590
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
131 o 3 add x again |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
132 | x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
133 o 2 remove x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
134 | x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
135 | o 1 modify x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
136 |/ x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
137 o 0 add x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
138 x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
139 $ hg debugpathcopies 0 4 |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
140 x -> y |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
141 $ hg graft -r 1 |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
142 grafting 1:* "modify x" (glob) |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
143 merging y and x to y |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
144 $ hg co -qC 1 |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
145 $ hg graft -r 4 |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
146 grafting 4:* "rename x to y" (glob) |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
147 merging x and y to y |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
148 |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
149 Add x, modify it, remove it, then add it back, then rename x to y. Similar to |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
150 the case above, but here the re-added file's nodeid is different from before |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
151 the break. |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
152 |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
153 $ newrepo |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
154 $ echo x > x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
155 $ hg ci -Aqm 'add x' |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
156 $ echo x2 > x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
157 $ hg ci -m 'modify x' |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
158 $ echo x3 > x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
159 $ hg ci -qm 'modify x again' |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
160 $ hg co -q 1 |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
161 $ hg rm x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
162 $ hg ci -qm 'remove x' |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
163 # Same content to avoid conflicts |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
164 $ hg revert -r 1 x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
165 $ hg ci -Aqm 'add x again' |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
166 $ hg mv x y |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
167 $ hg ci -m 'rename x to y' |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
168 $ hg l |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
169 @ 5 rename x to y |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
170 | x y |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
171 o 4 add x again |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
172 | x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
173 o 3 remove x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
174 | x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
175 | o 2 modify x again |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
176 |/ x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
177 o 1 modify x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
178 | x |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
179 o 0 add x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
180 x |
42590
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
181 $ hg debugpathcopies 0 5 |
43146
0171483b082f
sidedatacopies: read rename information from sidedata
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43140
diff
changeset
|
182 x -> y (no-filelog !) |
0171483b082f
sidedatacopies: read rename information from sidedata
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43140
diff
changeset
|
183 #if no-filelog |
42590
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
184 $ hg graft -r 2 |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
185 grafting 2:* "modify x again" (glob) |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
186 merging y and x to y |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
187 #else |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
188 BROKEN: This should succeed and merge the changes from x into y |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
189 $ hg graft -r 2 |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
190 grafting 2:* "modify x again" (glob) |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
191 file 'x' was deleted in local [local] but was modified in other [graft]. |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
192 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved. |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
193 What do you want to do? u |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
194 abort: unresolved conflicts, can't continue |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
195 (use 'hg resolve' and 'hg graft --continue') |
44725
16c361152133
graft: exit 1 on conflicts, like merge
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
43298
diff
changeset
|
196 [1] |
42590
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
197 #endif |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
198 $ hg co -qC 2 |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
199 BROKEN: This should succeed and merge the changes from x into y |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
200 $ hg graft -r 5 |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
201 grafting 5:* "rename x to y"* (glob) |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
202 file 'x' was deleted in other [graft] but was modified in local [local]. |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
203 You can use (c)hanged version, (d)elete, or leave (u)nresolved. |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
204 What do you want to do? u |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
205 abort: unresolved conflicts, can't continue |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
206 (use 'hg resolve' and 'hg graft --continue') |
44725
16c361152133
graft: exit 1 on conflicts, like merge
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
43298
diff
changeset
|
207 [1] |
42590
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
208 |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
209 Add x, remove it, then add it back, rename x to y from the first commit. |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
210 Similar to the case above, but here the break in history is parallel to the |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
211 rename. |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
212 $ newrepo |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
213 $ echo x > x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
214 $ hg ci -Aqm 'add x' |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
215 $ hg rm x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
216 $ hg ci -qm 'remove x' |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
217 $ echo x > x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
218 $ hg ci -Aqm 'add x again' |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
219 $ echo x2 > x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
220 $ hg ci -m 'modify x' |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
221 $ hg co -q 0 |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
222 $ hg mv x y |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
223 $ hg ci -qm 'rename x to y' |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
224 $ hg l |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
225 @ 4 rename x to y |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
226 | x y |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
227 | o 3 modify x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
228 | | x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
229 | o 2 add x again |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
230 | | x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
231 | o 1 remove x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
232 |/ x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
233 o 0 add x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
234 x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
235 $ hg debugpathcopies 2 4 |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
236 x -> y |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
237 $ hg graft -r 3 |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
238 grafting 3:* "modify x" (glob) |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
239 merging y and x to y |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
240 $ hg co -qC 3 |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
241 $ hg graft -r 4 |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
242 grafting 4:* "rename x to y" (glob) |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
243 merging x and y to y |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
244 |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
245 Add x, remove it, then add it back, rename x to y from the first commit. |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
246 Similar to the case above, but here the re-added file's nodeid is different |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
247 from the base. |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
248 $ newrepo |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
249 $ echo x > x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
250 $ hg ci -Aqm 'add x' |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
251 $ hg rm x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
252 $ hg ci -qm 'remove x' |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
253 $ echo x2 > x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
254 $ hg ci -Aqm 'add x again with different content' |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
255 $ hg co -q 0 |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
256 $ hg mv x y |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
257 $ hg ci -qm 'rename x to y' |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
258 $ hg l |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
259 @ 3 rename x to y |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
260 | x y |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
261 | o 2 add x again with different content |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
262 | | x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
263 | o 1 remove x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
264 |/ x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
265 o 0 add x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
266 x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
267 $ hg debugpathcopies 2 3 |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
268 x -> y |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
269 BROKEN: This should merge the changes from x into y |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
270 $ hg graft -r 2 |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
271 grafting 2:* "add x again with different content" (glob) |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
272 $ hg co -qC 2 |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
273 BROKEN: This should succeed and merge the changes from x into y |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
274 $ hg graft -r 3 |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
275 grafting 3:* "rename x to y" (glob) |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
276 file 'x' was deleted in other [graft] but was modified in local [local]. |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
277 You can use (c)hanged version, (d)elete, or leave (u)nresolved. |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
278 What do you want to do? u |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
279 abort: unresolved conflicts, can't continue |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
280 (use 'hg resolve' and 'hg graft --continue') |
44725
16c361152133
graft: exit 1 on conflicts, like merge
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
43298
diff
changeset
|
281 [1] |
42590
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
282 |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
283 Add x on two branches, then rename x to y on one side. Similar to the case |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
284 above, but here the break in history is via the base commit. |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
285 $ newrepo |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
286 $ echo a > a |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
287 $ hg ci -Aqm 'base' |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
288 $ echo x > x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
289 $ hg ci -Aqm 'add x' |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
290 $ echo x2 > x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
291 $ hg ci -m 'modify x' |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
292 $ hg co -q 0 |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
293 $ echo x > x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
294 $ hg ci -Aqm 'add x again' |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
295 $ hg mv x y |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
296 $ hg ci -qm 'rename x to y' |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
297 $ hg l |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
298 @ 4 rename x to y |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
299 | x y |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
300 o 3 add x again |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
301 | x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
302 | o 2 modify x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
303 | | x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
304 | o 1 add x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
305 |/ x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
306 o 0 base |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
307 a |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
308 $ hg debugpathcopies 1 4 |
42595
819712deac69
copies: follow copies across merge base without source file (issue6163)
Martin von Zweigbergk <martinvonz@google.com>
parents:
42594
diff
changeset
|
309 x -> y |
42594
d013099c551b
copies: filter invalid copies only at end of pathcopies() (issue6163)
Martin von Zweigbergk <martinvonz@google.com>
parents:
42590
diff
changeset
|
310 $ hg graft -r 2 |
d013099c551b
copies: filter invalid copies only at end of pathcopies() (issue6163)
Martin von Zweigbergk <martinvonz@google.com>
parents:
42590
diff
changeset
|
311 grafting 2:* "modify x" (glob) |
d013099c551b
copies: filter invalid copies only at end of pathcopies() (issue6163)
Martin von Zweigbergk <martinvonz@google.com>
parents:
42590
diff
changeset
|
312 merging y and x to y |
42590
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
313 $ hg co -qC 2 |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
314 $ hg graft -r 4 |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
315 grafting 4:* "rename x to y"* (glob) |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
316 merging x and y to y |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
317 |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
318 Add x on two branches, with same content but different history, then rename x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
319 to y on one side. Similar to the case above, here the file's nodeid is |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
320 different between the branches. |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
321 $ newrepo |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
322 $ echo a > a |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
323 $ hg ci -Aqm 'base' |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
324 $ echo x > x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
325 $ hg ci -Aqm 'add x' |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
326 $ echo x2 > x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
327 $ hg ci -m 'modify x' |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
328 $ hg co -q 0 |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
329 $ touch x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
330 $ hg ci -Aqm 'add empty x' |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
331 # Same content to avoid conflicts |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
332 $ hg revert -r 1 x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
333 $ hg ci -m 'modify x to match commit 1' |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
334 $ hg mv x y |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
335 $ hg ci -qm 'rename x to y' |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
336 $ hg l |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
337 @ 5 rename x to y |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
338 | x y |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
339 o 4 modify x to match commit 1 |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
340 | x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
341 o 3 add empty x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
342 | x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
343 | o 2 modify x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
344 | | x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
345 | o 1 add x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
346 |/ x |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
347 o 0 base |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
348 a |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
349 $ hg debugpathcopies 1 5 |
43146
0171483b082f
sidedatacopies: read rename information from sidedata
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43140
diff
changeset
|
350 x -> y (no-filelog !) |
0171483b082f
sidedatacopies: read rename information from sidedata
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43140
diff
changeset
|
351 #if no-filelog |
43140
12b8a2ef8d04
sidedatacopies: introduce a sidedata testcase for test-copies-unrelated.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
42595
diff
changeset
|
352 $ hg graft -r 2 |
12b8a2ef8d04
sidedatacopies: introduce a sidedata testcase for test-copies-unrelated.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
42595
diff
changeset
|
353 grafting 2:* "modify x" (glob) |
12b8a2ef8d04
sidedatacopies: introduce a sidedata testcase for test-copies-unrelated.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
42595
diff
changeset
|
354 merging y and x to y |
12b8a2ef8d04
sidedatacopies: introduce a sidedata testcase for test-copies-unrelated.t
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
42595
diff
changeset
|
355 #else |
42590
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
356 BROKEN: This should succeed and merge the changes from x into y |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
357 $ hg graft -r 2 |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
358 grafting 2:* "modify x" (glob) |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
359 file 'x' was deleted in local [local] but was modified in other [graft]. |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
360 You can use (c)hanged version, leave (d)eleted, or leave (u)nresolved. |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
361 What do you want to do? u |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
362 abort: unresolved conflicts, can't continue |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
363 (use 'hg resolve' and 'hg graft --continue') |
44725
16c361152133
graft: exit 1 on conflicts, like merge
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
43298
diff
changeset
|
364 [1] |
42594
d013099c551b
copies: filter invalid copies only at end of pathcopies() (issue6163)
Martin von Zweigbergk <martinvonz@google.com>
parents:
42590
diff
changeset
|
365 #endif |
42590
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
366 $ hg co -qC 2 |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
367 BROKEN: This should succeed and merge the changes from x into y |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
368 $ hg graft -r 5 |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
369 grafting 5:* "rename x to y"* (glob) |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
370 file 'x' was deleted in other [graft] but was modified in local [local]. |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
371 You can use (c)hanged version, (d)elete, or leave (u)nresolved. |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
372 What do you want to do? u |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
373 abort: unresolved conflicts, can't continue |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
374 (use 'hg resolve' and 'hg graft --continue') |
44725
16c361152133
graft: exit 1 on conflicts, like merge
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
43298
diff
changeset
|
375 [1] |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
376 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
377 Copies via null revision (there shouldn't be any) |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
378 $ newrepo |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
379 $ echo x > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
380 $ hg ci -Aqm 'add x' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
381 $ hg cp x y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
382 $ hg ci -m 'copy x to y' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
383 $ hg co -q null |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
384 $ echo x > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
385 $ hg ci -Aqm 'add x (again)' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
386 $ hg l |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
387 @ 2 add x (again) |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
388 x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
389 o 1 copy x to y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
390 | y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
391 o 0 add x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
392 x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
393 $ hg debugpathcopies 1 2 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
394 $ hg debugpathcopies 2 1 |
42590
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
395 $ hg graft -r 1 |
ab416b5d9b91
tests: add more tests of copy tracing with removed and re-added files
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
396 grafting 1:* "copy x to y" (glob) |
43298
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
397 |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
398 Copies involving a merge of multiple roots. |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
399 |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
400 $ newrepo |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
401 $ echo a > a |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
402 $ hg ci -Aqm 'add a' |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
403 $ echo a >> a |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
404 $ hg ci -Aqm 'update a' |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
405 $ echo a >> a |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
406 $ hg ci -Aqm 'update a' |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
407 |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
408 $ hg up null |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
409 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
410 $ echo b > a |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
411 $ hg ci -Aqm 'add a' |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
412 $ hg mv a b |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
413 $ hg ci -Aqm 'move a to b' |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
414 $ echo b >> b |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
415 $ hg ci -Aqm 'update b' |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
416 $ hg merge 0 |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
417 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
418 (branch merge, don't forget to commit) |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
419 $ hg ci -m "merge with other branch" |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
420 $ echo a >> a |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
421 $ echo a >> a |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
422 $ echo b >> b |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
423 $ hg ci -Aqm 'update a and b' |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
424 $ hg l |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
425 @ 7 update a and b |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
426 | a b |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
427 o 6 merge with other branch |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
428 |\ |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
429 | o 5 update b |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
430 | | b |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
431 | o 4 move a to b |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
432 | | a b |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
433 | o 3 add a |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
434 | a |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
435 | o 2 update a |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
436 | | a |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
437 | o 1 update a |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
438 |/ a |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
439 o 0 add a |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
440 a |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
441 $ hg cat a -r 7 |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
442 a |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
443 a |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
444 a |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
445 $ hg cat a -r 2 |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
446 a |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
447 a |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
448 a |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
449 $ hg cat a -r 0 |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
450 a |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
451 $ hg debugpathcopies 7 2 |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
452 $ hg debugpathcopies 2 7 |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
453 $ hg merge 2 |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
454 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
455 (branch merge, don't forget to commit) |
dda9482f60d2
copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
43146
diff
changeset
|
456 |