Mercurial > hg
annotate tests/test-copies.t @ 41751:4ec0ce0fb929
tests: add tests of pathcopies()
I'm working on support for storing copy metadata in the changeset
instead of in the filelog. When storing it in the changeset, it will
obviously be efficient to get the copy metadata for all files in a
single changeset, but it will be more expensive to get the copy
metadata all revisions of a single file. Some algorithms will then
need to be optimized differently. The first method I'm going to
rewrite is pathcopies().
This commit adds many tests for pathcopies(), so we can run the tests
with both old and new versions of the code, as well as with metadata
stored in filelog or in changeset (later). They use the
debugpathcopies command I recently added (with no tests when it was
added). They show a few bugs and few cases of slightly weird
behavior. I'll fix the bugs in the next few commits.
Differential Revision: https://phab.mercurial-scm.org/D5986
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Wed, 20 Feb 2019 15:39:01 -0800 |
parents | |
children | 3158cb74fbca |
rev | line source |
---|---|
41751
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
1 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
2 $ cat >> $HGRCPATH << EOF |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
3 > [alias] |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
4 > l = log -G -T '{rev} {desc}\n{files}\n' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
5 > EOF |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
6 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
7 $ REPONUM=0 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
8 $ newrepo() { |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
9 > cd $TESTTMP |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
10 > REPONUM=`expr $REPONUM + 1` |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
11 > hg init repo-$REPONUM |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
12 > cd repo-$REPONUM |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
13 > } |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
14 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
15 Simple rename case |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
16 $ newrepo |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
17 $ echo x > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
18 $ hg ci -Aqm 'add x' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
19 $ hg mv x y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
20 $ hg ci -m 'rename x to y' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
21 $ hg l |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
22 @ 1 rename x to y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
23 | x y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
24 o 0 add x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
25 x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
26 $ hg debugpathcopies 0 1 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
27 x -> y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
28 $ hg debugpathcopies 1 0 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
29 y -> x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
30 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
|
31 $ hg debugpathcopies 0 1 x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
32 $ hg debugpathcopies 1 0 x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
33 y -> x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
34 $ hg debugpathcopies 0 1 y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
35 x -> y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
36 BROKEN: the following command should not include the copy |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
37 $ hg debugpathcopies 1 0 y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
38 y -> x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
39 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
40 Copy a file onto another file |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
41 $ newrepo |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
42 $ echo x > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
43 $ echo y > y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
44 $ hg ci -Aqm 'add x and y' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
45 $ hg cp -f x y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
46 $ hg ci -m 'copy x onto y' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
47 $ hg l |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
48 @ 1 copy x onto y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
49 | y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
50 o 0 add x and y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
51 x y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
52 Incorrectly doesn't show the rename |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
53 $ hg debugpathcopies 0 1 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
54 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
55 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
|
56 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
|
57 $ newrepo |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
58 $ echo x > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
59 $ echo x > x2 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
60 $ 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
|
61 $ hg cp -f x x2 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
62 $ hg ci -m 'copy x onto x2' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
63 $ hg l |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
64 @ 1 copy x onto x2 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
65 | x2 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
66 o 0 add x and x2 with same content |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
67 x x2 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
68 Incorrectly doesn't show the rename |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
69 $ hg debugpathcopies 0 1 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
70 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
71 Copy a file, then delete destination, then copy again. This does not create a new filelog entry. |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
72 $ newrepo |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
73 $ echo x > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
74 $ hg ci -Aqm 'add x' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
75 $ hg cp x y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
76 $ hg ci -m 'copy x to y' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
77 $ hg rm y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
78 $ hg ci -m 'remove y' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
79 $ hg cp -f x y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
80 $ hg ci -m 'copy x onto y (again)' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
81 $ hg l |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
82 @ 3 copy x onto y (again) |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
83 | y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
84 o 2 remove y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
85 | y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
86 o 1 copy x to y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
87 | y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
88 o 0 add x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
89 x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
90 $ hg debugpathcopies 0 3 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
91 x -> y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
92 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
93 Rename file in a loop: x->y->z->x |
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 $ hg ci -Aqm 'add x' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
97 $ hg mv x y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
98 $ hg ci -m 'rename x to y' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
99 $ hg mv y z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
100 $ hg ci -m 'rename y to z' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
101 $ hg mv z x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
102 $ hg ci -m 'rename z to x' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
103 $ hg l |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
104 @ 3 rename z to x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
105 | x z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
106 o 2 rename y to z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
107 | y z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
108 o 1 rename x to y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
109 | x y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
110 o 0 add x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
111 x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
112 $ hg debugpathcopies 0 3 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
113 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
114 Copy x to y, then remove y, then add back y. With copy metadata in the changeset, this could easily |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
115 end up reporting y as copied from x (if we don't unmark it as a copy when it's removed). |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
116 $ newrepo |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
117 $ echo x > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
118 $ hg ci -Aqm 'add x' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
119 $ hg mv x y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
120 $ hg ci -m 'rename x to y' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
121 $ hg rm y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
122 $ hg ci -qm 'remove y' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
123 $ echo x > y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
124 $ hg ci -Aqm 'add back y' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
125 $ hg l |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
126 @ 3 add back y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
127 | y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
128 o 2 remove y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
129 | y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
130 o 1 rename x to y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
131 | x y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
132 o 0 add x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
133 x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
134 $ hg debugpathcopies 0 3 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
135 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
136 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
|
137 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
|
138 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
|
139 $ newrepo |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
140 $ echo x > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
141 $ echo x > x2 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
142 $ 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
|
143 $ hg cp x z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
144 $ hg ci -qm 'copy x to z' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
145 $ hg rm z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
146 $ hg ci -m 'remove z' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
147 $ hg cp x2 z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
148 $ hg ci -m 'copy x2 to z' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
149 $ hg l |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
150 @ 3 copy x2 to 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 2 remove 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 1 copy x to z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
155 | z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
156 o 0 add x and x2 with same content |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
157 x x2 |
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 BROKEN: x doesn't exist here |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
200 $ hg debugpathcopies 1 2 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
201 y -> x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
202 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
203 Copies via null revision (there shouldn't be any) |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
204 $ newrepo |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
205 $ echo x > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
206 $ hg ci -Aqm 'add x' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
207 $ hg cp x y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
208 $ hg ci -m 'copy x to y' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
209 $ hg co -q null |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
210 $ echo x > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
211 $ hg ci -Aqm 'add x (again)' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
212 $ hg l |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
213 @ 2 add x (again) |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
214 x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
215 o 1 copy x to y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
216 | y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
217 o 0 add x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
218 x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
219 $ hg debugpathcopies 1 2 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
220 $ hg debugpathcopies 2 1 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
221 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
222 Merge rename from other branch |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
223 $ newrepo |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
224 $ echo x > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
225 $ hg ci -Aqm 'add x' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
226 $ hg mv x y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
227 $ hg ci -m 'rename x to y' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
228 $ hg co -q 0 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
229 $ echo z > z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
230 $ hg ci -Aqm 'add z' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
231 $ hg merge -q 1 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
232 $ hg ci -m 'merge rename from p2' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
233 $ hg l |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
234 @ 3 merge rename from p2 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
235 |\ x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
236 | o 2 add z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
237 | | z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
238 o | 1 rename x to y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
239 |/ x y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
240 o 0 add x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
241 x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
242 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
|
243 merges, so... |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
244 $ hg debugpathcopies 0 3 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
245 x -> y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
246 $ hg debugpathcopies 1 2 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
247 y -> x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
248 $ hg debugpathcopies 1 3 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
249 $ hg debugpathcopies 2 3 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
250 x -> y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
251 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
252 Copy file from either side in a merge |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
253 $ newrepo |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
254 $ echo x > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
255 $ hg ci -Aqm 'add x' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
256 $ hg co -q null |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
257 $ echo y > y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
258 $ hg ci -Aqm 'add y' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
259 $ hg merge -q 0 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
260 $ hg cp y z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
261 $ hg ci -m 'copy file from p1 in merge' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
262 $ hg co -q 1 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
263 $ hg merge -q 0 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
264 $ hg cp x z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
265 $ hg ci -qm 'copy file from p2 in merge' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
266 $ hg l |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
267 @ 3 copy file from p2 in merge |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
268 |\ z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
269 +---o 2 copy file from p1 in merge |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
270 | |/ z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
271 | o 1 add y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
272 | y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
273 o 0 add x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
274 x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
275 $ hg debugpathcopies 1 2 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
276 y -> z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
277 $ hg debugpathcopies 0 2 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
278 $ hg debugpathcopies 1 3 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
279 $ hg debugpathcopies 0 3 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
280 x -> z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
281 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
282 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
|
283 $ newrepo |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
284 $ echo x > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
285 $ hg ci -Aqm 'add x on branch 1' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
286 $ hg co -q null |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
287 $ echo x > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
288 $ hg ci -Aqm 'add x on branch 2' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
289 $ hg merge -q 0 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
290 $ hg cp x z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
291 $ hg ci -qm 'merge' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
292 $ hg l |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
293 @ 2 merge |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
294 |\ z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
295 | o 1 add x on branch 2 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
296 | x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
297 o 0 add x on branch 1 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
298 x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
299 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
|
300 $ hg debugpathcopies 1 2 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
301 x -> z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
302 $ hg debugpathcopies 0 2 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
303 x -> z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
304 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
305 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
|
306 $ newrepo |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
307 $ echo branch1 > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
308 $ hg ci -Aqm 'add x on branch 1' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
309 $ hg co -q null |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
310 $ echo branch2 > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
311 $ hg ci -Aqm 'add x on branch 2' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
312 $ hg merge -q 0 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
313 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
|
314 [1] |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
315 $ echo resolved > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
316 $ hg resolve -m x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
317 (no more unresolved files) |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
318 $ hg cp x z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
319 $ hg ci -qm 'merge' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
320 $ hg l |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
321 @ 2 merge |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
322 |\ x z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
323 | o 1 add x on branch 2 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
324 | x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
325 o 0 add x on branch 1 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
326 x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
327 $ hg debugpathcopies 1 2 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
328 $ hg debugpathcopies 0 2 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
329 x -> z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
330 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
331 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
|
332 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
|
333 $ newrepo |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
334 $ echo x > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
335 $ hg ci -Aqm 'add x' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
336 $ hg cp x y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
337 $ hg ci -qm 'copy x to y' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
338 $ hg co -q 0 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
339 $ hg cp x z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
340 $ hg ci -qm 'copy x to z' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
341 $ hg merge -q 1 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
342 $ 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
|
343 $ hg l |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
344 @ 3 merge copy x->y and copy x->z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
345 |\ |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
346 | o 2 copy x to z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
347 | | z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
348 o | 1 copy x to y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
349 |/ y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
350 o 0 add x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
351 x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
352 $ hg debugpathcopies 2 3 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
353 x -> y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
354 $ hg debugpathcopies 1 3 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
355 x -> z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
356 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
357 Copy x to y on one side of merge, create y and rename to z on the other side. Pathcopies from the |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
358 first side should not include the y->z rename since y didn't exist in the merge base. |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
359 $ newrepo |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
360 $ echo x > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
361 $ hg ci -Aqm 'add x' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
362 $ hg cp x y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
363 $ hg ci -qm 'copy x to y' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
364 $ hg co -q 0 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
365 $ echo y > y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
366 $ hg ci -Aqm 'add y' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
367 $ hg mv y z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
368 $ hg ci -m 'rename y to z' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
369 $ hg merge -q 1 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
370 $ hg ci -m 'merge' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
371 $ hg l |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
372 @ 4 merge |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
373 |\ |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
374 | o 3 rename y to z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
375 | | y z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
376 | o 2 add y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
377 | | y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
378 o | 1 copy x to y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
379 |/ y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
380 o 0 add x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
381 x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
382 $ hg debugpathcopies 2 3 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
383 y -> z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
384 $ hg debugpathcopies 1 3 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
385 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
386 Create x and y, then rename x to z on one side of merge, and rename y to z and modify z on the |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
387 other side. |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
388 $ newrepo |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
389 $ echo x > x |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
390 $ echo y > y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
391 $ hg ci -Aqm 'add x and y' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
392 $ hg mv x z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
393 $ hg ci -qm 'rename x to z' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
394 $ hg co -q 0 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
395 $ hg mv y z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
396 $ hg ci -qm 'rename y to z' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
397 $ echo z >> z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
398 $ hg ci -m 'modify z' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
399 $ hg merge -q 1 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
400 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
|
401 [1] |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
402 $ echo z > z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
403 $ hg resolve -qm z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
404 $ hg ci -m 'merge 1 into 3' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
405 Try merging the other direction too |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
406 $ hg co -q 1 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
407 $ hg merge -q 3 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
408 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
|
409 [1] |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
410 $ echo z > z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
411 $ hg resolve -qm z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
412 $ hg ci -m 'merge 3 into 1' |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
413 created new head |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
414 $ hg l |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
415 @ 5 merge 3 into 1 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
416 |\ y z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
417 +---o 4 merge 1 into 3 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
418 | |/ x z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
419 | o 3 modify z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
420 | | z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
421 | o 2 rename y to z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
422 | | y z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
423 o | 1 rename x to z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
424 |/ x z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
425 o 0 add x and y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
426 x y |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
427 $ hg debugpathcopies 1 4 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
428 $ hg debugpathcopies 2 4 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
429 $ hg debugpathcopies 0 4 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
430 x -> z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
431 $ hg debugpathcopies 1 5 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
432 $ hg debugpathcopies 2 5 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
433 $ hg debugpathcopies 0 5 |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
434 x -> z |
4ec0ce0fb929
tests: add tests of pathcopies()
Martin von Zweigbergk <martinvonz@google.com>
parents:
diff
changeset
|
435 |