Show More
@@ -0,0 +1,31 | |||
|
1 | #!/bin/bash | |
|
2 | ||
|
3 | for i in aaa zzz; do | |
|
4 | hg init t | |
|
5 | cd t | |
|
6 | ||
|
7 | echo "-- With $i" | |
|
8 | ||
|
9 | touch file | |
|
10 | hg add file | |
|
11 | hg ci -m "Add" | |
|
12 | ||
|
13 | hg cp file $i | |
|
14 | hg ci -m "a -> $i" | |
|
15 | ||
|
16 | hg cp $i other-file | |
|
17 | echo "different" >> $i | |
|
18 | hg ci -m "$i -> other-file" | |
|
19 | ||
|
20 | hg cp other-file somename | |
|
21 | ||
|
22 | echo "Status": | |
|
23 | hg st -C | |
|
24 | echo | |
|
25 | echo "Diff:" | |
|
26 | hg diff -g | |
|
27 | echo | |
|
28 | ||
|
29 | cd .. | |
|
30 | rm -rf t | |
|
31 | done |
@@ -0,0 +1,20 | |||
|
1 | -- With aaa | |
|
2 | Status: | |
|
3 | A somename | |
|
4 | other-file | |
|
5 | ||
|
6 | Diff: | |
|
7 | diff --git a/other-file b/somename | |
|
8 | copy from other-file | |
|
9 | copy to somename | |
|
10 | ||
|
11 | -- With zzz | |
|
12 | Status: | |
|
13 | A somename | |
|
14 | other-file | |
|
15 | ||
|
16 | Diff: | |
|
17 | diff --git a/other-file b/somename | |
|
18 | copy from other-file | |
|
19 | copy to somename | |
|
20 |
@@ -155,7 +155,7 def churn(ui, repo, **opts): | |||
|
155 | 155 | |
|
156 | 156 | for l in f.readlines(): |
|
157 | 157 | l = l.strip() |
|
158 |
alias, actual = l.split( |
|
|
158 | alias, actual = l.split() | |
|
159 | 159 | aliases[alias] = actual |
|
160 | 160 | |
|
161 | 161 | return aliases |
@@ -81,54 +81,3 def ancestor(a, b, pfunc): | |||
|
81 | 81 | gx = x.next() |
|
82 | 82 | except StopIteration: |
|
83 | 83 | return None |
|
84 | ||
|
85 | def symmetricdifference(a, b, pfunc): | |
|
86 | """symmetric difference of the sets of ancestors of a and b | |
|
87 | ||
|
88 | I.e. revisions that are ancestors of a or b, but not both. | |
|
89 | """ | |
|
90 | # basic idea: | |
|
91 | # - mark a and b with different colors | |
|
92 | # - walk the graph in topological order with the help of a heap; | |
|
93 | # for each revision r: | |
|
94 | # - if r has only one color, we want to return it | |
|
95 | # - add colors[r] to its parents | |
|
96 | # | |
|
97 | # We keep track of the number of revisions in the heap that | |
|
98 | # we may be interested in. We stop walking the graph as soon | |
|
99 | # as this number reaches 0. | |
|
100 | if a == b: | |
|
101 | return [a] | |
|
102 | ||
|
103 | WHITE = 1 | |
|
104 | BLACK = 2 | |
|
105 | ALLCOLORS = WHITE | BLACK | |
|
106 | colors = {a: WHITE, b: BLACK} | |
|
107 | ||
|
108 | visit = [-a, -b] | |
|
109 | heapq.heapify(visit) | |
|
110 | n_wanted = len(visit) | |
|
111 | ret = [] | |
|
112 | ||
|
113 | while n_wanted: | |
|
114 | r = -heapq.heappop(visit) | |
|
115 | wanted = colors[r] != ALLCOLORS | |
|
116 | n_wanted -= wanted | |
|
117 | if wanted: | |
|
118 | ret.append(r) | |
|
119 | ||
|
120 | for p in pfunc(r): | |
|
121 | if p not in colors: | |
|
122 | # first time we see p; add it to visit | |
|
123 | n_wanted += wanted | |
|
124 | colors[p] = colors[r] | |
|
125 | heapq.heappush(visit, -p) | |
|
126 | elif colors[p] != ALLCOLORS and colors[p] != colors[r]: | |
|
127 | # at first we thought we wanted p, but now | |
|
128 | # we know we don't really want it | |
|
129 | n_wanted -= 1 | |
|
130 | colors[p] |= colors[r] | |
|
131 | ||
|
132 | del colors[r] | |
|
133 | ||
|
134 | return ret |
@@ -227,7 +227,10 def backout(ui, repo, node=None, rev=Non | |||
|
227 | 227 | raise util.Abort(_('cannot use --parent on non-merge changeset')) |
|
228 | 228 | parent = p1 |
|
229 | 229 | |
|
230 | # the backout should appear on the same branch | |
|
231 | branch = repo.dirstate.branch() | |
|
230 | 232 | hg.clean(repo, node, show_stats=False) |
|
233 | repo.dirstate.setbranch(branch) | |
|
231 | 234 | revert_opts = opts.copy() |
|
232 | 235 | revert_opts['date'] = None |
|
233 | 236 | revert_opts['all'] = True |
@@ -7,7 +7,7 | |||
|
7 | 7 | |
|
8 | 8 | from node import nullid, nullrev |
|
9 | 9 | from i18n import _ |
|
10 |
import util, |
|
|
10 | import util, heapq | |
|
11 | 11 | |
|
12 | 12 | def _nonoverlap(d1, d2, d3): |
|
13 | 13 | "Return list of elements in d1 not in d2 or d3" |
@@ -35,40 +35,81 def _findoldnames(fctx, limit): | |||
|
35 | 35 | old = {} |
|
36 | 36 | seen = {} |
|
37 | 37 | orig = fctx.path() |
|
38 | visit = [fctx] | |
|
38 | visit = [(fctx, 0)] | |
|
39 | 39 | while visit: |
|
40 | fc = visit.pop() | |
|
40 | fc, depth = visit.pop() | |
|
41 | 41 | s = str(fc) |
|
42 | 42 | if s in seen: |
|
43 | 43 | continue |
|
44 | 44 | seen[s] = 1 |
|
45 | 45 | if fc.path() != orig and fc.path() not in old: |
|
46 |
old[fc.path()] = |
|
|
46 | old[fc.path()] = (depth, fc.path()) # remember depth | |
|
47 | 47 | if fc.rev() < limit and fc.rev() is not None: |
|
48 | 48 | continue |
|
49 | visit += fc.parents() | |
|
49 | visit += [(p, depth - 1) for p in fc.parents()] | |
|
50 | 50 | |
|
51 | old = old.keys() | |
|
51 | # return old names sorted by depth | |
|
52 | old = old.values() | |
|
52 | 53 | old.sort() |
|
53 | return old | |
|
54 | return [o[1] for o in old] | |
|
55 | ||
|
56 | def _findlimit(repo, a, b): | |
|
57 | "find the earliest revision that's an ancestor of a or b but not both" | |
|
58 | # basic idea: | |
|
59 | # - mark a and b with different sides | |
|
60 | # - if a parent's children are all on the same side, the parent is | |
|
61 | # on that side, otherwise it is on no side | |
|
62 | # - walk the graph in topological order with the help of a heap; | |
|
63 | # - add unseen parents to side map | |
|
64 | # - clear side of any parent that has children on different sides | |
|
65 | # - track number of interesting revs that might still be on a side | |
|
66 | # - track the lowest interesting rev seen | |
|
67 | # - quit when interesting revs is zero | |
|
68 | ||
|
69 | cl = repo.changelog | |
|
70 | working = cl.count() # pseudo rev for the working directory | |
|
71 | if a is None: | |
|
72 | a = working | |
|
73 | if b is None: | |
|
74 | b = working | |
|
54 | 75 | |
|
55 | def copies(repo, c1, c2, ca): | |
|
76 | side = {a: -1, b: 1} | |
|
77 | visit = [-a, -b] | |
|
78 | heapq.heapify(visit) | |
|
79 | interesting = len(visit) | |
|
80 | limit = working | |
|
81 | ||
|
82 | while interesting: | |
|
83 | r = -heapq.heappop(visit) | |
|
84 | if r == working: | |
|
85 | parents = [cl.rev(p) for p in repo.dirstate.parents()] | |
|
86 | else: | |
|
87 | parents = cl.parentrevs(r) | |
|
88 | for p in parents: | |
|
89 | if p not in side: | |
|
90 | # first time we see p; add it to visit | |
|
91 | side[p] = side[r] | |
|
92 | if side[p]: | |
|
93 | interesting += 1 | |
|
94 | heapq.heappush(visit, -p) | |
|
95 | elif side[p] and side[p] != side[r]: | |
|
96 | # p was interesting but now we know better | |
|
97 | side[p] = 0 | |
|
98 | interesting -= 1 | |
|
99 | if side[r]: | |
|
100 | limit = r # lowest rev visited | |
|
101 | interesting -= 1 | |
|
102 | return limit | |
|
103 | ||
|
104 | def copies(repo, c1, c2, ca, checkdirs=False): | |
|
56 | 105 | """ |
|
57 | 106 | Find moves and copies between context c1 and c2 |
|
58 | 107 | """ |
|
59 | 108 | # avoid silly behavior for update from empty dir |
|
60 | if not c1 or not c2: | |
|
109 | if not c1 or not c2 or c1 == c2: | |
|
61 | 110 | return {}, {} |
|
62 | 111 | |
|
63 |
|
|
|
64 | if rev1 is None: # c1 is a workingctx | |
|
65 | rev1 = c1.parents()[0].rev() | |
|
66 | if rev2 is None: # c2 is a workingctx | |
|
67 | rev2 = c2.parents()[0].rev() | |
|
68 | pr = repo.changelog.parentrevs | |
|
69 | def parents(rev): | |
|
70 | return [p for p in pr(rev) if p != nullrev] | |
|
71 | limit = min(ancestor.symmetricdifference(rev1, rev2, parents)) | |
|
112 | limit = _findlimit(repo, c1.rev(), c2.rev()) | |
|
72 | 113 | m1 = c1.manifest() |
|
73 | 114 | m2 = c2.manifest() |
|
74 | 115 | ma = ca.manifest() |
@@ -97,15 +138,12 def copies(repo, c1, c2, ca): | |||
|
97 | 138 | c2 = ctx(of, m2[of]) |
|
98 | 139 | ca = c1.ancestor(c2) |
|
99 | 140 | # related and named changed on only one side? |
|
100 | if ca and ca.path() == f or ca.path() == c2.path(): | |
|
141 | if ca and (ca.path() == f or ca.path() == c2.path()): | |
|
101 | 142 | if c1 != ca or c2 != ca: # merge needed? |
|
102 | 143 | copy[f] = of |
|
103 | 144 | elif of in ma: |
|
104 | 145 | diverge.setdefault(of, []).append(f) |
|
105 | 146 | |
|
106 | if not repo.ui.configbool("merge", "followcopies", True): | |
|
107 | return {}, {} | |
|
108 | ||
|
109 | 147 | repo.ui.debug(_(" searching for copies back to rev %d\n") % limit) |
|
110 | 148 | |
|
111 | 149 | u1 = _nonoverlap(m1, m2, ma) |
@@ -139,7 +177,7 def copies(repo, c1, c2, ca): | |||
|
139 | 177 | repo.ui.debug(_(" %s -> %s %s\n") % (f, fullcopy[f], note)) |
|
140 | 178 | del diverge2 |
|
141 | 179 | |
|
142 |
if not fullcopy or not |
|
|
180 | if not fullcopy or not checkdirs: | |
|
143 | 181 | return copy, diverge |
|
144 | 182 | |
|
145 | 183 | repo.ui.debug(_(" checking for directory renames\n")) |
@@ -186,7 +224,9 def copies(repo, c1, c2, ca): | |||
|
186 | 224 | for d in dirmove: |
|
187 | 225 | if f.startswith(d): |
|
188 | 226 | # new file added in a directory that was moved, move it |
|
189 |
|
|
|
227 | df = dirmove[d] + f[len(d):] | |
|
228 | if df not in copy: | |
|
229 | copy[f] = df | |
|
190 | 230 | repo.ui.debug(_(" file %s -> %s\n") % (f, copy[f])) |
|
191 | 231 | break |
|
192 | 232 |
@@ -101,7 +101,9 def manifestmerge(repo, p1, p2, pa, over | |||
|
101 | 101 | action.append((f, m) + args) |
|
102 | 102 | |
|
103 | 103 | if pa and not (backwards or overwrite): |
|
104 | copy, diverge = copies.copies(repo, p1, p2, pa) | |
|
104 | if repo.ui.configbool("merge", "followcopies", True): | |
|
105 | dirs = repo.ui.configbool("merge", "followdirs", True) | |
|
106 | copy, diverge = copies.copies(repo, p1, p2, pa, dirs) | |
|
105 | 107 | copied = dict.fromkeys(copy.values()) |
|
106 | 108 | for of, fl in diverge.items(): |
|
107 | 109 | act("divergent renames", "dr", of, fl) |
@@ -74,7 +74,7 marked working directory as branch branc | |||
|
74 | 74 | adding file2 |
|
75 | 75 | removing file1 |
|
76 | 76 | created new head |
|
77 |
changeset 3: |
|
|
77 | changeset 3:d4e8f6db59fb backs out changeset 1:bf1602f437f3 | |
|
78 | 78 | the backout changeset is a new head - do not forget to merge |
|
79 | 79 | (use "backout --merge" if you want to auto-merge) |
|
80 | 80 | % on branch2 with branch1 not merged, so file1 should still exist: |
@@ -85,10 +85,11 C file2 | |||
|
85 | 85 | % on branch2 with branch1 merged, so file1 should be gone: |
|
86 | 86 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
87 | 87 | (branch merge, don't forget to commit) |
|
88 |
2 |
|
|
88 | 22149cdde76d (branch2) tip | |
|
89 | 89 | C default |
|
90 | 90 | C file2 |
|
91 | 91 | % on branch1, so no file1 and file2: |
|
92 |
|
|
|
93 |
|
|
|
92 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
|
93 | bf1602f437f3 (branch1) | |
|
94 | 94 | C default |
|
95 | C file1 |
@@ -11,12 +11,17 cd t | |||
|
11 | 11 | # set up a boring main branch |
|
12 | 12 | add a a |
|
13 | 13 | hg add a |
|
14 | mkdir x | |
|
15 | add x/x x | |
|
16 | hg add x/x | |
|
14 | 17 | hg ci -m0 |
|
15 | 18 | |
|
16 | 19 | add a m1 |
|
17 | 20 | hg ci -m1 |
|
18 | 21 | |
|
19 | 22 | add a m2 |
|
23 | add x/y y1 | |
|
24 | hg add x/y | |
|
20 | 25 | hg ci -m2 |
|
21 | 26 | |
|
22 | 27 | show() |
@@ -59,6 +64,7 tb() | |||
|
59 | 64 | echo |
|
60 | 65 | } |
|
61 | 66 | |
|
67 | ||
|
62 | 68 | tb "add a a1" "add a a2" "hg mv a b" "rename in working dir" |
|
63 | 69 | tb "add a a1" "add a a2" "hg cp a b" "copy in working dir" |
|
64 | 70 | tb "hg mv a b" "add b b1" "add b w" "single rename" |
@@ -66,3 +72,5 tb "hg cp a b" "add b b1" "add a w" "sin | |||
|
66 | 72 | tb "hg mv a b" "hg mv b c" "hg mv c d" "rename chain" |
|
67 | 73 | tb "hg cp a b" "hg cp b c" "hg cp c d" "copy chain" |
|
68 | 74 | tb "add a a1" "hg mv a b" "hg mv b a" "circular rename" |
|
75 | ||
|
76 | tb "hg mv x y" "add y/x x1" "add y/x x2" "directory move" |
@@ -30,6 +30,7 rename to b | |||
|
30 | 30 | A b |
|
31 | 31 | a |
|
32 | 32 | R a |
|
33 | R x/y | |
|
33 | 34 | |
|
34 | 35 | diff --git a/a b/b |
|
35 | 36 | rename from a |
@@ -43,6 +44,12 rename to b | |||
|
43 | 44 | +0 |
|
44 | 45 | +a1 |
|
45 | 46 | +a2 |
|
47 | diff --git a/x/y b/x/y | |
|
48 | deleted file mode 100644 | |
|
49 | --- a/x/y | |
|
50 | +++ /dev/null | |
|
51 | @@ -1,1 +0,0 @@ | |
|
52 | -y1 | |
|
46 | 53 | |
|
47 | 54 | - root to parent: --rev 0 --rev . |
|
48 | 55 | M a |
@@ -70,6 +77,7 diff --git a/a b/a | |||
|
70 | 77 | |
|
71 | 78 | - branch to parent: --rev 2 --rev . |
|
72 | 79 | M a |
|
80 | R x/y | |
|
73 | 81 | |
|
74 | 82 | diff --git a/a b/a |
|
75 | 83 | --- a/a |
@@ -81,9 +89,16 diff --git a/a b/a | |||
|
81 | 89 | +0 |
|
82 | 90 | +a1 |
|
83 | 91 | +a2 |
|
92 | diff --git a/x/y b/x/y | |
|
93 | deleted file mode 100644 | |
|
94 | --- a/x/y | |
|
95 | +++ /dev/null | |
|
96 | @@ -1,1 +0,0 @@ | |
|
97 | -y1 | |
|
84 | 98 | |
|
85 | 99 | - parent to branch: --rev . --rev 2 |
|
86 | 100 | M a |
|
101 | A x/y | |
|
87 | 102 | |
|
88 | 103 | diff --git a/a b/a |
|
89 | 104 | --- a/a |
@@ -95,6 +110,12 diff --git a/a b/a | |||
|
95 | 110 | -a2 |
|
96 | 111 | +m1 |
|
97 | 112 | +m2 |
|
113 | diff --git a/x/y b/x/y | |
|
114 | new file mode 100644 | |
|
115 | --- /dev/null | |
|
116 | +++ b/x/y | |
|
117 | @@ -0,0 +1,1 @@ | |
|
118 | +y1 | |
|
98 | 119 | |
|
99 | 120 | |
|
100 | 121 | created new head |
@@ -136,6 +157,7 copy to b | |||
|
136 | 157 | M a |
|
137 | 158 | A b |
|
138 | 159 | a |
|
160 | R x/y | |
|
139 | 161 | |
|
140 | 162 | diff --git a/a b/a |
|
141 | 163 | --- a/a |
@@ -159,6 +181,12 copy to b | |||
|
159 | 181 | +1 |
|
160 | 182 | +a1 |
|
161 | 183 | +a2 |
|
184 | diff --git a/x/y b/x/y | |
|
185 | deleted file mode 100644 | |
|
186 | --- a/x/y | |
|
187 | +++ /dev/null | |
|
188 | @@ -1,1 +0,0 @@ | |
|
189 | -y1 | |
|
162 | 190 | |
|
163 | 191 | - root to parent: --rev 0 --rev . |
|
164 | 192 | M a |
@@ -186,6 +214,7 diff --git a/a b/a | |||
|
186 | 214 | |
|
187 | 215 | - branch to parent: --rev 2 --rev . |
|
188 | 216 | M a |
|
217 | R x/y | |
|
189 | 218 | |
|
190 | 219 | diff --git a/a b/a |
|
191 | 220 | --- a/a |
@@ -197,9 +226,16 diff --git a/a b/a | |||
|
197 | 226 | +1 |
|
198 | 227 | +a1 |
|
199 | 228 | +a2 |
|
229 | diff --git a/x/y b/x/y | |
|
230 | deleted file mode 100644 | |
|
231 | --- a/x/y | |
|
232 | +++ /dev/null | |
|
233 | @@ -1,1 +0,0 @@ | |
|
234 | -y1 | |
|
200 | 235 | |
|
201 | 236 | - parent to branch: --rev . --rev 2 |
|
202 | 237 | M a |
|
238 | A x/y | |
|
203 | 239 | |
|
204 | 240 | diff --git a/a b/a |
|
205 | 241 | --- a/a |
@@ -211,6 +247,12 diff --git a/a b/a | |||
|
211 | 247 | -a2 |
|
212 | 248 | +m1 |
|
213 | 249 | +m2 |
|
250 | diff --git a/x/y b/x/y | |
|
251 | new file mode 100644 | |
|
252 | --- /dev/null | |
|
253 | +++ b/x/y | |
|
254 | @@ -0,0 +1,1 @@ | |
|
255 | +y1 | |
|
214 | 256 | |
|
215 | 257 | |
|
216 | 258 | created new head |
@@ -248,6 +290,7 rename to b | |||
|
248 | 290 | A b |
|
249 | 291 | a |
|
250 | 292 | R a |
|
293 | R x/y | |
|
251 | 294 | |
|
252 | 295 | diff --git a/a b/b |
|
253 | 296 | rename from a |
@@ -261,6 +304,12 rename to b | |||
|
261 | 304 | +2 |
|
262 | 305 | +b1 |
|
263 | 306 | +w |
|
307 | diff --git a/x/y b/x/y | |
|
308 | deleted file mode 100644 | |
|
309 | --- a/x/y | |
|
310 | +++ /dev/null | |
|
311 | @@ -1,1 +0,0 @@ | |
|
312 | -y1 | |
|
264 | 313 | |
|
265 | 314 | - root to parent: --rev 0 --rev . |
|
266 | 315 | A b |
@@ -296,6 +345,7 rename to a | |||
|
296 | 345 | A b |
|
297 | 346 | a |
|
298 | 347 | R a |
|
348 | R x/y | |
|
299 | 349 | |
|
300 | 350 | diff --git a/a b/b |
|
301 | 351 | rename from a |
@@ -308,10 +358,17 rename to b | |||
|
308 | 358 | -m2 |
|
309 | 359 | +2 |
|
310 | 360 | +b1 |
|
361 | diff --git a/x/y b/x/y | |
|
362 | deleted file mode 100644 | |
|
363 | --- a/x/y | |
|
364 | +++ /dev/null | |
|
365 | @@ -1,1 +0,0 @@ | |
|
366 | -y1 | |
|
311 | 367 | |
|
312 | 368 | - parent to branch: --rev . --rev 2 |
|
313 | 369 | A a |
|
314 | 370 | b |
|
371 | A x/y | |
|
315 | 372 | R b |
|
316 | 373 | |
|
317 | 374 | diff --git a/b b/a |
@@ -325,6 +382,12 rename to a | |||
|
325 | 382 | -b1 |
|
326 | 383 | +m1 |
|
327 | 384 | +m2 |
|
385 | diff --git a/x/y b/x/y | |
|
386 | new file mode 100644 | |
|
387 | --- /dev/null | |
|
388 | +++ b/x/y | |
|
389 | @@ -0,0 +1,1 @@ | |
|
390 | +y1 | |
|
328 | 391 | |
|
329 | 392 | |
|
330 | 393 | created new head |
@@ -367,6 +430,7 copy to b | |||
|
367 | 430 | M a |
|
368 | 431 | A b |
|
369 | 432 | a |
|
433 | R x/y | |
|
370 | 434 | |
|
371 | 435 | diff --git a/a b/a |
|
372 | 436 | --- a/a |
@@ -388,6 +452,12 copy to b | |||
|
388 | 452 | -m2 |
|
389 | 453 | +3 |
|
390 | 454 | +b1 |
|
455 | diff --git a/x/y b/x/y | |
|
456 | deleted file mode 100644 | |
|
457 | --- a/x/y | |
|
458 | +++ /dev/null | |
|
459 | @@ -1,1 +0,0 @@ | |
|
460 | -y1 | |
|
391 | 461 | |
|
392 | 462 | - root to parent: --rev 0 --rev . |
|
393 | 463 | M a |
@@ -433,6 +503,7 deleted file mode 100644 | |||
|
433 | 503 | M a |
|
434 | 504 | A b |
|
435 | 505 | a |
|
506 | R x/y | |
|
436 | 507 | |
|
437 | 508 | diff --git a/a b/a |
|
438 | 509 | --- a/a |
@@ -453,9 +524,16 copy to b | |||
|
453 | 524 | -m2 |
|
454 | 525 | +3 |
|
455 | 526 | +b1 |
|
527 | diff --git a/x/y b/x/y | |
|
528 | deleted file mode 100644 | |
|
529 | --- a/x/y | |
|
530 | +++ /dev/null | |
|
531 | @@ -1,1 +0,0 @@ | |
|
532 | -y1 | |
|
456 | 533 | |
|
457 | 534 | - parent to branch: --rev . --rev 2 |
|
458 | 535 | M a |
|
536 | A x/y | |
|
459 | 537 | R b |
|
460 | 538 | |
|
461 | 539 | diff --git a/a b/a |
@@ -474,6 +552,12 deleted file mode 100644 | |||
|
474 | 552 | -a |
|
475 | 553 | -3 |
|
476 | 554 | -b1 |
|
555 | diff --git a/x/y b/x/y | |
|
556 | new file mode 100644 | |
|
557 | --- /dev/null | |
|
558 | +++ b/x/y | |
|
559 | @@ -0,0 +1,1 @@ | |
|
560 | +y1 | |
|
477 | 561 | |
|
478 | 562 | |
|
479 | 563 | created new head |
@@ -506,6 +590,7 rename to d | |||
|
506 | 590 | A d |
|
507 | 591 | a |
|
508 | 592 | R a |
|
593 | R x/y | |
|
509 | 594 | |
|
510 | 595 | diff --git a/a b/d |
|
511 | 596 | rename from a |
@@ -517,6 +602,12 rename to d | |||
|
517 | 602 | -m1 |
|
518 | 603 | -m2 |
|
519 | 604 | +4 |
|
605 | diff --git a/x/y b/x/y | |
|
606 | deleted file mode 100644 | |
|
607 | --- a/x/y | |
|
608 | +++ /dev/null | |
|
609 | @@ -1,1 +0,0 @@ | |
|
610 | -y1 | |
|
520 | 611 | |
|
521 | 612 | - root to parent: --rev 0 --rev . |
|
522 | 613 | A c |
@@ -550,6 +641,7 rename to a | |||
|
550 | 641 | A c |
|
551 | 642 | a |
|
552 | 643 | R a |
|
644 | R x/y | |
|
553 | 645 | |
|
554 | 646 | diff --git a/a b/c |
|
555 | 647 | rename from a |
@@ -561,10 +653,17 rename to c | |||
|
561 | 653 | -m1 |
|
562 | 654 | -m2 |
|
563 | 655 | +4 |
|
656 | diff --git a/x/y b/x/y | |
|
657 | deleted file mode 100644 | |
|
658 | --- a/x/y | |
|
659 | +++ /dev/null | |
|
660 | @@ -1,1 +0,0 @@ | |
|
661 | -y1 | |
|
564 | 662 | |
|
565 | 663 | - parent to branch: --rev . --rev 2 |
|
566 | 664 | A a |
|
567 | 665 | c |
|
666 | A x/y | |
|
568 | 667 | R c |
|
569 | 668 | |
|
570 | 669 | diff --git a/c b/a |
@@ -577,6 +676,12 rename to a | |||
|
577 | 676 | -4 |
|
578 | 677 | +m1 |
|
579 | 678 | +m2 |
|
679 | diff --git a/x/y b/x/y | |
|
680 | new file mode 100644 | |
|
681 | --- /dev/null | |
|
682 | +++ b/x/y | |
|
683 | @@ -0,0 +1,1 @@ | |
|
684 | +y1 | |
|
580 | 685 | |
|
581 | 686 | |
|
582 | 687 | created new head |
@@ -638,6 +743,7 A c | |||
|
638 | 743 | a |
|
639 | 744 | A d |
|
640 | 745 | a |
|
746 | R x/y | |
|
641 | 747 | |
|
642 | 748 | diff --git a/a b/a |
|
643 | 749 | --- a/a |
@@ -677,6 +783,12 copy to d | |||
|
677 | 783 | -m1 |
|
678 | 784 | -m2 |
|
679 | 785 | +5 |
|
786 | diff --git a/x/y b/x/y | |
|
787 | deleted file mode 100644 | |
|
788 | --- a/x/y | |
|
789 | +++ /dev/null | |
|
790 | @@ -1,1 +0,0 @@ | |
|
791 | -y1 | |
|
680 | 792 | |
|
681 | 793 | - root to parent: --rev 0 --rev . |
|
682 | 794 | M a |
@@ -740,6 +852,7 A b | |||
|
740 | 852 | a |
|
741 | 853 | A c |
|
742 | 854 | a |
|
855 | R x/y | |
|
743 | 856 | |
|
744 | 857 | diff --git a/a b/a |
|
745 | 858 | --- a/a |
@@ -769,9 +882,16 copy to c | |||
|
769 | 882 | -m1 |
|
770 | 883 | -m2 |
|
771 | 884 | +5 |
|
885 | diff --git a/x/y b/x/y | |
|
886 | deleted file mode 100644 | |
|
887 | --- a/x/y | |
|
888 | +++ /dev/null | |
|
889 | @@ -1,1 +0,0 @@ | |
|
890 | -y1 | |
|
772 | 891 | |
|
773 | 892 | - parent to branch: --rev . --rev 2 |
|
774 | 893 | M a |
|
894 | A x/y | |
|
775 | 895 | R b |
|
776 | 896 | R c |
|
777 | 897 | |
@@ -797,6 +917,12 deleted file mode 100644 | |||
|
797 | 917 | @@ -1,2 +0,0 @@ |
|
798 | 918 | -a |
|
799 | 919 | -5 |
|
920 | diff --git a/x/y b/x/y | |
|
921 | new file mode 100644 | |
|
922 | --- /dev/null | |
|
923 | +++ b/x/y | |
|
924 | @@ -0,0 +1,1 @@ | |
|
925 | +y1 | |
|
800 | 926 | |
|
801 | 927 | |
|
802 | 928 | created new head |
@@ -824,6 +950,7 diff --git a/a b/a | |||
|
824 | 950 | |
|
825 | 951 | - working to branch: --rev 2 |
|
826 | 952 | M a |
|
953 | R x/y | |
|
827 | 954 | |
|
828 | 955 | diff --git a/a b/a |
|
829 | 956 | --- a/a |
@@ -834,6 +961,12 diff --git a/a b/a | |||
|
834 | 961 | -m2 |
|
835 | 962 | +6 |
|
836 | 963 | +a1 |
|
964 | diff --git a/x/y b/x/y | |
|
965 | deleted file mode 100644 | |
|
966 | --- a/x/y | |
|
967 | +++ /dev/null | |
|
968 | @@ -1,1 +0,0 @@ | |
|
969 | -y1 | |
|
837 | 970 | |
|
838 | 971 | - root to parent: --rev 0 --rev . |
|
839 | 972 | A b |
@@ -869,6 +1002,7 rename to a | |||
|
869 | 1002 | A b |
|
870 | 1003 | a |
|
871 | 1004 | R a |
|
1005 | R x/y | |
|
872 | 1006 | |
|
873 | 1007 | diff --git a/a b/b |
|
874 | 1008 | rename from a |
@@ -881,10 +1015,17 rename to b | |||
|
881 | 1015 | -m2 |
|
882 | 1016 | +6 |
|
883 | 1017 | +a1 |
|
1018 | diff --git a/x/y b/x/y | |
|
1019 | deleted file mode 100644 | |
|
1020 | --- a/x/y | |
|
1021 | +++ /dev/null | |
|
1022 | @@ -1,1 +0,0 @@ | |
|
1023 | -y1 | |
|
884 | 1024 | |
|
885 | 1025 | - parent to branch: --rev . --rev 2 |
|
886 | 1026 | A a |
|
887 | 1027 | b |
|
1028 | A x/y | |
|
888 | 1029 | R b |
|
889 | 1030 | |
|
890 | 1031 | diff --git a/b b/a |
@@ -898,5 +1039,182 rename to a | |||
|
898 | 1039 | -a1 |
|
899 | 1040 | +m1 |
|
900 | 1041 | +m2 |
|
1042 | diff --git a/x/y b/x/y | |
|
1043 | new file mode 100644 | |
|
1044 | --- /dev/null | |
|
1045 | +++ b/x/y | |
|
1046 | @@ -0,0 +1,1 @@ | |
|
1047 | +y1 | |
|
901 | 1048 | |
|
902 | 1049 | |
|
1050 | created new head | |
|
1051 | moving x/x to y/x | |
|
1052 | ** directory move ** | |
|
1053 | ** hg mv x y / add y/x x1 / add y/x x2 | |
|
1054 | - working to parent: | |
|
1055 | M y/x | |
|
1056 | ||
|
1057 | diff --git a/y/x b/y/x | |
|
1058 | --- a/y/x | |
|
1059 | +++ b/y/x | |
|
1060 | @@ -1,2 +1,3 @@ | |
|
1061 | x | |
|
1062 | x1 | |
|
1063 | +x2 | |
|
1064 | ||
|
1065 | - working to root: --rev 0 | |
|
1066 | M a | |
|
1067 | A y/x | |
|
1068 | x/x | |
|
1069 | R x/x | |
|
1070 | ||
|
1071 | diff --git a/a b/a | |
|
1072 | --- a/a | |
|
1073 | +++ b/a | |
|
1074 | @@ -1,1 +1,2 @@ | |
|
1075 | a | |
|
1076 | +7 | |
|
1077 | diff --git a/x/x b/y/x | |
|
1078 | rename from x/x | |
|
1079 | rename to y/x | |
|
1080 | --- a/x/x | |
|
1081 | +++ b/y/x | |
|
1082 | @@ -1,1 +1,3 @@ | |
|
1083 | x | |
|
1084 | +x1 | |
|
1085 | +x2 | |
|
1086 | ||
|
1087 | - working to branch: --rev 2 | |
|
1088 | M a | |
|
1089 | A y/x | |
|
1090 | x/x | |
|
1091 | R x/x | |
|
1092 | R x/y | |
|
1093 | ||
|
1094 | diff --git a/a b/a | |
|
1095 | --- a/a | |
|
1096 | +++ b/a | |
|
1097 | @@ -1,3 +1,2 @@ | |
|
1098 | a | |
|
1099 | -m1 | |
|
1100 | -m2 | |
|
1101 | +7 | |
|
1102 | diff --git a/x/y b/x/y | |
|
1103 | deleted file mode 100644 | |
|
1104 | --- a/x/y | |
|
1105 | +++ /dev/null | |
|
1106 | @@ -1,1 +0,0 @@ | |
|
1107 | -y1 | |
|
1108 | diff --git a/x/x b/y/x | |
|
1109 | rename from x/x | |
|
1110 | rename to y/x | |
|
1111 | --- a/x/x | |
|
1112 | +++ b/y/x | |
|
1113 | @@ -1,1 +1,3 @@ | |
|
1114 | x | |
|
1115 | +x1 | |
|
1116 | +x2 | |
|
1117 | ||
|
1118 | - root to parent: --rev 0 --rev . | |
|
1119 | M a | |
|
1120 | A y/x | |
|
1121 | x/x | |
|
1122 | R x/x | |
|
1123 | ||
|
1124 | diff --git a/a b/a | |
|
1125 | --- a/a | |
|
1126 | +++ b/a | |
|
1127 | @@ -1,1 +1,2 @@ | |
|
1128 | a | |
|
1129 | +7 | |
|
1130 | diff --git a/x/x b/y/x | |
|
1131 | rename from x/x | |
|
1132 | rename to y/x | |
|
1133 | --- a/x/x | |
|
1134 | +++ b/y/x | |
|
1135 | @@ -1,1 +1,2 @@ | |
|
1136 | x | |
|
1137 | +x1 | |
|
1138 | ||
|
1139 | - parent to root: --rev . --rev 0 | |
|
1140 | M a | |
|
1141 | A x/x | |
|
1142 | y/x | |
|
1143 | R y/x | |
|
1144 | ||
|
1145 | diff --git a/a b/a | |
|
1146 | --- a/a | |
|
1147 | +++ b/a | |
|
1148 | @@ -1,2 +1,1 @@ | |
|
1149 | a | |
|
1150 | -7 | |
|
1151 | diff --git a/y/x b/x/x | |
|
1152 | rename from y/x | |
|
1153 | rename to x/x | |
|
1154 | --- a/y/x | |
|
1155 | +++ b/x/x | |
|
1156 | @@ -1,2 +1,1 @@ | |
|
1157 | x | |
|
1158 | -x1 | |
|
1159 | ||
|
1160 | - branch to parent: --rev 2 --rev . | |
|
1161 | M a | |
|
1162 | A y/x | |
|
1163 | x/x | |
|
1164 | R x/x | |
|
1165 | R x/y | |
|
1166 | ||
|
1167 | diff --git a/a b/a | |
|
1168 | --- a/a | |
|
1169 | +++ b/a | |
|
1170 | @@ -1,3 +1,2 @@ | |
|
1171 | a | |
|
1172 | -m1 | |
|
1173 | -m2 | |
|
1174 | +7 | |
|
1175 | diff --git a/x/y b/x/y | |
|
1176 | deleted file mode 100644 | |
|
1177 | --- a/x/y | |
|
1178 | +++ /dev/null | |
|
1179 | @@ -1,1 +0,0 @@ | |
|
1180 | -y1 | |
|
1181 | diff --git a/x/x b/y/x | |
|
1182 | rename from x/x | |
|
1183 | rename to y/x | |
|
1184 | --- a/x/x | |
|
1185 | +++ b/y/x | |
|
1186 | @@ -1,1 +1,2 @@ | |
|
1187 | x | |
|
1188 | +x1 | |
|
1189 | ||
|
1190 | - parent to branch: --rev . --rev 2 | |
|
1191 | M a | |
|
1192 | A x/x | |
|
1193 | y/x | |
|
1194 | A x/y | |
|
1195 | R y/x | |
|
1196 | ||
|
1197 | diff --git a/a b/a | |
|
1198 | --- a/a | |
|
1199 | +++ b/a | |
|
1200 | @@ -1,2 +1,3 @@ | |
|
1201 | a | |
|
1202 | -7 | |
|
1203 | +m1 | |
|
1204 | +m2 | |
|
1205 | diff --git a/y/x b/x/x | |
|
1206 | rename from y/x | |
|
1207 | rename to x/x | |
|
1208 | --- a/y/x | |
|
1209 | +++ b/x/x | |
|
1210 | @@ -1,2 +1,1 @@ | |
|
1211 | x | |
|
1212 | -x1 | |
|
1213 | diff --git a/x/y b/x/y | |
|
1214 | new file mode 100644 | |
|
1215 | --- /dev/null | |
|
1216 | +++ b/x/y | |
|
1217 | @@ -0,0 +1,1 @@ | |
|
1218 | +y1 | |
|
1219 | ||
|
1220 |
General Comments 0
You need to be logged in to leave comments.
Login now