Show More
@@ -1,161 +1,177 b'' | |||||
1 | Path conflict checking is currently disabled by default because of issue5716. |
|
1 | Path conflict checking is currently disabled by default because of issue5716. | |
2 | Turn it on for this test. |
|
2 | Turn it on for this test. | |
3 |
|
3 | |||
4 | $ cat >> $HGRCPATH << EOF |
|
4 | $ cat >> $HGRCPATH << EOF | |
5 | > [experimental] |
|
5 | > [experimental] | |
6 | > merge.checkpathconflicts=True |
|
6 | > merge.checkpathconflicts=True | |
7 | > EOF |
|
7 | > EOF | |
8 |
|
8 | |||
9 | $ hg init repo |
|
9 | $ hg init repo | |
10 | $ cd repo |
|
10 | $ cd repo | |
11 | $ echo base > base |
|
11 | $ echo base > base | |
12 | $ hg add base |
|
12 | $ hg add base | |
13 | $ hg commit -m "base" |
|
13 | $ hg commit -m "base" | |
14 | $ hg bookmark -i base |
|
14 | $ hg bookmark -i base | |
15 | $ mkdir a |
|
15 | $ mkdir a | |
16 | $ echo 1 > a/b |
|
16 | $ echo 1 > a/b | |
17 | $ hg add a/b |
|
17 | $ hg add a/b | |
18 | $ hg commit -m "file" |
|
18 | $ hg commit -m "file" | |
19 | $ hg bookmark -i file |
|
19 | $ hg bookmark -i file | |
20 | $ echo 2 > a/b |
|
20 | $ echo 2 > a/b | |
21 | $ hg commit -m "file2" |
|
21 | $ hg commit -m "file2" | |
22 | $ hg bookmark -i file2 |
|
22 | $ hg bookmark -i file2 | |
23 | $ hg up 0 |
|
23 | $ hg up 0 | |
24 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
24 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
25 |
|
25 | |||
26 | #if symlink |
|
26 | #if symlink | |
27 | $ mkdir a |
|
27 | $ mkdir a | |
28 | $ ln -s c a/b |
|
28 | $ ln -s c a/b | |
29 | $ hg add a/b |
|
29 | $ hg add a/b | |
30 | $ hg commit -m "link" |
|
30 | $ hg commit -m "link" | |
31 | created new head |
|
31 | created new head | |
32 | #else |
|
32 | #else | |
33 | $ hg import -q --bypass - <<EOF |
|
33 | $ hg import -q --bypass - <<EOF | |
34 | > # HG changeset patch |
|
34 | > # HG changeset patch | |
35 | > link |
|
35 | > link | |
36 | > |
|
36 | > | |
37 | > diff --git a/a/b b/a/b |
|
37 | > diff --git a/a/b b/a/b | |
38 | > new file mode 120000 |
|
38 | > new file mode 120000 | |
39 | > --- /dev/null |
|
39 | > --- /dev/null | |
40 | > +++ b/a/b |
|
40 | > +++ b/a/b | |
41 | > @@ -0,0 +1,1 @@ |
|
41 | > @@ -0,0 +1,1 @@ | |
42 | > +c |
|
42 | > +c | |
43 | > \ No newline at end of file |
|
43 | > \ No newline at end of file | |
44 | > EOF |
|
44 | > EOF | |
45 | $ hg up -q |
|
45 | $ hg up -q | |
46 | #endif |
|
46 | #endif | |
47 |
|
47 | |||
48 | $ hg bookmark -i link |
|
48 | $ hg bookmark -i link | |
49 | $ hg up 0 |
|
49 | $ hg up 0 | |
50 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
50 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
51 | $ mkdir -p a/b/c |
|
51 | $ mkdir -p a/b/c | |
52 | $ echo 2 > a/b/c/d |
|
52 | $ echo 2 > a/b/c/d | |
53 | $ hg add a/b/c/d |
|
53 | $ hg add a/b/c/d | |
54 | $ hg commit -m "dir" |
|
54 | $ hg commit -m "dir" | |
55 | created new head |
|
55 | created new head | |
56 | $ hg bookmark -i dir |
|
56 | $ hg bookmark -i dir | |
57 |
|
57 | |||
58 | Merge - local file conflicts with remote directory |
|
58 | Merge - local file conflicts with remote directory | |
59 |
|
59 | |||
60 | $ hg up file |
|
60 | $ hg up file | |
61 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
61 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
62 | (activating bookmark file) |
|
62 | (activating bookmark file) | |
63 | $ hg bookmark -i |
|
63 | $ hg bookmark -i | |
64 | $ hg merge --verbose dir |
|
64 | $ hg merge --verbose dir | |
65 | resolving manifests |
|
65 | resolving manifests | |
66 | a/b: path conflict - a file or link has the same name as a directory |
|
66 | a/b: path conflict - a file or link has the same name as a directory | |
67 | the local file has been renamed to a/b~0ed027b96f31 |
|
67 | the local file has been renamed to a/b~0ed027b96f31 | |
68 | resolve manually then use 'hg resolve --mark a/b' |
|
68 | resolve manually then use 'hg resolve --mark a/b' | |
69 | moving a/b to a/b~0ed027b96f31 |
|
69 | moving a/b to a/b~0ed027b96f31 | |
70 | getting a/b/c/d |
|
70 | getting a/b/c/d | |
71 | 1 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
71 | 1 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
72 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
72 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
73 | [1] |
|
73 | [1] | |
74 | $ hg status |
|
74 | $ hg status | |
75 | M a/b/c/d |
|
75 | M a/b/c/d | |
76 | A a/b~0ed027b96f31 |
|
76 | A a/b~0ed027b96f31 | |
77 | R a/b |
|
77 | R a/b | |
|
78 | $ hg debugmergestate | |||
|
79 | * version 2 records | |||
|
80 | local: 0ed027b96f31a2560c8abe689ba59876409a2b8e | |||
|
81 | other: 9049d9534d5c5d16264aab02b4b9e20d03faabef | |||
|
82 | labels: | |||
|
83 | local: working copy | |||
|
84 | other: merge rev | |||
|
85 | unrecognized entry: P a/b pu a/b~0ed027b96f31 l | |||
78 | $ hg resolve --all |
|
86 | $ hg resolve --all | |
79 | a/b: path conflict must be resolved manually |
|
87 | a/b: path conflict must be resolved manually | |
80 | $ hg forget a/b~0ed027b96f31 && rm a/b~0ed027b96f31 |
|
88 | $ hg forget a/b~0ed027b96f31 && rm a/b~0ed027b96f31 | |
81 | $ hg resolve --mark a/b |
|
89 | $ hg resolve --mark a/b | |
82 | (no more unresolved files) |
|
90 | (no more unresolved files) | |
83 | $ hg commit -m "merge file and dir (deleted file)" |
|
91 | $ hg commit -m "merge file and dir (deleted file)" | |
84 |
|
92 | |||
85 | Merge - local symlink conflicts with remote directory |
|
93 | Merge - local symlink conflicts with remote directory | |
86 |
|
94 | |||
87 | $ hg up link |
|
95 | $ hg up link | |
88 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
96 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
89 | (activating bookmark link) |
|
97 | (activating bookmark link) | |
90 | $ hg bookmark -i |
|
98 | $ hg bookmark -i | |
91 | $ hg merge dir |
|
99 | $ hg merge dir | |
92 | a/b: path conflict - a file or link has the same name as a directory |
|
100 | a/b: path conflict - a file or link has the same name as a directory | |
93 | the local file has been renamed to a/b~2ea68033e3be |
|
101 | the local file has been renamed to a/b~2ea68033e3be | |
94 | resolve manually then use 'hg resolve --mark a/b' |
|
102 | resolve manually then use 'hg resolve --mark a/b' | |
95 | 1 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
103 | 1 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
96 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
104 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
97 | [1] |
|
105 | [1] | |
98 | $ hg status |
|
106 | $ hg status | |
99 | M a/b/c/d |
|
107 | M a/b/c/d | |
100 | A a/b~2ea68033e3be |
|
108 | A a/b~2ea68033e3be | |
101 | R a/b |
|
109 | R a/b | |
102 | $ hg resolve --list |
|
110 | $ hg resolve --list | |
103 | P a/b |
|
111 | P a/b | |
104 | $ hg resolve --all |
|
112 | $ hg resolve --all | |
105 | a/b: path conflict must be resolved manually |
|
113 | a/b: path conflict must be resolved manually | |
106 | $ hg mv a/b~2ea68033e3be a/b.old |
|
114 | $ hg mv a/b~2ea68033e3be a/b.old | |
107 | $ hg resolve --mark a/b |
|
115 | $ hg resolve --mark a/b | |
108 | (no more unresolved files) |
|
116 | (no more unresolved files) | |
|
117 | $ hg debugmergestate | |||
|
118 | * version 2 records | |||
|
119 | local: 2ea68033e3be03a560471c1fc9e5704fbedb9b4b | |||
|
120 | other: 9049d9534d5c5d16264aab02b4b9e20d03faabef | |||
|
121 | labels: | |||
|
122 | local: working copy | |||
|
123 | other: merge rev | |||
|
124 | unrecognized entry: P a/b pr a/b~2ea68033e3be l | |||
109 |
$ |
|
125 | $ hg resolve --list | |
110 | R a/b |
|
126 | R a/b | |
111 | $ hg commit -m "merge link and dir (renamed link)" |
|
127 | $ hg commit -m "merge link and dir (renamed link)" | |
112 |
|
128 | |||
113 | Merge - local directory conflicts with remote file or link |
|
129 | Merge - local directory conflicts with remote file or link | |
114 |
|
130 | |||
115 | $ hg up dir |
|
131 | $ hg up dir | |
116 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
132 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
117 | (activating bookmark dir) |
|
133 | (activating bookmark dir) | |
118 | $ hg bookmark -i |
|
134 | $ hg bookmark -i | |
119 | $ hg merge file |
|
135 | $ hg merge file | |
120 | a/b: path conflict - a file or link has the same name as a directory |
|
136 | a/b: path conflict - a file or link has the same name as a directory | |
121 | the remote file has been renamed to a/b~0ed027b96f31 |
|
137 | the remote file has been renamed to a/b~0ed027b96f31 | |
122 | resolve manually then use 'hg resolve --mark a/b' |
|
138 | resolve manually then use 'hg resolve --mark a/b' | |
123 | 1 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
139 | 1 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
124 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
140 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
125 | [1] |
|
141 | [1] | |
126 | $ hg status |
|
142 | $ hg status | |
127 | A a/b~0ed027b96f31 |
|
143 | A a/b~0ed027b96f31 | |
128 | $ hg resolve --all |
|
144 | $ hg resolve --all | |
129 | a/b: path conflict must be resolved manually |
|
145 | a/b: path conflict must be resolved manually | |
130 | $ hg mv a/b~0ed027b96f31 a/b/old-b |
|
146 | $ hg mv a/b~0ed027b96f31 a/b/old-b | |
131 | $ hg resolve --mark a/b |
|
147 | $ hg resolve --mark a/b | |
132 | (no more unresolved files) |
|
148 | (no more unresolved files) | |
133 | $ hg commit -m "merge dir and file (move file into dir)" |
|
149 | $ hg commit -m "merge dir and file (move file into dir)" | |
134 | created new head |
|
150 | created new head | |
135 | $ hg merge file2 |
|
151 | $ hg merge file2 | |
136 | merging a/b/old-b and a/b to a/b/old-b |
|
152 | merging a/b/old-b and a/b to a/b/old-b | |
137 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
|
153 | 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | |
138 | (branch merge, don't forget to commit) |
|
154 | (branch merge, don't forget to commit) | |
139 | $ cat a/b/old-b |
|
155 | $ cat a/b/old-b | |
140 | 2 |
|
156 | 2 | |
141 | $ hg commit -m "merge file2 (copytrace tracked rename)" |
|
157 | $ hg commit -m "merge file2 (copytrace tracked rename)" | |
142 | $ hg merge link |
|
158 | $ hg merge link | |
143 | a/b: path conflict - a file or link has the same name as a directory |
|
159 | a/b: path conflict - a file or link has the same name as a directory | |
144 | the remote file has been renamed to a/b~2ea68033e3be |
|
160 | the remote file has been renamed to a/b~2ea68033e3be | |
145 | resolve manually then use 'hg resolve --mark a/b' |
|
161 | resolve manually then use 'hg resolve --mark a/b' | |
146 | 1 files updated, 0 files merged, 0 files removed, 1 files unresolved |
|
162 | 1 files updated, 0 files merged, 0 files removed, 1 files unresolved | |
147 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
|
163 | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | |
148 | [1] |
|
164 | [1] | |
149 | $ hg mv a/b~2ea68033e3be a/b.old |
|
165 | $ hg mv a/b~2ea68033e3be a/b.old | |
150 |
|
166 | |||
151 | #if symlink |
|
167 | #if symlink | |
152 | $ readlink.py a/b.old |
|
168 | $ readlink.py a/b.old | |
153 | a/b.old -> c |
|
169 | a/b.old -> c | |
154 | #else |
|
170 | #else | |
155 | $ cat a/b.old |
|
171 | $ cat a/b.old | |
156 | c (no-eol) |
|
172 | c (no-eol) | |
157 | #endif |
|
173 | #endif | |
158 |
|
174 | |||
159 | $ hg resolve --mark a/b |
|
175 | $ hg resolve --mark a/b | |
160 | (no more unresolved files) |
|
176 | (no more unresolved files) | |
161 | $ hg commit -m "merge link (rename link)" |
|
177 | $ hg commit -m "merge link (rename link)" |
General Comments 0
You need to be logged in to leave comments.
Login now