Mercurial > hg
annotate tests/test-copies.t @ 42742:334c1ea57136
discovery: new devel.discovery.randomize option
By default, this is True, but setting it to False is a uniform
way to kill all randomness in integration tests such as test-setdiscovery.t
By "uniform" we mean that it can be passed to implementations in other
languages, for which the monkey-patching of random.sample would be
irrelevant.
In the above mentioned test file, we use it right away,
replacing the adhoc extension that had the same purpose, and to derandomize a
case with many round-trips, that we'll need to behave uniformly in the Rust
version.
Differential Revision: https://phab.mercurial-scm.org/D6427
author | Georges Racinet <georges.racinet@octobus.net> |
---|---|
date | Tue, 21 May 2019 17:44:15 +0200 |
parents | 8c5a36805d5d |
children | f78ad4caa5ad |
rev | line source |
---|---|
42142
5382d8f8530b
changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents:
41932
diff
changeset
|
1 #testcases filelog compatibility changeset |
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 |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
25 $ REPONUM=0 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
26 $ newrepo() { |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
27 > cd $TESTTMP |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
28 > REPONUM=`expr $REPONUM + 1` |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
29 > hg init repo-$REPONUM |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
30 > cd repo-$REPONUM |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
31 > } |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
32 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
33 Simple rename case |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
34 $ newrepo |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
35 $ echo x > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
36 $ hg ci -Aqm 'add x' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
37 $ 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
|
38 $ hg debugp1copies |
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
39 x -> y |
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
40 $ hg debugp2copies |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
41 $ hg ci -m 'rename x to y' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
42 $ hg l |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
43 @ 1 rename x to y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
44 | x y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
45 o 0 add x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
46 x |
41755
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
47 $ 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
|
48 x -> y |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
49 $ hg debugpathcopies 0 1 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
50 x -> y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
51 $ hg debugpathcopies 1 0 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
52 y -> x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
53 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
|
54 $ hg debugpathcopies 0 1 x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
55 $ hg debugpathcopies 1 0 x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
56 y -> x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
57 $ hg debugpathcopies 0 1 y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
58 x -> y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
59 $ hg debugpathcopies 1 0 y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
60 |
42645
8c5a36805d5d
copies: fix crash on in changeset-centric tracing from commit to itself
Martin von Zweigbergk <martinvonz@google.com>
parents:
42621
diff
changeset
|
61 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
|
62 $ newrepo |
8c5a36805d5d
copies: fix crash on in changeset-centric tracing from commit to itself
Martin von Zweigbergk <martinvonz@google.com>
parents:
42621
diff
changeset
|
63 $ 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
|
64 $ 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
|
65 $ 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
|
66 $ 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
|
67 $ 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
|
68 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
|
69 $ 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
|
70 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
|
71 |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
72 Copy a file onto another file |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
73 $ newrepo |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
74 $ echo x > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
75 $ echo y > y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
76 $ hg ci -Aqm 'add x and y' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
77 $ 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
|
78 $ hg debugp1copies |
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
79 x -> y |
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
80 $ hg debugp2copies |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
81 $ hg ci -m 'copy x onto y' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
82 $ hg l |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
83 @ 1 copy x onto y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
84 | y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
85 o 0 add x and y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
86 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
|
87 $ 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
|
88 x -> y |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
89 Incorrectly doesn't show the rename |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
90 $ hg debugpathcopies 0 1 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
91 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
92 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
|
93 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
|
94 $ newrepo |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
95 $ echo x > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
96 $ echo x > x2 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
97 $ 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
|
98 $ hg cp -f x x2 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
99 $ hg ci -m 'copy x onto x2' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
100 $ hg l |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
101 @ 1 copy x onto x2 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
102 | x2 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
103 o 0 add x and x2 with same content |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
104 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
|
105 $ 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
|
106 x -> x2 |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
107 Incorrectly doesn't show the rename |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
108 $ hg debugpathcopies 0 1 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
109 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
110 Rename file in a loop: x->y->z->x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
111 $ newrepo |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
112 $ echo x > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
113 $ hg ci -Aqm 'add x' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
114 $ 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
|
115 $ hg debugp1copies |
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
116 x -> y |
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
117 $ hg debugp2copies |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
118 $ hg ci -m 'rename x to y' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
119 $ hg mv y z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
120 $ hg ci -m 'rename y to z' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
121 $ hg mv z x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
122 $ hg ci -m 'rename z to x' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
123 $ hg l |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
124 @ 3 rename z to x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
125 | x z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
126 o 2 rename y to z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
127 | y z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
128 o 1 rename x to y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
129 | x y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
130 o 0 add x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
131 x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
132 $ hg debugpathcopies 0 3 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
133 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
134 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
|
135 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
|
136 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
|
137 $ newrepo |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
138 $ echo x > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
139 $ echo x > x2 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
140 $ 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
|
141 $ hg cp x z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
142 $ hg ci -qm 'copy x to z' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
143 $ hg rm z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
144 $ hg ci -m 'remove z' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
145 $ hg cp x2 z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
146 $ hg ci -m 'copy x2 to z' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
147 $ hg l |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
148 @ 3 copy x2 to z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
149 | z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
150 o 2 remove z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
151 | z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
152 o 1 copy x to z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
153 | z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
154 o 0 add x and x2 with same content |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
155 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
|
156 $ 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
|
157 x2 -> z |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
158 $ hg debugpathcopies 0 3 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
159 x2 -> z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
160 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
161 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
|
162 $ newrepo |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
163 $ echo x > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
164 $ echo y > y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
165 $ hg ci -Aqm 'add x and y' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
166 $ hg mv x z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
167 $ hg ci -qm 'rename x to z' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
168 $ hg co -q 0 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
169 $ hg mv y z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
170 $ hg ci -qm 'rename y to z' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
171 $ hg l |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
172 @ 2 rename y to z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
173 | y z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
174 | o 1 rename x to z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
175 |/ x z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
176 o 0 add x and y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
177 x y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
178 $ hg debugpathcopies 1 2 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
179 z -> x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
180 y -> z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
181 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
182 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
|
183 $ newrepo |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
184 $ echo x > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
185 $ hg ci -Aqm 'add x' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
186 $ hg mv x y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
187 $ hg ci -m 'rename x to y' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
188 $ hg co -q 0 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
189 $ hg rm x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
190 $ hg ci -m 'remove x' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
191 created new head |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
192 $ hg l |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
193 @ 2 remove x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
194 | x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
195 | o 1 rename x to y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
196 |/ x y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
197 o 0 add x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
198 x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
199 $ hg debugpathcopies 1 2 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
200 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
201 Merge rename from other branch |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
202 $ newrepo |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
203 $ echo x > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
204 $ hg ci -Aqm 'add x' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
205 $ hg mv x y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
206 $ hg ci -m 'rename x to y' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
207 $ hg co -q 0 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
208 $ echo z > z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
209 $ hg ci -Aqm 'add z' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
210 $ 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
|
211 $ hg debugp1copies |
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
212 $ hg debugp2copies |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
213 $ hg ci -m 'merge rename from p2' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
214 $ hg l |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
215 @ 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
|
216 |\ |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
217 | o 2 add z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
218 | | z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
219 o | 1 rename x to y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
220 |/ x y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
221 o 0 add x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
222 x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
223 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
|
224 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
|
225 $ 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
|
226 $ hg debugp2copies -r 3 |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
227 $ hg debugpathcopies 0 3 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
228 x -> y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
229 $ hg debugpathcopies 1 2 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
230 y -> x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
231 $ hg debugpathcopies 1 3 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
232 $ hg debugpathcopies 2 3 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
233 x -> y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
234 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
235 Copy file from either side in a merge |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
236 $ newrepo |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
237 $ echo x > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
238 $ hg ci -Aqm 'add x' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
239 $ hg co -q null |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
240 $ echo y > y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
241 $ hg ci -Aqm 'add y' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
242 $ hg merge -q 0 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
243 $ 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
|
244 $ hg debugp1copies |
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
245 y -> z |
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
246 $ hg debugp2copies |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
247 $ hg ci -m 'copy file from p1 in merge' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
248 $ hg co -q 1 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
249 $ hg merge -q 0 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
250 $ 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
|
251 $ hg debugp1copies |
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
252 $ hg debugp2copies |
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
253 x -> z |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
254 $ hg ci -qm 'copy file from p2 in merge' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
255 $ hg l |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
256 @ 3 copy file from p2 in merge |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
257 |\ z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
258 +---o 2 copy file from p1 in merge |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
259 | |/ z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
260 | o 1 add y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
261 | y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
262 o 0 add x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
263 x |
41755
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
264 $ 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
|
265 y -> z |
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
266 $ hg debugp2copies -r 2 |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
267 $ hg debugpathcopies 1 2 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
268 y -> z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
269 $ 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
|
270 $ 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
|
271 $ 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
|
272 x -> z |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
273 $ hg debugpathcopies 1 3 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
274 $ hg debugpathcopies 0 3 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
275 x -> z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
276 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
277 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
|
278 $ newrepo |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
279 $ echo x > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
280 $ hg ci -Aqm 'add x on branch 1' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
281 $ hg co -q null |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
282 $ echo x > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
283 $ hg ci -Aqm 'add x on branch 2' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
284 $ hg merge -q 0 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
285 $ 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
|
286 $ hg debugp1copies |
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
287 x -> z |
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
288 $ hg debugp2copies |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
289 $ hg ci -qm 'merge' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
290 $ hg l |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
291 @ 2 merge |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
292 |\ z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
293 | o 1 add x on branch 2 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
294 | x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
295 o 0 add x on branch 1 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
296 x |
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 -r 2 |
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 -r 2 |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
300 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
|
301 $ hg debugpathcopies 1 2 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
302 x -> z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
303 $ 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
|
304 x -> z (filelog !) |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
305 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
306 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
|
307 $ newrepo |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
308 $ echo branch1 > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
309 $ hg ci -Aqm 'add x on branch 1' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
310 $ hg co -q null |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
311 $ echo branch2 > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
312 $ hg ci -Aqm 'add x on branch 2' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
313 $ hg merge -q 0 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
314 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
|
315 [1] |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
316 $ echo resolved > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
317 $ hg resolve -m x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
318 (no more unresolved files) |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
319 $ 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
|
320 $ hg debugp1copies |
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
321 x -> z |
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
322 $ hg debugp2copies |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
323 $ hg ci -qm 'merge' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
324 $ hg l |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
325 @ 2 merge |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
326 |\ x z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
327 | o 1 add x on branch 2 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
328 | x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
329 o 0 add x on branch 1 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
330 x |
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 -r 2 |
42142
5382d8f8530b
changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents:
41932
diff
changeset
|
332 x -> z (changeset !) |
41755
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 -r 2 |
42142
5382d8f8530b
changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents:
41932
diff
changeset
|
334 x -> z (no-changeset !) |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
335 $ hg debugpathcopies 1 2 |
42142
5382d8f8530b
changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents:
41932
diff
changeset
|
336 x -> z (changeset !) |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
337 $ hg debugpathcopies 0 2 |
42142
5382d8f8530b
changelog: parse copy metadata if available in extras
Martin von Zweigbergk <martinvonz@google.com>
parents:
41932
diff
changeset
|
338 x -> z (no-changeset !) |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
339 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
340 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
|
341 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
|
342 $ newrepo |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
343 $ echo x > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
344 $ hg ci -Aqm 'add x' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
345 $ hg cp x y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
346 $ hg ci -qm 'copy x to y' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
347 $ hg co -q 0 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
348 $ hg cp x z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
349 $ hg ci -qm 'copy x to z' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
350 $ hg merge -q 1 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
351 $ 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
|
352 $ hg l |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
353 @ 3 merge copy x->y and copy x->z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
354 |\ |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
355 | o 2 copy x to z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
356 | | z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
357 o | 1 copy x to y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
358 |/ y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
359 o 0 add x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
360 x |
41755
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
361 $ 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
|
362 $ hg debugp2copies -r 3 |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
363 $ hg debugpathcopies 2 3 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
364 x -> y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
365 $ hg debugpathcopies 1 3 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
366 x -> z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
367 |
42594
d013099c551b
copies: filter invalid copies only at end of pathcopies() (issue6163)
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
368 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
|
369 $ newrepo |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
370 $ echo x > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
371 $ hg ci -Aqm 'add x' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
372 $ hg cp x y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
373 $ hg ci -qm 'copy x to y' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
374 $ hg co -q 0 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
375 $ echo y > y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
376 $ hg ci -Aqm 'add y' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
377 $ hg mv y z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
378 $ hg ci -m 'rename y to z' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
379 $ hg merge -q 1 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
380 $ hg ci -m 'merge' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
381 $ hg l |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
382 @ 4 merge |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
383 |\ |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
384 | o 3 rename y to z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
385 | | y z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
386 | o 2 add y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
387 | | y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
388 o | 1 copy x to y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
389 |/ y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
390 o 0 add x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
391 x |
41755
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
392 $ 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
|
393 y -> z |
a4358f7345b4
context: introduce p[12]copies() methods and debugp[12]copies commands
Martin von Zweigbergk <martinvonz@google.com>
parents:
41754
diff
changeset
|
394 $ hg debugp2copies -r 3 |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
395 $ hg debugpathcopies 2 3 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
396 y -> z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
397 $ hg debugpathcopies 1 3 |
42594
d013099c551b
copies: filter invalid copies only at end of pathcopies() (issue6163)
Martin von Zweigbergk <martinvonz@google.com>
parents:
42589
diff
changeset
|
398 y -> z (no-filelog !) |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
399 |
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
|
400 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
|
401 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
|
402 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
|
403 $ newrepo |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
404 $ echo x > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
405 $ echo y > y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
406 $ hg ci -Aqm 'add x and y' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
407 $ hg mv x z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
408 $ hg ci -qm 'rename x to z' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
409 $ hg co -q 0 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
410 $ hg mv y z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
411 $ hg ci -qm 'rename y to z' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
412 $ echo z >> z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
413 $ hg ci -m 'modify z' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
414 $ hg merge -q 1 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
415 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
|
416 [1] |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
417 $ echo z > z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
418 $ hg resolve -qm z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
419 $ hg ci -m 'merge 1 into 3' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
420 Try merging the other direction too |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
421 $ hg co -q 1 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
422 $ hg merge -q 3 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
423 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
|
424 [1] |
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 resolve -qm z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
427 $ hg ci -m 'merge 3 into 1' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
428 created new head |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
429 $ hg l |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
430 @ 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
|
431 |\ z |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
432 +---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
|
433 | |/ z |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
434 | o 3 modify z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
435 | | z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
436 | o 2 rename y to z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
437 | | y z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
438 o | 1 rename x to z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
439 |/ x z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
440 o 0 add x and y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
441 x y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
442 $ hg debugpathcopies 1 4 |
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
|
443 y -> z (no-filelog !) |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
444 $ hg debugpathcopies 2 4 |
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
|
445 x -> z (no-filelog !) |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
446 $ 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
|
447 x -> z (filelog !) |
49ad315b39ee
copies: do copy tracing based on ctx.p[12]copies() if configured
Martin von Zweigbergk <martinvonz@google.com>
parents:
41755
diff
changeset
|
448 y -> z (compatibility !) |
42505
c1850798f995
run-tests: stop matching line for missing feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
42142
diff
changeset
|
449 y -> z (changeset !) |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
450 $ hg debugpathcopies 1 5 |
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
|
451 y -> z (no-filelog !) |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
452 $ hg debugpathcopies 2 5 |
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
|
453 x -> z (no-filelog !) |
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
454 $ hg debugpathcopies 0 5 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
455 x -> z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
456 |
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
|
457 |
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
|
458 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
|
459 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
|
460 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
|
461 |
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
|
462 $ 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
|
463 > [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
|
464 > 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
|
465 > 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
|
466 > 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
|
467 |
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
|
468 $ 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
|
469 $ 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
|
470 $ 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
|
471 $ 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
|
472 $ 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
|
473 $ 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
|
474 $ 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
|
475 |
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
|
476 $ 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
|
477 $ 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
|
478 |
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
|
479 $ 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
|
480 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
|
481 $ 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
|
482 $ 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
|
483 $ 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
|
484 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
|
485 |
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
|
486 $ 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
|
487 $ 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
|
488 |
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
|
489 $ 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
|
490 @ 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
|
491 | 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
|
492 | 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
|
493 |/ 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
|
494 | 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
|
495 |/ 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
|
496 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
|
497 | 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
|
498 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
|
499 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
|
500 |
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
|
501 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
|
502 |
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
|
503 $ 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
|
504 $ 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
|
505 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
|
506 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
|
507 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
|
508 |
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
|
509 $ 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
|
510 @ 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
|
511 | b1 |
42222
57203e0210f8
copies: calculate mergecopies() based on pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
42142
diff
changeset
|
512 ~ 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
|
513 ~ 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
|
514 --- 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
|
515 +++ 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
|
516 @@ -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
|
517 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
|
518 +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
|
519 |
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
|
520 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
|
521 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
|
522 ------------------------------------------------------------------------------------------------- |
41931
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
523 |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
524 $ newrepo |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
525 $ 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
|
526 $ 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
|
527 $ 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
|
528 $ 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
|
529 $ 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
|
530 $ 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
|
531 |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
532 $ 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
|
533 $ 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
|
534 $ 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
|
535 $ 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
|
536 $ 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
|
537 $ 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
|
538 |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
539 $ hg l |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
540 @ 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
|
541 | c |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
542 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
|
543 | willconflict |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
544 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
|
545 | b |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
546 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
|
547 a |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
548 |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
549 $ hg up ".^^" |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
550 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
|
551 $ 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
|
552 $ 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
|
553 $ 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
|
554 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
|
555 |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
556 $ 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
|
557 $ 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
|
558 $ 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
|
559 |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
560 $ hg l |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
561 @ 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
|
562 | d willconflict |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
563 | 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
|
564 | | c |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
565 | 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
|
566 |/ willconflict |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
567 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
|
568 | b |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
569 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
|
570 a |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
571 |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
572 $ hg rebase -r . -d 2 -t :other |
42406
f385ba70e4af
changelog: optionally store added and removed files in changeset extras
Martin von Zweigbergk <martinvonz@google.com>
parents:
42272
diff
changeset
|
573 rebasing 5:5018b1509e94 "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
|
574 rebasing 5:af8d273bf580 "added willconflict and d" (tip) (changeset !) |
41931
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
575 |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
576 $ 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
|
577 $ 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
|
578 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
|
579 | d willconflict |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
580 | 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
|
581 | | d willconflict |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
582 | | 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
|
583 | |/ d |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
584 +---@ 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
|
585 | | c |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
586 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
|
587 |/ willconflict |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
588 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
|
589 | b |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
590 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
|
591 a |
fc4b7a46fda1
copies: add test that makes both the merging csets dirty and fails
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
41930
diff
changeset
|
592 |
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
|
593 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
|
594 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
|
595 |
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
|
596 $ 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
|
597 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
|
598 grafting 6:b19f0df72728 "added willconflict and d" (tip) (changeset !) |