Show More
@@ -1,211 +1,210 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | hg init |
|
3 | hg init | |
4 | mkdir d1 d1/d11 d2 |
|
4 | mkdir d1 d1/d11 d2 | |
5 | echo d1/a > d1/a |
|
5 | echo d1/a > d1/a | |
6 | echo d1/ba > d1/ba |
|
6 | echo d1/ba > d1/ba | |
7 | echo d1/a1 > d1/d11/a1 |
|
7 | echo d1/a1 > d1/d11/a1 | |
8 | echo d1/b > d1/b |
|
8 | echo d1/b > d1/b | |
9 | echo d2/b > d2/b |
|
9 | echo d2/b > d2/b | |
10 | hg add d1/a d1/b d1/ba d1/d11/a1 d2/b |
|
10 | hg add d1/a d1/b d1/ba d1/d11/a1 d2/b | |
11 | hg commit -m "1" -d "1000000 0" |
|
11 | hg commit -m "1" -d "1000000 0" | |
12 |
|
12 | |||
13 | echo "# rename a single file" |
|
13 | echo "# rename a single file" | |
14 | hg rename d1/d11/a1 d2/c |
|
14 | hg rename d1/d11/a1 d2/c | |
15 | hg status |
|
15 | hg status -C | |
16 | hg update -C |
|
16 | hg update -C | |
17 |
|
17 | |||
18 | echo "# rename --after a single file" |
|
18 | echo "# rename --after a single file" | |
19 | mv d1/d11/a1 d2/c |
|
19 | mv d1/d11/a1 d2/c | |
20 | hg rename --after d1/d11/a1 d2/c |
|
20 | hg rename --after d1/d11/a1 d2/c | |
21 | hg status |
|
21 | hg status -C | |
22 | hg update -C |
|
22 | hg update -C | |
23 |
|
23 | |||
24 | echo "# move a single file to an existing directory" |
|
24 | echo "# move a single file to an existing directory" | |
25 | hg rename d1/d11/a1 d2 |
|
25 | hg rename d1/d11/a1 d2 | |
26 | hg status |
|
26 | hg status -C | |
27 | hg update -C |
|
27 | hg update -C | |
28 |
|
28 | |||
29 | echo "# move --after a single file to an existing directory" |
|
29 | echo "# move --after a single file to an existing directory" | |
30 | mv d1/d11/a1 d2 |
|
30 | mv d1/d11/a1 d2 | |
31 | hg rename --after d1/d11/a1 d2 |
|
31 | hg rename --after d1/d11/a1 d2 | |
32 | hg status |
|
32 | hg status -C | |
33 | hg update -C |
|
33 | hg update -C | |
34 |
|
34 | |||
35 | echo "# rename a file using a relative path" |
|
35 | echo "# rename a file using a relative path" | |
36 | (cd d1/d11; hg rename ../../d2/b e) |
|
36 | (cd d1/d11; hg rename ../../d2/b e) | |
37 | hg status |
|
37 | hg status -C | |
38 | hg update -C |
|
38 | hg update -C | |
39 |
|
39 | |||
40 | echo "# rename --after a file using a relative path" |
|
40 | echo "# rename --after a file using a relative path" | |
41 | (cd d1/d11; mv ../../d2/b e; hg rename --after ../../d2/b e) |
|
41 | (cd d1/d11; mv ../../d2/b e; hg rename --after ../../d2/b e) | |
42 | hg status |
|
42 | hg status -C | |
43 | hg update -C |
|
43 | hg update -C | |
44 |
|
44 | |||
45 | echo "# rename directory d1 as d3" |
|
45 | echo "# rename directory d1 as d3" | |
46 | hg rename d1/ d3 |
|
46 | hg rename d1/ d3 | |
47 | hg status |
|
47 | hg status -C | |
48 | hg update -C |
|
48 | hg update -C | |
49 |
|
49 | |||
50 | echo "# rename --after directory d1 as d3" |
|
50 | echo "# rename --after directory d1 as d3" | |
51 | mv d1 d3 |
|
51 | mv d1 d3 | |
52 | hg rename --after d1 d3 |
|
52 | hg rename --after d1 d3 | |
53 | hg status |
|
53 | hg status -C | |
54 | hg update -C |
|
54 | hg update -C | |
55 |
|
55 | |||
56 | echo "# move a directory using a relative path" |
|
56 | echo "# move a directory using a relative path" | |
57 | (cd d2; mkdir d3; hg rename ../d1/d11 d3) |
|
57 | (cd d2; mkdir d3; hg rename ../d1/d11 d3) | |
58 | hg status |
|
58 | hg status -C | |
59 | hg update -C |
|
59 | hg update -C | |
60 |
|
60 | |||
61 | echo "# move --after a directory using a relative path" |
|
61 | echo "# move --after a directory using a relative path" | |
62 | (cd d2; mkdir d3; mv ../d1/d11 d3; hg rename --after ../d1/d11 d3) |
|
62 | (cd d2; mkdir d3; mv ../d1/d11 d3; hg rename --after ../d1/d11 d3) | |
63 | hg status |
|
63 | hg status -C | |
64 | hg update -C |
|
64 | hg update -C | |
65 |
|
65 | |||
66 | echo "# move directory d1/d11 to an existing directory d2 (removes empty d1)" |
|
66 | echo "# move directory d1/d11 to an existing directory d2 (removes empty d1)" | |
67 | hg rename d1/d11/ d2 |
|
67 | hg rename d1/d11/ d2 | |
68 | hg status |
|
68 | hg status -C | |
69 | hg update -C |
|
69 | hg update -C | |
70 |
|
70 | |||
71 | echo "# move directories d1 and d2 to a new directory d3" |
|
71 | echo "# move directories d1 and d2 to a new directory d3" | |
72 | mkdir d3 |
|
72 | mkdir d3 | |
73 | hg rename d1 d2 d3 |
|
73 | hg rename d1 d2 d3 | |
74 | hg status |
|
74 | hg status -C | |
75 | hg update -C |
|
75 | hg update -C | |
76 |
|
76 | |||
77 | echo "# move --after directories d1 and d2 to a new directory d3" |
|
77 | echo "# move --after directories d1 and d2 to a new directory d3" | |
78 | mkdir d3 |
|
78 | mkdir d3 | |
79 | mv d1 d2 d3 |
|
79 | mv d1 d2 d3 | |
80 | hg rename --after d1 d2 d3 |
|
80 | hg rename --after d1 d2 d3 | |
81 | hg status |
|
81 | hg status -C | |
82 | hg update -C |
|
82 | hg update -C | |
83 |
|
83 | |||
84 | echo "# move everything under directory d1 to existing directory d2, do not" |
|
84 | echo "# move everything under directory d1 to existing directory d2, do not" | |
85 | echo "# overwrite existing files (d2/b)" |
|
85 | echo "# overwrite existing files (d2/b)" | |
86 | hg rename d1/* d2 |
|
86 | hg rename d1/* d2 | |
87 | hg status |
|
87 | hg status -C | |
88 | diff d1/b d2/b |
|
88 | diff d1/b d2/b | |
89 | hg update -C |
|
89 | hg update -C | |
90 |
|
90 | |||
91 | echo "# attempt to move potentially more than one file into a non-existent" |
|
91 | echo "# attempt to move potentially more than one file into a non-existent" | |
92 | echo "# directory" |
|
92 | echo "# directory" | |
93 | hg rename 'glob:d1/**' dx |
|
93 | hg rename 'glob:d1/**' dx | |
94 |
|
94 | |||
95 | echo "# move every file under d1 to d2/d21 (glob)" |
|
95 | echo "# move every file under d1 to d2/d21 (glob)" | |
96 | mkdir d2/d21 |
|
96 | mkdir d2/d21 | |
97 | hg rename 'glob:d1/**' d2/d21 |
|
97 | hg rename 'glob:d1/**' d2/d21 | |
98 | hg status |
|
98 | hg status -C | |
99 | hg update -C |
|
99 | hg update -C | |
100 |
|
100 | |||
101 | echo "# move --after some files under d1 to d2/d21 (glob)" |
|
101 | echo "# move --after some files under d1 to d2/d21 (glob)" | |
102 | mkdir d2/d21 |
|
102 | mkdir d2/d21 | |
103 | mv d1/a d1/d11/a1 d2/d21 |
|
103 | mv d1/a d1/d11/a1 d2/d21 | |
104 | hg rename --after 'glob:d1/**' d2/d21 |
|
104 | hg rename --after 'glob:d1/**' d2/d21 | |
105 | hg status |
|
105 | hg status -C | |
106 | hg update -C |
|
106 | hg update -C | |
107 |
|
107 | |||
108 | echo "# move every file under d1 starting with an 'a' to d2/d21 (regexp)" |
|
108 | echo "# move every file under d1 starting with an 'a' to d2/d21 (regexp)" | |
109 | mkdir d2/d21 |
|
109 | mkdir d2/d21 | |
110 | hg rename 're:d1/([^a][^/]*/)*a.*' d2/d21 |
|
110 | hg rename 're:d1/([^a][^/]*/)*a.*' d2/d21 | |
111 | hg status |
|
111 | hg status -C | |
112 | hg update -C |
|
112 | hg update -C | |
113 |
|
113 | |||
114 | echo "# attempt to overwrite an existing file" |
|
114 | echo "# attempt to overwrite an existing file" | |
115 | echo "ca" > d1/ca |
|
115 | echo "ca" > d1/ca | |
116 | hg rename d1/ba d1/ca |
|
116 | hg rename d1/ba d1/ca | |
117 | hg status |
|
117 | hg status -C | |
118 | hg update -C |
|
118 | hg update -C | |
119 |
|
119 | |||
120 | echo "# forced overwrite of an existing file" |
|
120 | echo "# forced overwrite of an existing file" | |
121 | echo "ca" > d1/ca |
|
121 | echo "ca" > d1/ca | |
122 | hg rename --force d1/ba d1/ca |
|
122 | hg rename --force d1/ba d1/ca | |
123 | hg status |
|
123 | hg status -C | |
124 | hg update -C |
|
124 | hg update -C | |
125 |
|
125 | |||
126 | echo "# replace a symlink with a file" |
|
126 | echo "# replace a symlink with a file" | |
127 | ln -s ba d1/ca |
|
127 | ln -s ba d1/ca | |
128 | hg rename --force d1/ba d1/ca |
|
128 | hg rename --force d1/ba d1/ca | |
129 | hg status |
|
129 | hg status -C | |
130 | hg update -C |
|
130 | hg update -C | |
131 |
|
131 | |||
132 | echo "# do not copy more than one source file to the same destination file" |
|
132 | echo "# do not copy more than one source file to the same destination file" | |
133 | mkdir d3 |
|
133 | mkdir d3 | |
134 | hg rename d1/* d2/* d3 |
|
134 | hg rename d1/* d2/* d3 | |
135 | hg status |
|
135 | hg status -C | |
136 | hg update -C |
|
136 | hg update -C | |
137 |
|
137 | |||
138 | echo "# move a whole subtree with \"hg rename .\"" |
|
138 | echo "# move a whole subtree with \"hg rename .\"" | |
139 | mkdir d3 |
|
139 | mkdir d3 | |
140 | (cd d1; hg rename . ../d3) |
|
140 | (cd d1; hg rename . ../d3) | |
141 | hg status |
|
141 | hg status -C | |
142 | hg update -C |
|
142 | hg update -C | |
143 |
|
143 | |||
144 | echo "# move a whole subtree with \"hg rename --after .\"" |
|
144 | echo "# move a whole subtree with \"hg rename --after .\"" | |
145 | mkdir d3 |
|
145 | mkdir d3 | |
146 | mv d1/* d3 |
|
146 | mv d1/* d3 | |
147 | (cd d1; hg rename --after . ../d3) |
|
147 | (cd d1; hg rename --after . ../d3) | |
148 | hg status |
|
148 | hg status -C | |
149 | hg update -C |
|
149 | hg update -C | |
150 |
|
150 | |||
151 | echo "# move the parent tree with \"hg rename ..\"" |
|
151 | echo "# move the parent tree with \"hg rename ..\"" | |
152 | (cd d1/d11; hg rename .. ../../d3) |
|
152 | (cd d1/d11; hg rename .. ../../d3) | |
153 | hg status |
|
153 | hg status -C | |
154 | hg update -C |
|
154 | hg update -C | |
155 |
|
155 | |||
156 | echo "# skip removed files" |
|
156 | echo "# skip removed files" | |
157 | hg remove d1/b |
|
157 | hg remove d1/b | |
158 | hg rename d1 d3 |
|
158 | hg rename d1 d3 | |
159 | hg status |
|
159 | hg status -C | |
160 | hg update -C |
|
160 | hg update -C | |
161 |
|
161 | |||
162 | echo "# transitive rename" |
|
162 | echo "# transitive rename" | |
163 | hg rename d1/b d1/bb |
|
163 | hg rename d1/b d1/bb | |
164 | hg rename d1/bb d1/bc |
|
164 | hg rename d1/bb d1/bc | |
165 | hg status |
|
165 | hg status -C | |
166 | hg update -C |
|
166 | hg update -C | |
167 |
|
167 | |||
168 | echo "# transitive rename --after" |
|
168 | echo "# transitive rename --after" | |
169 | hg rename d1/b d1/bb |
|
169 | hg rename d1/b d1/bb | |
170 | mv d1/bb d1/bc |
|
170 | mv d1/bb d1/bc | |
171 | hg rename --after d1/bb d1/bc |
|
171 | hg rename --after d1/bb d1/bc | |
172 | hg status |
|
172 | hg status -C | |
173 | hg update -C |
|
173 | hg update -C | |
174 |
|
174 | |||
175 | echo "# idempotent renames (d1/b -> d1/bb followed by d1/bb -> d1/b)" |
|
175 | echo "# idempotent renames (d1/b -> d1/bb followed by d1/bb -> d1/b)" | |
176 | hg rename d1/b d1/bb |
|
176 | hg rename d1/b d1/bb | |
177 | echo "some stuff added to d1/bb" >> d1/bb |
|
177 | echo "some stuff added to d1/bb" >> d1/bb | |
178 | hg rename d1/bb d1/b |
|
178 | hg rename d1/bb d1/b | |
179 | hg status |
|
179 | hg status -C | |
180 | hg debugstate | grep copy |
|
|||
181 | hg update -C |
|
180 | hg update -C | |
182 |
|
181 | |||
183 | echo "# check illegal path components" |
|
182 | echo "# check illegal path components" | |
184 |
|
183 | |||
185 | hg rename d1/d11/a1 .hg/foo |
|
184 | hg rename d1/d11/a1 .hg/foo | |
186 | hg status |
|
185 | hg status -C | |
187 | hg rename d1/d11/a1 ../foo |
|
186 | hg rename d1/d11/a1 ../foo | |
188 | hg status |
|
187 | hg status -C | |
189 |
|
188 | |||
190 | mv d1/d11/a1 .hg/foo |
|
189 | mv d1/d11/a1 .hg/foo | |
191 | hg rename --after d1/d11/a1 .hg/foo |
|
190 | hg rename --after d1/d11/a1 .hg/foo | |
192 | hg status |
|
191 | hg status -C | |
193 | hg update -C |
|
192 | hg update -C | |
194 | rm .hg/foo |
|
193 | rm .hg/foo | |
195 |
|
194 | |||
196 | hg rename d1/d11/a1 .hg |
|
195 | hg rename d1/d11/a1 .hg | |
197 | hg status |
|
196 | hg status -C | |
198 | hg rename d1/d11/a1 .. |
|
197 | hg rename d1/d11/a1 .. | |
199 | hg status |
|
198 | hg status -C | |
200 |
|
199 | |||
201 | mv d1/d11/a1 .hg |
|
200 | mv d1/d11/a1 .hg | |
202 | hg rename --after d1/d11/a1 .hg |
|
201 | hg rename --after d1/d11/a1 .hg | |
203 | hg status |
|
202 | hg status -C | |
204 | hg update -C |
|
203 | hg update -C | |
205 | rm .hg/a1 |
|
204 | rm .hg/a1 | |
206 |
|
205 | |||
207 | (cd d1/d11; hg rename ../../d2/b ../../.hg/foo) |
|
206 | (cd d1/d11; hg rename ../../d2/b ../../.hg/foo) | |
208 | hg status |
|
207 | hg status -C | |
209 | (cd d1/d11; hg rename ../../d2/b ../../../foo) |
|
208 | (cd d1/d11; hg rename ../../d2/b ../../../foo) | |
210 | hg status |
|
209 | hg status -C | |
211 |
|
210 |
@@ -1,297 +1,358 b'' | |||||
1 | # rename a single file |
|
1 | # rename a single file | |
2 | A d2/c |
|
2 | A d2/c | |
|
3 | d1/d11/a1 | |||
3 | R d1/d11/a1 |
|
4 | R d1/d11/a1 | |
4 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
5 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
5 | # rename --after a single file |
|
6 | # rename --after a single file | |
6 | A d2/c |
|
7 | A d2/c | |
|
8 | d1/d11/a1 | |||
7 | R d1/d11/a1 |
|
9 | R d1/d11/a1 | |
8 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
10 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
9 | # move a single file to an existing directory |
|
11 | # move a single file to an existing directory | |
10 | A d2/a1 |
|
12 | A d2/a1 | |
|
13 | d1/d11/a1 | |||
11 | R d1/d11/a1 |
|
14 | R d1/d11/a1 | |
12 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
15 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
13 | # move --after a single file to an existing directory |
|
16 | # move --after a single file to an existing directory | |
14 | A d2/a1 |
|
17 | A d2/a1 | |
|
18 | d1/d11/a1 | |||
15 | R d1/d11/a1 |
|
19 | R d1/d11/a1 | |
16 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
20 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
17 | # rename a file using a relative path |
|
21 | # rename a file using a relative path | |
18 | A d1/d11/e |
|
22 | A d1/d11/e | |
|
23 | d2/b | |||
19 | R d2/b |
|
24 | R d2/b | |
20 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
25 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
21 | # rename --after a file using a relative path |
|
26 | # rename --after a file using a relative path | |
22 | A d1/d11/e |
|
27 | A d1/d11/e | |
|
28 | d2/b | |||
23 | R d2/b |
|
29 | R d2/b | |
24 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
30 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
25 | # rename directory d1 as d3 |
|
31 | # rename directory d1 as d3 | |
26 | copying d1/a to d3/a |
|
32 | copying d1/a to d3/a | |
27 | copying d1/b to d3/b |
|
33 | copying d1/b to d3/b | |
28 | copying d1/ba to d3/ba |
|
34 | copying d1/ba to d3/ba | |
29 | copying d1/d11/a1 to d3/d11/a1 |
|
35 | copying d1/d11/a1 to d3/d11/a1 | |
30 | removing d1/a |
|
36 | removing d1/a | |
31 | removing d1/b |
|
37 | removing d1/b | |
32 | removing d1/ba |
|
38 | removing d1/ba | |
33 | removing d1/d11/a1 |
|
39 | removing d1/d11/a1 | |
34 | A d3/a |
|
40 | A d3/a | |
|
41 | d1/a | |||
35 | A d3/b |
|
42 | A d3/b | |
|
43 | d1/b | |||
36 | A d3/ba |
|
44 | A d3/ba | |
|
45 | d1/ba | |||
37 | A d3/d11/a1 |
|
46 | A d3/d11/a1 | |
|
47 | d1/d11/a1 | |||
38 | R d1/a |
|
48 | R d1/a | |
39 | R d1/b |
|
49 | R d1/b | |
40 | R d1/ba |
|
50 | R d1/ba | |
41 | R d1/d11/a1 |
|
51 | R d1/d11/a1 | |
42 | 4 files updated, 0 files merged, 4 files removed, 0 files unresolved |
|
52 | 4 files updated, 0 files merged, 4 files removed, 0 files unresolved | |
43 | # rename --after directory d1 as d3 |
|
53 | # rename --after directory d1 as d3 | |
44 | copying d1/a to d3/a |
|
54 | copying d1/a to d3/a | |
45 | copying d1/b to d3/b |
|
55 | copying d1/b to d3/b | |
46 | copying d1/ba to d3/ba |
|
56 | copying d1/ba to d3/ba | |
47 | copying d1/d11/a1 to d3/d11/a1 |
|
57 | copying d1/d11/a1 to d3/d11/a1 | |
48 | removing d1/a |
|
58 | removing d1/a | |
49 | removing d1/b |
|
59 | removing d1/b | |
50 | removing d1/ba |
|
60 | removing d1/ba | |
51 | removing d1/d11/a1 |
|
61 | removing d1/d11/a1 | |
52 | A d3/a |
|
62 | A d3/a | |
|
63 | d1/a | |||
53 | A d3/b |
|
64 | A d3/b | |
|
65 | d1/b | |||
54 | A d3/ba |
|
66 | A d3/ba | |
|
67 | d1/ba | |||
55 | A d3/d11/a1 |
|
68 | A d3/d11/a1 | |
|
69 | d1/d11/a1 | |||
56 | R d1/a |
|
70 | R d1/a | |
57 | R d1/b |
|
71 | R d1/b | |
58 | R d1/ba |
|
72 | R d1/ba | |
59 | R d1/d11/a1 |
|
73 | R d1/d11/a1 | |
60 | 4 files updated, 0 files merged, 4 files removed, 0 files unresolved |
|
74 | 4 files updated, 0 files merged, 4 files removed, 0 files unresolved | |
61 | # move a directory using a relative path |
|
75 | # move a directory using a relative path | |
62 | copying ../d1/d11/a1 to d3/d11/a1 |
|
76 | copying ../d1/d11/a1 to d3/d11/a1 | |
63 | removing ../d1/d11/a1 |
|
77 | removing ../d1/d11/a1 | |
64 | A d2/d3/d11/a1 |
|
78 | A d2/d3/d11/a1 | |
|
79 | d1/d11/a1 | |||
65 | R d1/d11/a1 |
|
80 | R d1/d11/a1 | |
66 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
81 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
67 | # move --after a directory using a relative path |
|
82 | # move --after a directory using a relative path | |
68 | copying ../d1/d11/a1 to d3/d11/a1 |
|
83 | copying ../d1/d11/a1 to d3/d11/a1 | |
69 | removing ../d1/d11/a1 |
|
84 | removing ../d1/d11/a1 | |
70 | A d2/d3/d11/a1 |
|
85 | A d2/d3/d11/a1 | |
|
86 | d1/d11/a1 | |||
71 | R d1/d11/a1 |
|
87 | R d1/d11/a1 | |
72 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
88 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
73 | # move directory d1/d11 to an existing directory d2 (removes empty d1) |
|
89 | # move directory d1/d11 to an existing directory d2 (removes empty d1) | |
74 | copying d1/d11/a1 to d2/d11/a1 |
|
90 | copying d1/d11/a1 to d2/d11/a1 | |
75 | removing d1/d11/a1 |
|
91 | removing d1/d11/a1 | |
76 | A d2/d11/a1 |
|
92 | A d2/d11/a1 | |
|
93 | d1/d11/a1 | |||
77 | R d1/d11/a1 |
|
94 | R d1/d11/a1 | |
78 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
95 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
79 | # move directories d1 and d2 to a new directory d3 |
|
96 | # move directories d1 and d2 to a new directory d3 | |
80 | copying d1/a to d3/d1/a |
|
97 | copying d1/a to d3/d1/a | |
81 | copying d1/b to d3/d1/b |
|
98 | copying d1/b to d3/d1/b | |
82 | copying d1/ba to d3/d1/ba |
|
99 | copying d1/ba to d3/d1/ba | |
83 | copying d1/d11/a1 to d3/d1/d11/a1 |
|
100 | copying d1/d11/a1 to d3/d1/d11/a1 | |
84 | copying d2/b to d3/d2/b |
|
101 | copying d2/b to d3/d2/b | |
85 | removing d1/a |
|
102 | removing d1/a | |
86 | removing d1/b |
|
103 | removing d1/b | |
87 | removing d1/ba |
|
104 | removing d1/ba | |
88 | removing d1/d11/a1 |
|
105 | removing d1/d11/a1 | |
89 | removing d2/b |
|
106 | removing d2/b | |
90 | A d3/d1/a |
|
107 | A d3/d1/a | |
|
108 | d1/a | |||
91 | A d3/d1/b |
|
109 | A d3/d1/b | |
|
110 | d1/b | |||
92 | A d3/d1/ba |
|
111 | A d3/d1/ba | |
|
112 | d1/ba | |||
93 | A d3/d1/d11/a1 |
|
113 | A d3/d1/d11/a1 | |
|
114 | d1/d11/a1 | |||
94 | A d3/d2/b |
|
115 | A d3/d2/b | |
|
116 | d2/b | |||
95 | R d1/a |
|
117 | R d1/a | |
96 | R d1/b |
|
118 | R d1/b | |
97 | R d1/ba |
|
119 | R d1/ba | |
98 | R d1/d11/a1 |
|
120 | R d1/d11/a1 | |
99 | R d2/b |
|
121 | R d2/b | |
100 | 5 files updated, 0 files merged, 5 files removed, 0 files unresolved |
|
122 | 5 files updated, 0 files merged, 5 files removed, 0 files unresolved | |
101 | # move --after directories d1 and d2 to a new directory d3 |
|
123 | # move --after directories d1 and d2 to a new directory d3 | |
102 | copying d1/a to d3/d1/a |
|
124 | copying d1/a to d3/d1/a | |
103 | copying d1/b to d3/d1/b |
|
125 | copying d1/b to d3/d1/b | |
104 | copying d1/ba to d3/d1/ba |
|
126 | copying d1/ba to d3/d1/ba | |
105 | copying d1/d11/a1 to d3/d1/d11/a1 |
|
127 | copying d1/d11/a1 to d3/d1/d11/a1 | |
106 | copying d2/b to d3/d2/b |
|
128 | copying d2/b to d3/d2/b | |
107 | removing d1/a |
|
129 | removing d1/a | |
108 | removing d1/b |
|
130 | removing d1/b | |
109 | removing d1/ba |
|
131 | removing d1/ba | |
110 | removing d1/d11/a1 |
|
132 | removing d1/d11/a1 | |
111 | removing d2/b |
|
133 | removing d2/b | |
112 | A d3/d1/a |
|
134 | A d3/d1/a | |
|
135 | d1/a | |||
113 | A d3/d1/b |
|
136 | A d3/d1/b | |
|
137 | d1/b | |||
114 | A d3/d1/ba |
|
138 | A d3/d1/ba | |
|
139 | d1/ba | |||
115 | A d3/d1/d11/a1 |
|
140 | A d3/d1/d11/a1 | |
|
141 | d1/d11/a1 | |||
116 | A d3/d2/b |
|
142 | A d3/d2/b | |
|
143 | d2/b | |||
117 | R d1/a |
|
144 | R d1/a | |
118 | R d1/b |
|
145 | R d1/b | |
119 | R d1/ba |
|
146 | R d1/ba | |
120 | R d1/d11/a1 |
|
147 | R d1/d11/a1 | |
121 | R d2/b |
|
148 | R d2/b | |
122 | 5 files updated, 0 files merged, 5 files removed, 0 files unresolved |
|
149 | 5 files updated, 0 files merged, 5 files removed, 0 files unresolved | |
123 | # move everything under directory d1 to existing directory d2, do not |
|
150 | # move everything under directory d1 to existing directory d2, do not | |
124 | # overwrite existing files (d2/b) |
|
151 | # overwrite existing files (d2/b) | |
125 | d2/b: not overwriting - file exists |
|
152 | d2/b: not overwriting - file exists | |
126 | copying d1/d11/a1 to d2/d11/a1 |
|
153 | copying d1/d11/a1 to d2/d11/a1 | |
127 | removing d1/d11/a1 |
|
154 | removing d1/d11/a1 | |
128 | A d2/a |
|
155 | A d2/a | |
|
156 | d1/a | |||
129 | A d2/ba |
|
157 | A d2/ba | |
|
158 | d1/ba | |||
130 | A d2/d11/a1 |
|
159 | A d2/d11/a1 | |
|
160 | d1/d11/a1 | |||
131 | R d1/a |
|
161 | R d1/a | |
132 | R d1/ba |
|
162 | R d1/ba | |
133 | R d1/d11/a1 |
|
163 | R d1/d11/a1 | |
134 | 1c1 |
|
164 | 1c1 | |
135 | < d1/b |
|
165 | < d1/b | |
136 | --- |
|
166 | --- | |
137 | > d2/b |
|
167 | > d2/b | |
138 | 3 files updated, 0 files merged, 3 files removed, 0 files unresolved |
|
168 | 3 files updated, 0 files merged, 3 files removed, 0 files unresolved | |
139 | # attempt to move potentially more than one file into a non-existent |
|
169 | # attempt to move potentially more than one file into a non-existent | |
140 | # directory |
|
170 | # directory | |
141 | abort: with multiple sources, destination must be an existing directory |
|
171 | abort: with multiple sources, destination must be an existing directory | |
142 | # move every file under d1 to d2/d21 (glob) |
|
172 | # move every file under d1 to d2/d21 (glob) | |
143 | copying d1/a to d2/d21/a |
|
173 | copying d1/a to d2/d21/a | |
144 | copying d1/b to d2/d21/b |
|
174 | copying d1/b to d2/d21/b | |
145 | copying d1/ba to d2/d21/ba |
|
175 | copying d1/ba to d2/d21/ba | |
146 | copying d1/d11/a1 to d2/d21/a1 |
|
176 | copying d1/d11/a1 to d2/d21/a1 | |
147 | removing d1/a |
|
177 | removing d1/a | |
148 | removing d1/b |
|
178 | removing d1/b | |
149 | removing d1/ba |
|
179 | removing d1/ba | |
150 | removing d1/d11/a1 |
|
180 | removing d1/d11/a1 | |
151 | A d2/d21/a |
|
181 | A d2/d21/a | |
|
182 | d1/a | |||
152 | A d2/d21/a1 |
|
183 | A d2/d21/a1 | |
|
184 | d1/d11/a1 | |||
153 | A d2/d21/b |
|
185 | A d2/d21/b | |
|
186 | d1/b | |||
154 | A d2/d21/ba |
|
187 | A d2/d21/ba | |
|
188 | d1/ba | |||
155 | R d1/a |
|
189 | R d1/a | |
156 | R d1/b |
|
190 | R d1/b | |
157 | R d1/ba |
|
191 | R d1/ba | |
158 | R d1/d11/a1 |
|
192 | R d1/d11/a1 | |
159 | 4 files updated, 0 files merged, 4 files removed, 0 files unresolved |
|
193 | 4 files updated, 0 files merged, 4 files removed, 0 files unresolved | |
160 | # move --after some files under d1 to d2/d21 (glob) |
|
194 | # move --after some files under d1 to d2/d21 (glob) | |
161 | copying d1/a to d2/d21/a |
|
195 | copying d1/a to d2/d21/a | |
162 | copying d1/d11/a1 to d2/d21/a1 |
|
196 | copying d1/d11/a1 to d2/d21/a1 | |
163 | removing d1/a |
|
197 | removing d1/a | |
164 | removing d1/d11/a1 |
|
198 | removing d1/d11/a1 | |
165 | A d2/d21/a |
|
199 | A d2/d21/a | |
|
200 | d1/a | |||
166 | A d2/d21/a1 |
|
201 | A d2/d21/a1 | |
|
202 | d1/d11/a1 | |||
167 | R d1/a |
|
203 | R d1/a | |
168 | R d1/d11/a1 |
|
204 | R d1/d11/a1 | |
169 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
205 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
170 | # move every file under d1 starting with an 'a' to d2/d21 (regexp) |
|
206 | # move every file under d1 starting with an 'a' to d2/d21 (regexp) | |
171 | copying d1/a to d2/d21/a |
|
207 | copying d1/a to d2/d21/a | |
172 | copying d1/d11/a1 to d2/d21/a1 |
|
208 | copying d1/d11/a1 to d2/d21/a1 | |
173 | removing d1/a |
|
209 | removing d1/a | |
174 | removing d1/d11/a1 |
|
210 | removing d1/d11/a1 | |
175 | A d2/d21/a |
|
211 | A d2/d21/a | |
|
212 | d1/a | |||
176 | A d2/d21/a1 |
|
213 | A d2/d21/a1 | |
|
214 | d1/d11/a1 | |||
177 | R d1/a |
|
215 | R d1/a | |
178 | R d1/d11/a1 |
|
216 | R d1/d11/a1 | |
179 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved |
|
217 | 2 files updated, 0 files merged, 2 files removed, 0 files unresolved | |
180 | # attempt to overwrite an existing file |
|
218 | # attempt to overwrite an existing file | |
181 | d1/ca: not overwriting - file exists |
|
219 | d1/ca: not overwriting - file exists | |
182 | ? d1/ca |
|
220 | ? d1/ca | |
183 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
221 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
184 | # forced overwrite of an existing file |
|
222 | # forced overwrite of an existing file | |
185 | A d1/ca |
|
223 | A d1/ca | |
|
224 | d1/ba | |||
186 | R d1/ba |
|
225 | R d1/ba | |
187 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
226 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
188 | # replace a symlink with a file |
|
227 | # replace a symlink with a file | |
189 | A d1/ca |
|
228 | A d1/ca | |
|
229 | d1/ba | |||
190 | R d1/ba |
|
230 | R d1/ba | |
191 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
231 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
192 | # do not copy more than one source file to the same destination file |
|
232 | # do not copy more than one source file to the same destination file | |
193 | copying d1/d11/a1 to d3/d11/a1 |
|
233 | copying d1/d11/a1 to d3/d11/a1 | |
194 | d3/b: not overwriting - d2/b collides with d1/b |
|
234 | d3/b: not overwriting - d2/b collides with d1/b | |
195 | removing d1/d11/a1 |
|
235 | removing d1/d11/a1 | |
196 | A d3/a |
|
236 | A d3/a | |
|
237 | d1/a | |||
197 | A d3/b |
|
238 | A d3/b | |
|
239 | d1/b | |||
198 | A d3/ba |
|
240 | A d3/ba | |
|
241 | d1/ba | |||
199 | A d3/d11/a1 |
|
242 | A d3/d11/a1 | |
|
243 | d1/d11/a1 | |||
200 | R d1/a |
|
244 | R d1/a | |
201 | R d1/b |
|
245 | R d1/b | |
202 | R d1/ba |
|
246 | R d1/ba | |
203 | R d1/d11/a1 |
|
247 | R d1/d11/a1 | |
204 | 4 files updated, 0 files merged, 4 files removed, 0 files unresolved |
|
248 | 4 files updated, 0 files merged, 4 files removed, 0 files unresolved | |
205 | # move a whole subtree with "hg rename ." |
|
249 | # move a whole subtree with "hg rename ." | |
206 | copying a to ../d3/d1/a |
|
250 | copying a to ../d3/d1/a | |
207 | copying b to ../d3/d1/b |
|
251 | copying b to ../d3/d1/b | |
208 | copying ba to ../d3/d1/ba |
|
252 | copying ba to ../d3/d1/ba | |
209 | copying d11/a1 to ../d3/d1/d11/a1 |
|
253 | copying d11/a1 to ../d3/d1/d11/a1 | |
210 | removing a |
|
254 | removing a | |
211 | removing b |
|
255 | removing b | |
212 | removing ba |
|
256 | removing ba | |
213 | removing d11/a1 |
|
257 | removing d11/a1 | |
214 | A d3/d1/a |
|
258 | A d3/d1/a | |
|
259 | d1/a | |||
215 | A d3/d1/b |
|
260 | A d3/d1/b | |
|
261 | d1/b | |||
216 | A d3/d1/ba |
|
262 | A d3/d1/ba | |
|
263 | d1/ba | |||
217 | A d3/d1/d11/a1 |
|
264 | A d3/d1/d11/a1 | |
|
265 | d1/d11/a1 | |||
218 | R d1/a |
|
266 | R d1/a | |
219 | R d1/b |
|
267 | R d1/b | |
220 | R d1/ba |
|
268 | R d1/ba | |
221 | R d1/d11/a1 |
|
269 | R d1/d11/a1 | |
222 | 4 files updated, 0 files merged, 4 files removed, 0 files unresolved |
|
270 | 4 files updated, 0 files merged, 4 files removed, 0 files unresolved | |
223 | # move a whole subtree with "hg rename --after ." |
|
271 | # move a whole subtree with "hg rename --after ." | |
224 | copying a to ../d3/a |
|
272 | copying a to ../d3/a | |
225 | copying b to ../d3/b |
|
273 | copying b to ../d3/b | |
226 | copying ba to ../d3/ba |
|
274 | copying ba to ../d3/ba | |
227 | copying d11/a1 to ../d3/d11/a1 |
|
275 | copying d11/a1 to ../d3/d11/a1 | |
228 | removing a |
|
276 | removing a | |
229 | removing b |
|
277 | removing b | |
230 | removing ba |
|
278 | removing ba | |
231 | removing d11/a1 |
|
279 | removing d11/a1 | |
232 | A d3/a |
|
280 | A d3/a | |
|
281 | d1/a | |||
233 | A d3/b |
|
282 | A d3/b | |
|
283 | d1/b | |||
234 | A d3/ba |
|
284 | A d3/ba | |
|
285 | d1/ba | |||
235 | A d3/d11/a1 |
|
286 | A d3/d11/a1 | |
|
287 | d1/d11/a1 | |||
236 | R d1/a |
|
288 | R d1/a | |
237 | R d1/b |
|
289 | R d1/b | |
238 | R d1/ba |
|
290 | R d1/ba | |
239 | R d1/d11/a1 |
|
291 | R d1/d11/a1 | |
240 | 4 files updated, 0 files merged, 4 files removed, 0 files unresolved |
|
292 | 4 files updated, 0 files merged, 4 files removed, 0 files unresolved | |
241 | # move the parent tree with "hg rename .." |
|
293 | # move the parent tree with "hg rename .." | |
242 | copying ../a to ../../d3/a |
|
294 | copying ../a to ../../d3/a | |
243 | copying ../b to ../../d3/b |
|
295 | copying ../b to ../../d3/b | |
244 | copying ../ba to ../../d3/ba |
|
296 | copying ../ba to ../../d3/ba | |
245 | copying a1 to ../../d3/d11/a1 |
|
297 | copying a1 to ../../d3/d11/a1 | |
246 | removing ../a |
|
298 | removing ../a | |
247 | removing ../b |
|
299 | removing ../b | |
248 | removing ../ba |
|
300 | removing ../ba | |
249 | removing a1 |
|
301 | removing a1 | |
250 | A d3/a |
|
302 | A d3/a | |
|
303 | d1/a | |||
251 | A d3/b |
|
304 | A d3/b | |
|
305 | d1/b | |||
252 | A d3/ba |
|
306 | A d3/ba | |
|
307 | d1/ba | |||
253 | A d3/d11/a1 |
|
308 | A d3/d11/a1 | |
|
309 | d1/d11/a1 | |||
254 | R d1/a |
|
310 | R d1/a | |
255 | R d1/b |
|
311 | R d1/b | |
256 | R d1/ba |
|
312 | R d1/ba | |
257 | R d1/d11/a1 |
|
313 | R d1/d11/a1 | |
258 | 4 files updated, 0 files merged, 4 files removed, 0 files unresolved |
|
314 | 4 files updated, 0 files merged, 4 files removed, 0 files unresolved | |
259 | # skip removed files |
|
315 | # skip removed files | |
260 | copying d1/a to d3/a |
|
316 | copying d1/a to d3/a | |
261 | copying d1/ba to d3/ba |
|
317 | copying d1/ba to d3/ba | |
262 | copying d1/d11/a1 to d3/d11/a1 |
|
318 | copying d1/d11/a1 to d3/d11/a1 | |
263 | removing d1/a |
|
319 | removing d1/a | |
264 | removing d1/ba |
|
320 | removing d1/ba | |
265 | removing d1/d11/a1 |
|
321 | removing d1/d11/a1 | |
266 | A d3/a |
|
322 | A d3/a | |
|
323 | d1/a | |||
267 | A d3/ba |
|
324 | A d3/ba | |
|
325 | d1/ba | |||
268 | A d3/d11/a1 |
|
326 | A d3/d11/a1 | |
|
327 | d1/d11/a1 | |||
269 | R d1/a |
|
328 | R d1/a | |
270 | R d1/b |
|
329 | R d1/b | |
271 | R d1/ba |
|
330 | R d1/ba | |
272 | R d1/d11/a1 |
|
331 | R d1/d11/a1 | |
273 | 4 files updated, 0 files merged, 3 files removed, 0 files unresolved |
|
332 | 4 files updated, 0 files merged, 3 files removed, 0 files unresolved | |
274 | # transitive rename |
|
333 | # transitive rename | |
275 | A d1/bc |
|
334 | A d1/bc | |
|
335 | d1/b | |||
276 | R d1/b |
|
336 | R d1/b | |
277 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
337 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
278 | # transitive rename --after |
|
338 | # transitive rename --after | |
279 | A d1/bc |
|
339 | A d1/bc | |
|
340 | d1/b | |||
280 | R d1/b |
|
341 | R d1/b | |
281 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
342 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
282 | # idempotent renames (d1/b -> d1/bb followed by d1/bb -> d1/b) |
|
343 | # idempotent renames (d1/b -> d1/bb followed by d1/bb -> d1/b) | |
283 | M d1/b |
|
344 | M d1/b | |
284 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
345 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
285 | # check illegal path components |
|
346 | # check illegal path components | |
286 | abort: path contains illegal component: .hg/foo |
|
347 | abort: path contains illegal component: .hg/foo | |
287 | abort: ../foo not under root |
|
348 | abort: ../foo not under root | |
288 | abort: path contains illegal component: .hg/foo |
|
349 | abort: path contains illegal component: .hg/foo | |
289 | ! d1/d11/a1 |
|
350 | ! d1/d11/a1 | |
290 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
351 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
291 | abort: path contains illegal component: .hg/a1 |
|
352 | abort: path contains illegal component: .hg/a1 | |
292 | abort: ../a1 not under root |
|
353 | abort: ../a1 not under root | |
293 | abort: path contains illegal component: .hg/a1 |
|
354 | abort: path contains illegal component: .hg/a1 | |
294 | ! d1/d11/a1 |
|
355 | ! d1/d11/a1 | |
295 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
356 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
296 | abort: path contains illegal component: .hg/foo |
|
357 | abort: path contains illegal component: .hg/foo | |
297 | abort: ../../../foo not under root |
|
358 | abort: ../../../foo not under root |
General Comments 0
You need to be logged in to leave comments.
Login now