##// END OF EJS Templates
Merge with crew-stable
Patrick Mezard -
r10180:a9f60014 merge default
parent child Browse files
Show More
@@ -1,233 +1,245
1 # copies.py - copy detection for Mercurial
1 # copies.py - copy detection for Mercurial
2 #
2 #
3 # Copyright 2008 Matt Mackall <mpm@selenic.com>
3 # Copyright 2008 Matt Mackall <mpm@selenic.com>
4 #
4 #
5 # This software may be used and distributed according to the terms of the
5 # This software may be used and distributed according to the terms of the
6 # GNU General Public License version 2, incorporated herein by reference.
6 # GNU General Public License version 2, incorporated herein by reference.
7
7
8 from i18n import _
8 from i18n import _
9 import util
9 import util
10 import heapq
10 import heapq
11
11
12 def _nonoverlap(d1, d2, d3):
12 def _nonoverlap(d1, d2, d3):
13 "Return list of elements in d1 not in d2 or d3"
13 "Return list of elements in d1 not in d2 or d3"
14 return sorted([d for d in d1 if d not in d3 and d not in d2])
14 return sorted([d for d in d1 if d not in d3 and d not in d2])
15
15
16 def _dirname(f):
16 def _dirname(f):
17 s = f.rfind("/")
17 s = f.rfind("/")
18 if s == -1:
18 if s == -1:
19 return ""
19 return ""
20 return f[:s]
20 return f[:s]
21
21
22 def _dirs(files):
22 def _dirs(files):
23 d = set()
23 d = set()
24 for f in files:
24 for f in files:
25 f = _dirname(f)
25 f = _dirname(f)
26 while f not in d:
26 while f not in d:
27 d.add(f)
27 d.add(f)
28 f = _dirname(f)
28 f = _dirname(f)
29 return d
29 return d
30
30
31 def _findoldnames(fctx, limit):
31 def _findoldnames(fctx, limit):
32 "find files that path was copied from, back to linkrev limit"
32 "find files that path was copied from, back to linkrev limit"
33 old = {}
33 old = {}
34 seen = set()
34 seen = set()
35 orig = fctx.path()
35 orig = fctx.path()
36 visit = [(fctx, 0)]
36 visit = [(fctx, 0)]
37 while visit:
37 while visit:
38 fc, depth = visit.pop()
38 fc, depth = visit.pop()
39 s = str(fc)
39 s = str(fc)
40 if s in seen:
40 if s in seen:
41 continue
41 continue
42 seen.add(s)
42 seen.add(s)
43 if fc.path() != orig and fc.path() not in old:
43 if fc.path() != orig and fc.path() not in old:
44 old[fc.path()] = (depth, fc.path()) # remember depth
44 old[fc.path()] = (depth, fc.path()) # remember depth
45 if fc.rev() is not None and fc.rev() < limit:
45 if fc.rev() is not None and fc.rev() < limit:
46 continue
46 continue
47 visit += [(p, depth - 1) for p in fc.parents()]
47 visit += [(p, depth - 1) for p in fc.parents()]
48
48
49 # return old names sorted by depth
49 # return old names sorted by depth
50 return [o[1] for o in sorted(old.values())]
50 return [o[1] for o in sorted(old.values())]
51
51
52 def _findlimit(repo, a, b):
52 def _findlimit(repo, a, b):
53 "find the earliest revision that's an ancestor of a or b but not both"
53 """Find the earliest revision that's an ancestor of a or b but not both,
54 None if no such revision exists.
55 """
54 # basic idea:
56 # basic idea:
55 # - mark a and b with different sides
57 # - mark a and b with different sides
56 # - if a parent's children are all on the same side, the parent is
58 # - if a parent's children are all on the same side, the parent is
57 # on that side, otherwise it is on no side
59 # on that side, otherwise it is on no side
58 # - walk the graph in topological order with the help of a heap;
60 # - walk the graph in topological order with the help of a heap;
59 # - add unseen parents to side map
61 # - add unseen parents to side map
60 # - clear side of any parent that has children on different sides
62 # - clear side of any parent that has children on different sides
61 # - track number of interesting revs that might still be on a side
63 # - track number of interesting revs that might still be on a side
62 # - track the lowest interesting rev seen
64 # - track the lowest interesting rev seen
63 # - quit when interesting revs is zero
65 # - quit when interesting revs is zero
64
66
65 cl = repo.changelog
67 cl = repo.changelog
66 working = len(cl) # pseudo rev for the working directory
68 working = len(cl) # pseudo rev for the working directory
67 if a is None:
69 if a is None:
68 a = working
70 a = working
69 if b is None:
71 if b is None:
70 b = working
72 b = working
71
73
72 side = {a: -1, b: 1}
74 side = {a: -1, b: 1}
73 visit = [-a, -b]
75 visit = [-a, -b]
74 heapq.heapify(visit)
76 heapq.heapify(visit)
75 interesting = len(visit)
77 interesting = len(visit)
78 hascommonancestor = False
76 limit = working
79 limit = working
77
80
78 while interesting:
81 while interesting:
79 r = -heapq.heappop(visit)
82 r = -heapq.heappop(visit)
80 if r == working:
83 if r == working:
81 parents = [cl.rev(p) for p in repo.dirstate.parents()]
84 parents = [cl.rev(p) for p in repo.dirstate.parents()]
82 else:
85 else:
83 parents = cl.parentrevs(r)
86 parents = cl.parentrevs(r)
84 for p in parents:
87 for p in parents:
88 if p < 0:
89 continue
85 if p not in side:
90 if p not in side:
86 # first time we see p; add it to visit
91 # first time we see p; add it to visit
87 side[p] = side[r]
92 side[p] = side[r]
88 if side[p]:
93 if side[p]:
89 interesting += 1
94 interesting += 1
90 heapq.heappush(visit, -p)
95 heapq.heappush(visit, -p)
91 elif side[p] and side[p] != side[r]:
96 elif side[p] and side[p] != side[r]:
92 # p was interesting but now we know better
97 # p was interesting but now we know better
93 side[p] = 0
98 side[p] = 0
94 interesting -= 1
99 interesting -= 1
100 hascommonancestor = True
95 if side[r]:
101 if side[r]:
96 limit = r # lowest rev visited
102 limit = r # lowest rev visited
97 interesting -= 1
103 interesting -= 1
104
105 if not hascommonancestor:
106 return None
98 return limit
107 return limit
99
108
100 def copies(repo, c1, c2, ca, checkdirs=False):
109 def copies(repo, c1, c2, ca, checkdirs=False):
101 """
110 """
102 Find moves and copies between context c1 and c2
111 Find moves and copies between context c1 and c2
103 """
112 """
104 # avoid silly behavior for update from empty dir
113 # avoid silly behavior for update from empty dir
105 if not c1 or not c2 or c1 == c2:
114 if not c1 or not c2 or c1 == c2:
106 return {}, {}
115 return {}, {}
107
116
108 # avoid silly behavior for parent -> working dir
117 # avoid silly behavior for parent -> working dir
109 if c2.node() is None and c1.node() == repo.dirstate.parents()[0]:
118 if c2.node() is None and c1.node() == repo.dirstate.parents()[0]:
110 return repo.dirstate.copies(), {}
119 return repo.dirstate.copies(), {}
111
120
112 limit = _findlimit(repo, c1.rev(), c2.rev())
121 limit = _findlimit(repo, c1.rev(), c2.rev())
122 if limit is None:
123 # no common ancestor, no copies
124 return {}, {}
113 m1 = c1.manifest()
125 m1 = c1.manifest()
114 m2 = c2.manifest()
126 m2 = c2.manifest()
115 ma = ca.manifest()
127 ma = ca.manifest()
116
128
117 def makectx(f, n):
129 def makectx(f, n):
118 if len(n) != 20: # in a working context?
130 if len(n) != 20: # in a working context?
119 if c1.rev() is None:
131 if c1.rev() is None:
120 return c1.filectx(f)
132 return c1.filectx(f)
121 return c2.filectx(f)
133 return c2.filectx(f)
122 return repo.filectx(f, fileid=n)
134 return repo.filectx(f, fileid=n)
123
135
124 ctx = util.lrucachefunc(makectx)
136 ctx = util.lrucachefunc(makectx)
125 copy = {}
137 copy = {}
126 fullcopy = {}
138 fullcopy = {}
127 diverge = {}
139 diverge = {}
128
140
129 def checkcopies(f, m1, m2):
141 def checkcopies(f, m1, m2):
130 '''check possible copies of f from m1 to m2'''
142 '''check possible copies of f from m1 to m2'''
131 c1 = ctx(f, m1[f])
143 c1 = ctx(f, m1[f])
132 for of in _findoldnames(c1, limit):
144 for of in _findoldnames(c1, limit):
133 fullcopy[f] = of # remember for dir rename detection
145 fullcopy[f] = of # remember for dir rename detection
134 if of in m2: # original file not in other manifest?
146 if of in m2: # original file not in other manifest?
135 # if the original file is unchanged on the other branch,
147 # if the original file is unchanged on the other branch,
136 # no merge needed
148 # no merge needed
137 if m2[of] != ma.get(of):
149 if m2[of] != ma.get(of):
138 c2 = ctx(of, m2[of])
150 c2 = ctx(of, m2[of])
139 ca = c1.ancestor(c2)
151 ca = c1.ancestor(c2)
140 # related and named changed on only one side?
152 # related and named changed on only one side?
141 if ca and (ca.path() == f or ca.path() == c2.path()):
153 if ca and (ca.path() == f or ca.path() == c2.path()):
142 if c1 != ca or c2 != ca: # merge needed?
154 if c1 != ca or c2 != ca: # merge needed?
143 copy[f] = of
155 copy[f] = of
144 elif of in ma:
156 elif of in ma:
145 diverge.setdefault(of, []).append(f)
157 diverge.setdefault(of, []).append(f)
146
158
147 repo.ui.debug(" searching for copies back to rev %d\n" % limit)
159 repo.ui.debug(" searching for copies back to rev %d\n" % limit)
148
160
149 u1 = _nonoverlap(m1, m2, ma)
161 u1 = _nonoverlap(m1, m2, ma)
150 u2 = _nonoverlap(m2, m1, ma)
162 u2 = _nonoverlap(m2, m1, ma)
151
163
152 if u1:
164 if u1:
153 repo.ui.debug(" unmatched files in local:\n %s\n"
165 repo.ui.debug(" unmatched files in local:\n %s\n"
154 % "\n ".join(u1))
166 % "\n ".join(u1))
155 if u2:
167 if u2:
156 repo.ui.debug(" unmatched files in other:\n %s\n"
168 repo.ui.debug(" unmatched files in other:\n %s\n"
157 % "\n ".join(u2))
169 % "\n ".join(u2))
158
170
159 for f in u1:
171 for f in u1:
160 checkcopies(f, m1, m2)
172 checkcopies(f, m1, m2)
161 for f in u2:
173 for f in u2:
162 checkcopies(f, m2, m1)
174 checkcopies(f, m2, m1)
163
175
164 diverge2 = set()
176 diverge2 = set()
165 for of, fl in diverge.items():
177 for of, fl in diverge.items():
166 if len(fl) == 1:
178 if len(fl) == 1:
167 del diverge[of] # not actually divergent
179 del diverge[of] # not actually divergent
168 else:
180 else:
169 diverge2.update(fl) # reverse map for below
181 diverge2.update(fl) # reverse map for below
170
182
171 if fullcopy:
183 if fullcopy:
172 repo.ui.debug(" all copies found (* = to merge, ! = divergent):\n")
184 repo.ui.debug(" all copies found (* = to merge, ! = divergent):\n")
173 for f in fullcopy:
185 for f in fullcopy:
174 note = ""
186 note = ""
175 if f in copy: note += "*"
187 if f in copy: note += "*"
176 if f in diverge2: note += "!"
188 if f in diverge2: note += "!"
177 repo.ui.debug(" %s -> %s %s\n" % (f, fullcopy[f], note))
189 repo.ui.debug(" %s -> %s %s\n" % (f, fullcopy[f], note))
178 del diverge2
190 del diverge2
179
191
180 if not fullcopy or not checkdirs:
192 if not fullcopy or not checkdirs:
181 return copy, diverge
193 return copy, diverge
182
194
183 repo.ui.debug(" checking for directory renames\n")
195 repo.ui.debug(" checking for directory renames\n")
184
196
185 # generate a directory move map
197 # generate a directory move map
186 d1, d2 = _dirs(m1), _dirs(m2)
198 d1, d2 = _dirs(m1), _dirs(m2)
187 invalid = set()
199 invalid = set()
188 dirmove = {}
200 dirmove = {}
189
201
190 # examine each file copy for a potential directory move, which is
202 # examine each file copy for a potential directory move, which is
191 # when all the files in a directory are moved to a new directory
203 # when all the files in a directory are moved to a new directory
192 for dst, src in fullcopy.iteritems():
204 for dst, src in fullcopy.iteritems():
193 dsrc, ddst = _dirname(src), _dirname(dst)
205 dsrc, ddst = _dirname(src), _dirname(dst)
194 if dsrc in invalid:
206 if dsrc in invalid:
195 # already seen to be uninteresting
207 # already seen to be uninteresting
196 continue
208 continue
197 elif dsrc in d1 and ddst in d1:
209 elif dsrc in d1 and ddst in d1:
198 # directory wasn't entirely moved locally
210 # directory wasn't entirely moved locally
199 invalid.add(dsrc)
211 invalid.add(dsrc)
200 elif dsrc in d2 and ddst in d2:
212 elif dsrc in d2 and ddst in d2:
201 # directory wasn't entirely moved remotely
213 # directory wasn't entirely moved remotely
202 invalid.add(dsrc)
214 invalid.add(dsrc)
203 elif dsrc in dirmove and dirmove[dsrc] != ddst:
215 elif dsrc in dirmove and dirmove[dsrc] != ddst:
204 # files from the same directory moved to two different places
216 # files from the same directory moved to two different places
205 invalid.add(dsrc)
217 invalid.add(dsrc)
206 else:
218 else:
207 # looks good so far
219 # looks good so far
208 dirmove[dsrc + "/"] = ddst + "/"
220 dirmove[dsrc + "/"] = ddst + "/"
209
221
210 for i in invalid:
222 for i in invalid:
211 if i in dirmove:
223 if i in dirmove:
212 del dirmove[i]
224 del dirmove[i]
213 del d1, d2, invalid
225 del d1, d2, invalid
214
226
215 if not dirmove:
227 if not dirmove:
216 return copy, diverge
228 return copy, diverge
217
229
218 for d in dirmove:
230 for d in dirmove:
219 repo.ui.debug(" dir %s -> %s\n" % (d, dirmove[d]))
231 repo.ui.debug(" dir %s -> %s\n" % (d, dirmove[d]))
220
232
221 # check unaccounted nonoverlapping files against directory moves
233 # check unaccounted nonoverlapping files against directory moves
222 for f in u1 + u2:
234 for f in u1 + u2:
223 if f not in fullcopy:
235 if f not in fullcopy:
224 for d in dirmove:
236 for d in dirmove:
225 if f.startswith(d):
237 if f.startswith(d):
226 # new file added in a directory that was moved, move it
238 # new file added in a directory that was moved, move it
227 df = dirmove[d] + f[len(d):]
239 df = dirmove[d] + f[len(d):]
228 if df not in copy:
240 if df not in copy:
229 copy[f] = df
241 copy[f] = df
230 repo.ui.debug(" file %s -> %s\n" % (f, copy[f]))
242 repo.ui.debug(" file %s -> %s\n" % (f, copy[f]))
231 break
243 break
232
244
233 return copy, diverge
245 return copy, diverge
@@ -1,80 +1,95
1 #!/bin/sh
1 #!/bin/sh
2
2
3 add()
3 add()
4 {
4 {
5 echo $2 >> $1
5 echo $2 >> $1
6 }
6 }
7
7
8 hg init t
8 hg init t
9 cd t
9 cd t
10
10
11 # set up a boring main branch
11 # set up a boring main branch
12 add a a
12 add a a
13 hg add a
13 hg add a
14 mkdir x
14 mkdir x
15 add x/x x
15 add x/x x
16 hg add x/x
16 hg add x/x
17 hg ci -m0
17 hg ci -m0
18
18
19 add a m1
19 add a m1
20 hg ci -m1
20 hg ci -m1
21
21
22 add a m2
22 add a m2
23 add x/y y1
23 add x/y y1
24 hg add x/y
24 hg add x/y
25 hg ci -m2
25 hg ci -m2
26 cd ..
26 cd ..
27
27
28 show()
28 show()
29 {
29 {
30 echo "- $2: $1"
30 echo "- $2: $1"
31 hg st -C $1
31 hg st -C $1
32 echo
32 echo
33 hg diff --git $1
33 hg diff --git $1
34 echo
34 echo
35 }
35 }
36
36
37 count=0
37 count=0
38 # make a new branch and get diff/status output
38 # make a new branch and get diff/status output
39 # $1 - first commit
39 # $1 - first commit
40 # $2 - second commit
40 # $2 - second commit
41 # $3 - working dir action
41 # $3 - working dir action
42 # $4 - test description
42 # $4 - test description
43 tb()
43 tb()
44 {
44 {
45 hg clone t t2 ; cd t2
45 hg clone t t2 ; cd t2
46 hg co -q -C 0
46 hg co -q -C 0
47
47
48 add a $count
48 add a $count
49 count=`expr $count + 1`
49 count=`expr $count + 1`
50 hg ci -m "t0"
50 hg ci -m "t0"
51 $1
51 $1
52 hg ci -m "t1"
52 hg ci -m "t1"
53 $2
53 $2
54 hg ci -m "t2"
54 hg ci -m "t2"
55 $3
55 $3
56
56
57 echo "** $4 **"
57 echo "** $4 **"
58 echo "** $1 / $2 / $3"
58 echo "** $1 / $2 / $3"
59 show "" "working to parent"
59 show "" "working to parent"
60 show "--rev 0" "working to root"
60 show "--rev 0" "working to root"
61 show "--rev 2" "working to branch"
61 show "--rev 2" "working to branch"
62 show "--rev 0 --rev ." "root to parent"
62 show "--rev 0 --rev ." "root to parent"
63 show "--rev . --rev 0" "parent to root"
63 show "--rev . --rev 0" "parent to root"
64 show "--rev 2 --rev ." "branch to parent"
64 show "--rev 2 --rev ." "branch to parent"
65 show "--rev . --rev 2" "parent to branch"
65 show "--rev . --rev 2" "parent to branch"
66 echo
66 echo
67 cd ..
67 cd ..
68 rm -rf t2
68 rm -rf t2
69 }
69 }
70
70
71
71
72 tb "add a a1" "add a a2" "hg mv a b" "rename in working dir"
72 tb "add a a1" "add a a2" "hg mv a b" "rename in working dir"
73 tb "add a a1" "add a a2" "hg cp a b" "copy in working dir"
73 tb "add a a1" "add a a2" "hg cp a b" "copy in working dir"
74 tb "hg mv a b" "add b b1" "add b w" "single rename"
74 tb "hg mv a b" "add b b1" "add b w" "single rename"
75 tb "hg cp a b" "add b b1" "add a w" "single copy"
75 tb "hg cp a b" "add b b1" "add a w" "single copy"
76 tb "hg mv a b" "hg mv b c" "hg mv c d" "rename chain"
76 tb "hg mv a b" "hg mv b c" "hg mv c d" "rename chain"
77 tb "hg cp a b" "hg cp b c" "hg cp c d" "copy chain"
77 tb "hg cp a b" "hg cp b c" "hg cp c d" "copy chain"
78 tb "add a a1" "hg mv a b" "hg mv b a" "circular rename"
78 tb "add a a1" "hg mv a b" "hg mv b a" "circular rename"
79
79
80 tb "hg mv x y" "add y/x x1" "add y/x x2" "directory move"
80 tb "hg mv x y" "add y/x x1" "add y/x x2" "directory move"
81
82 # Cannot implement unrelated branch with tb
83 echo '% testing copies with unrelated branch'
84 hg init unrelated
85 cd unrelated
86 add a a
87 hg ci -Am adda
88 hg mv a b
89 hg ci -m movea
90 hg up -C null
91 add a a
92 hg ci -Am addunrelateda
93 echo '% unrelated branch diff'
94 hg diff --git -r 2 -r 1
95 cd ..
@@ -1,1236 +1,1254
1 updating to branch default
1 updating to branch default
2 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
2 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
3 created new head
3 created new head
4 ** rename in working dir **
4 ** rename in working dir **
5 ** add a a1 / add a a2 / hg mv a b
5 ** add a a1 / add a a2 / hg mv a b
6 - working to parent:
6 - working to parent:
7 A b
7 A b
8 a
8 a
9 R a
9 R a
10
10
11 diff --git a/a b/b
11 diff --git a/a b/b
12 rename from a
12 rename from a
13 rename to b
13 rename to b
14
14
15 - working to root: --rev 0
15 - working to root: --rev 0
16 A b
16 A b
17 a
17 a
18 R a
18 R a
19
19
20 diff --git a/a b/b
20 diff --git a/a b/b
21 rename from a
21 rename from a
22 rename to b
22 rename to b
23 --- a/a
23 --- a/a
24 +++ b/b
24 +++ b/b
25 @@ -1,1 +1,4 @@
25 @@ -1,1 +1,4 @@
26 a
26 a
27 +0
27 +0
28 +a1
28 +a1
29 +a2
29 +a2
30
30
31 - working to branch: --rev 2
31 - working to branch: --rev 2
32 A b
32 A b
33 a
33 a
34 R a
34 R a
35 R x/y
35 R x/y
36
36
37 diff --git a/a b/b
37 diff --git a/a b/b
38 rename from a
38 rename from a
39 rename to b
39 rename to b
40 --- a/a
40 --- a/a
41 +++ b/b
41 +++ b/b
42 @@ -1,3 +1,4 @@
42 @@ -1,3 +1,4 @@
43 a
43 a
44 -m1
44 -m1
45 -m2
45 -m2
46 +0
46 +0
47 +a1
47 +a1
48 +a2
48 +a2
49 diff --git a/x/y b/x/y
49 diff --git a/x/y b/x/y
50 deleted file mode 100644
50 deleted file mode 100644
51 --- a/x/y
51 --- a/x/y
52 +++ /dev/null
52 +++ /dev/null
53 @@ -1,1 +0,0 @@
53 @@ -1,1 +0,0 @@
54 -y1
54 -y1
55
55
56 - root to parent: --rev 0 --rev .
56 - root to parent: --rev 0 --rev .
57 M a
57 M a
58
58
59 diff --git a/a b/a
59 diff --git a/a b/a
60 --- a/a
60 --- a/a
61 +++ b/a
61 +++ b/a
62 @@ -1,1 +1,4 @@
62 @@ -1,1 +1,4 @@
63 a
63 a
64 +0
64 +0
65 +a1
65 +a1
66 +a2
66 +a2
67
67
68 - parent to root: --rev . --rev 0
68 - parent to root: --rev . --rev 0
69 M a
69 M a
70
70
71 diff --git a/a b/a
71 diff --git a/a b/a
72 --- a/a
72 --- a/a
73 +++ b/a
73 +++ b/a
74 @@ -1,4 +1,1 @@
74 @@ -1,4 +1,1 @@
75 a
75 a
76 -0
76 -0
77 -a1
77 -a1
78 -a2
78 -a2
79
79
80 - branch to parent: --rev 2 --rev .
80 - branch to parent: --rev 2 --rev .
81 M a
81 M a
82 R x/y
82 R x/y
83
83
84 diff --git a/a b/a
84 diff --git a/a b/a
85 --- a/a
85 --- a/a
86 +++ b/a
86 +++ b/a
87 @@ -1,3 +1,4 @@
87 @@ -1,3 +1,4 @@
88 a
88 a
89 -m1
89 -m1
90 -m2
90 -m2
91 +0
91 +0
92 +a1
92 +a1
93 +a2
93 +a2
94 diff --git a/x/y b/x/y
94 diff --git a/x/y b/x/y
95 deleted file mode 100644
95 deleted file mode 100644
96 --- a/x/y
96 --- a/x/y
97 +++ /dev/null
97 +++ /dev/null
98 @@ -1,1 +0,0 @@
98 @@ -1,1 +0,0 @@
99 -y1
99 -y1
100
100
101 - parent to branch: --rev . --rev 2
101 - parent to branch: --rev . --rev 2
102 M a
102 M a
103 A x/y
103 A x/y
104
104
105 diff --git a/a b/a
105 diff --git a/a b/a
106 --- a/a
106 --- a/a
107 +++ b/a
107 +++ b/a
108 @@ -1,4 +1,3 @@
108 @@ -1,4 +1,3 @@
109 a
109 a
110 -0
110 -0
111 -a1
111 -a1
112 -a2
112 -a2
113 +m1
113 +m1
114 +m2
114 +m2
115 diff --git a/x/y b/x/y
115 diff --git a/x/y b/x/y
116 new file mode 100644
116 new file mode 100644
117 --- /dev/null
117 --- /dev/null
118 +++ b/x/y
118 +++ b/x/y
119 @@ -0,0 +1,1 @@
119 @@ -0,0 +1,1 @@
120 +y1
120 +y1
121
121
122
122
123 updating to branch default
123 updating to branch default
124 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
124 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
125 created new head
125 created new head
126 ** copy in working dir **
126 ** copy in working dir **
127 ** add a a1 / add a a2 / hg cp a b
127 ** add a a1 / add a a2 / hg cp a b
128 - working to parent:
128 - working to parent:
129 A b
129 A b
130 a
130 a
131
131
132 diff --git a/a b/b
132 diff --git a/a b/b
133 copy from a
133 copy from a
134 copy to b
134 copy to b
135
135
136 - working to root: --rev 0
136 - working to root: --rev 0
137 M a
137 M a
138 A b
138 A b
139 a
139 a
140
140
141 diff --git a/a b/a
141 diff --git a/a b/a
142 --- a/a
142 --- a/a
143 +++ b/a
143 +++ b/a
144 @@ -1,1 +1,4 @@
144 @@ -1,1 +1,4 @@
145 a
145 a
146 +1
146 +1
147 +a1
147 +a1
148 +a2
148 +a2
149 diff --git a/a b/b
149 diff --git a/a b/b
150 copy from a
150 copy from a
151 copy to b
151 copy to b
152 --- a/a
152 --- a/a
153 +++ b/b
153 +++ b/b
154 @@ -1,1 +1,4 @@
154 @@ -1,1 +1,4 @@
155 a
155 a
156 +1
156 +1
157 +a1
157 +a1
158 +a2
158 +a2
159
159
160 - working to branch: --rev 2
160 - working to branch: --rev 2
161 M a
161 M a
162 A b
162 A b
163 a
163 a
164 R x/y
164 R x/y
165
165
166 diff --git a/a b/a
166 diff --git a/a b/a
167 --- a/a
167 --- a/a
168 +++ b/a
168 +++ b/a
169 @@ -1,3 +1,4 @@
169 @@ -1,3 +1,4 @@
170 a
170 a
171 -m1
171 -m1
172 -m2
172 -m2
173 +1
173 +1
174 +a1
174 +a1
175 +a2
175 +a2
176 diff --git a/a b/b
176 diff --git a/a b/b
177 copy from a
177 copy from a
178 copy to b
178 copy to b
179 --- a/a
179 --- a/a
180 +++ b/b
180 +++ b/b
181 @@ -1,3 +1,4 @@
181 @@ -1,3 +1,4 @@
182 a
182 a
183 -m1
183 -m1
184 -m2
184 -m2
185 +1
185 +1
186 +a1
186 +a1
187 +a2
187 +a2
188 diff --git a/x/y b/x/y
188 diff --git a/x/y b/x/y
189 deleted file mode 100644
189 deleted file mode 100644
190 --- a/x/y
190 --- a/x/y
191 +++ /dev/null
191 +++ /dev/null
192 @@ -1,1 +0,0 @@
192 @@ -1,1 +0,0 @@
193 -y1
193 -y1
194
194
195 - root to parent: --rev 0 --rev .
195 - root to parent: --rev 0 --rev .
196 M a
196 M a
197
197
198 diff --git a/a b/a
198 diff --git a/a b/a
199 --- a/a
199 --- a/a
200 +++ b/a
200 +++ b/a
201 @@ -1,1 +1,4 @@
201 @@ -1,1 +1,4 @@
202 a
202 a
203 +1
203 +1
204 +a1
204 +a1
205 +a2
205 +a2
206
206
207 - parent to root: --rev . --rev 0
207 - parent to root: --rev . --rev 0
208 M a
208 M a
209
209
210 diff --git a/a b/a
210 diff --git a/a b/a
211 --- a/a
211 --- a/a
212 +++ b/a
212 +++ b/a
213 @@ -1,4 +1,1 @@
213 @@ -1,4 +1,1 @@
214 a
214 a
215 -1
215 -1
216 -a1
216 -a1
217 -a2
217 -a2
218
218
219 - branch to parent: --rev 2 --rev .
219 - branch to parent: --rev 2 --rev .
220 M a
220 M a
221 R x/y
221 R x/y
222
222
223 diff --git a/a b/a
223 diff --git a/a b/a
224 --- a/a
224 --- a/a
225 +++ b/a
225 +++ b/a
226 @@ -1,3 +1,4 @@
226 @@ -1,3 +1,4 @@
227 a
227 a
228 -m1
228 -m1
229 -m2
229 -m2
230 +1
230 +1
231 +a1
231 +a1
232 +a2
232 +a2
233 diff --git a/x/y b/x/y
233 diff --git a/x/y b/x/y
234 deleted file mode 100644
234 deleted file mode 100644
235 --- a/x/y
235 --- a/x/y
236 +++ /dev/null
236 +++ /dev/null
237 @@ -1,1 +0,0 @@
237 @@ -1,1 +0,0 @@
238 -y1
238 -y1
239
239
240 - parent to branch: --rev . --rev 2
240 - parent to branch: --rev . --rev 2
241 M a
241 M a
242 A x/y
242 A x/y
243
243
244 diff --git a/a b/a
244 diff --git a/a b/a
245 --- a/a
245 --- a/a
246 +++ b/a
246 +++ b/a
247 @@ -1,4 +1,3 @@
247 @@ -1,4 +1,3 @@
248 a
248 a
249 -1
249 -1
250 -a1
250 -a1
251 -a2
251 -a2
252 +m1
252 +m1
253 +m2
253 +m2
254 diff --git a/x/y b/x/y
254 diff --git a/x/y b/x/y
255 new file mode 100644
255 new file mode 100644
256 --- /dev/null
256 --- /dev/null
257 +++ b/x/y
257 +++ b/x/y
258 @@ -0,0 +1,1 @@
258 @@ -0,0 +1,1 @@
259 +y1
259 +y1
260
260
261
261
262 updating to branch default
262 updating to branch default
263 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
263 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
264 created new head
264 created new head
265 ** single rename **
265 ** single rename **
266 ** hg mv a b / add b b1 / add b w
266 ** hg mv a b / add b b1 / add b w
267 - working to parent:
267 - working to parent:
268 M b
268 M b
269
269
270 diff --git a/b b/b
270 diff --git a/b b/b
271 --- a/b
271 --- a/b
272 +++ b/b
272 +++ b/b
273 @@ -1,3 +1,4 @@
273 @@ -1,3 +1,4 @@
274 a
274 a
275 2
275 2
276 b1
276 b1
277 +w
277 +w
278
278
279 - working to root: --rev 0
279 - working to root: --rev 0
280 A b
280 A b
281 a
281 a
282 R a
282 R a
283
283
284 diff --git a/a b/b
284 diff --git a/a b/b
285 rename from a
285 rename from a
286 rename to b
286 rename to b
287 --- a/a
287 --- a/a
288 +++ b/b
288 +++ b/b
289 @@ -1,1 +1,4 @@
289 @@ -1,1 +1,4 @@
290 a
290 a
291 +2
291 +2
292 +b1
292 +b1
293 +w
293 +w
294
294
295 - working to branch: --rev 2
295 - working to branch: --rev 2
296 A b
296 A b
297 a
297 a
298 R a
298 R a
299 R x/y
299 R x/y
300
300
301 diff --git a/a b/b
301 diff --git a/a b/b
302 rename from a
302 rename from a
303 rename to b
303 rename to b
304 --- a/a
304 --- a/a
305 +++ b/b
305 +++ b/b
306 @@ -1,3 +1,4 @@
306 @@ -1,3 +1,4 @@
307 a
307 a
308 -m1
308 -m1
309 -m2
309 -m2
310 +2
310 +2
311 +b1
311 +b1
312 +w
312 +w
313 diff --git a/x/y b/x/y
313 diff --git a/x/y b/x/y
314 deleted file mode 100644
314 deleted file mode 100644
315 --- a/x/y
315 --- a/x/y
316 +++ /dev/null
316 +++ /dev/null
317 @@ -1,1 +0,0 @@
317 @@ -1,1 +0,0 @@
318 -y1
318 -y1
319
319
320 - root to parent: --rev 0 --rev .
320 - root to parent: --rev 0 --rev .
321 A b
321 A b
322 a
322 a
323 R a
323 R a
324
324
325 diff --git a/a b/b
325 diff --git a/a b/b
326 rename from a
326 rename from a
327 rename to b
327 rename to b
328 --- a/a
328 --- a/a
329 +++ b/b
329 +++ b/b
330 @@ -1,1 +1,3 @@
330 @@ -1,1 +1,3 @@
331 a
331 a
332 +2
332 +2
333 +b1
333 +b1
334
334
335 - parent to root: --rev . --rev 0
335 - parent to root: --rev . --rev 0
336 A a
336 A a
337 b
337 b
338 R b
338 R b
339
339
340 diff --git a/b b/a
340 diff --git a/b b/a
341 rename from b
341 rename from b
342 rename to a
342 rename to a
343 --- a/b
343 --- a/b
344 +++ b/a
344 +++ b/a
345 @@ -1,3 +1,1 @@
345 @@ -1,3 +1,1 @@
346 a
346 a
347 -2
347 -2
348 -b1
348 -b1
349
349
350 - branch to parent: --rev 2 --rev .
350 - branch to parent: --rev 2 --rev .
351 A b
351 A b
352 a
352 a
353 R a
353 R a
354 R x/y
354 R x/y
355
355
356 diff --git a/a b/b
356 diff --git a/a b/b
357 rename from a
357 rename from a
358 rename to b
358 rename to b
359 --- a/a
359 --- a/a
360 +++ b/b
360 +++ b/b
361 @@ -1,3 +1,3 @@
361 @@ -1,3 +1,3 @@
362 a
362 a
363 -m1
363 -m1
364 -m2
364 -m2
365 +2
365 +2
366 +b1
366 +b1
367 diff --git a/x/y b/x/y
367 diff --git a/x/y b/x/y
368 deleted file mode 100644
368 deleted file mode 100644
369 --- a/x/y
369 --- a/x/y
370 +++ /dev/null
370 +++ /dev/null
371 @@ -1,1 +0,0 @@
371 @@ -1,1 +0,0 @@
372 -y1
372 -y1
373
373
374 - parent to branch: --rev . --rev 2
374 - parent to branch: --rev . --rev 2
375 A a
375 A a
376 b
376 b
377 A x/y
377 A x/y
378 R b
378 R b
379
379
380 diff --git a/b b/a
380 diff --git a/b b/a
381 rename from b
381 rename from b
382 rename to a
382 rename to a
383 --- a/b
383 --- a/b
384 +++ b/a
384 +++ b/a
385 @@ -1,3 +1,3 @@
385 @@ -1,3 +1,3 @@
386 a
386 a
387 -2
387 -2
388 -b1
388 -b1
389 +m1
389 +m1
390 +m2
390 +m2
391 diff --git a/x/y b/x/y
391 diff --git a/x/y b/x/y
392 new file mode 100644
392 new file mode 100644
393 --- /dev/null
393 --- /dev/null
394 +++ b/x/y
394 +++ b/x/y
395 @@ -0,0 +1,1 @@
395 @@ -0,0 +1,1 @@
396 +y1
396 +y1
397
397
398
398
399 updating to branch default
399 updating to branch default
400 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
400 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
401 created new head
401 created new head
402 ** single copy **
402 ** single copy **
403 ** hg cp a b / add b b1 / add a w
403 ** hg cp a b / add b b1 / add a w
404 - working to parent:
404 - working to parent:
405 M a
405 M a
406
406
407 diff --git a/a b/a
407 diff --git a/a b/a
408 --- a/a
408 --- a/a
409 +++ b/a
409 +++ b/a
410 @@ -1,2 +1,3 @@
410 @@ -1,2 +1,3 @@
411 a
411 a
412 3
412 3
413 +w
413 +w
414
414
415 - working to root: --rev 0
415 - working to root: --rev 0
416 M a
416 M a
417 A b
417 A b
418 a
418 a
419
419
420 diff --git a/a b/a
420 diff --git a/a b/a
421 --- a/a
421 --- a/a
422 +++ b/a
422 +++ b/a
423 @@ -1,1 +1,3 @@
423 @@ -1,1 +1,3 @@
424 a
424 a
425 +3
425 +3
426 +w
426 +w
427 diff --git a/a b/b
427 diff --git a/a b/b
428 copy from a
428 copy from a
429 copy to b
429 copy to b
430 --- a/a
430 --- a/a
431 +++ b/b
431 +++ b/b
432 @@ -1,1 +1,3 @@
432 @@ -1,1 +1,3 @@
433 a
433 a
434 +3
434 +3
435 +b1
435 +b1
436
436
437 - working to branch: --rev 2
437 - working to branch: --rev 2
438 M a
438 M a
439 A b
439 A b
440 a
440 a
441 R x/y
441 R x/y
442
442
443 diff --git a/a b/a
443 diff --git a/a b/a
444 --- a/a
444 --- a/a
445 +++ b/a
445 +++ b/a
446 @@ -1,3 +1,3 @@
446 @@ -1,3 +1,3 @@
447 a
447 a
448 -m1
448 -m1
449 -m2
449 -m2
450 +3
450 +3
451 +w
451 +w
452 diff --git a/a b/b
452 diff --git a/a b/b
453 copy from a
453 copy from a
454 copy to b
454 copy to b
455 --- a/a
455 --- a/a
456 +++ b/b
456 +++ b/b
457 @@ -1,3 +1,3 @@
457 @@ -1,3 +1,3 @@
458 a
458 a
459 -m1
459 -m1
460 -m2
460 -m2
461 +3
461 +3
462 +b1
462 +b1
463 diff --git a/x/y b/x/y
463 diff --git a/x/y b/x/y
464 deleted file mode 100644
464 deleted file mode 100644
465 --- a/x/y
465 --- a/x/y
466 +++ /dev/null
466 +++ /dev/null
467 @@ -1,1 +0,0 @@
467 @@ -1,1 +0,0 @@
468 -y1
468 -y1
469
469
470 - root to parent: --rev 0 --rev .
470 - root to parent: --rev 0 --rev .
471 M a
471 M a
472 A b
472 A b
473 a
473 a
474
474
475 diff --git a/a b/a
475 diff --git a/a b/a
476 --- a/a
476 --- a/a
477 +++ b/a
477 +++ b/a
478 @@ -1,1 +1,2 @@
478 @@ -1,1 +1,2 @@
479 a
479 a
480 +3
480 +3
481 diff --git a/a b/b
481 diff --git a/a b/b
482 copy from a
482 copy from a
483 copy to b
483 copy to b
484 --- a/a
484 --- a/a
485 +++ b/b
485 +++ b/b
486 @@ -1,1 +1,3 @@
486 @@ -1,1 +1,3 @@
487 a
487 a
488 +3
488 +3
489 +b1
489 +b1
490
490
491 - parent to root: --rev . --rev 0
491 - parent to root: --rev . --rev 0
492 M a
492 M a
493 R b
493 R b
494
494
495 diff --git a/a b/a
495 diff --git a/a b/a
496 --- a/a
496 --- a/a
497 +++ b/a
497 +++ b/a
498 @@ -1,2 +1,1 @@
498 @@ -1,2 +1,1 @@
499 a
499 a
500 -3
500 -3
501 diff --git a/b b/b
501 diff --git a/b b/b
502 deleted file mode 100644
502 deleted file mode 100644
503 --- a/b
503 --- a/b
504 +++ /dev/null
504 +++ /dev/null
505 @@ -1,3 +0,0 @@
505 @@ -1,3 +0,0 @@
506 -a
506 -a
507 -3
507 -3
508 -b1
508 -b1
509
509
510 - branch to parent: --rev 2 --rev .
510 - branch to parent: --rev 2 --rev .
511 M a
511 M a
512 A b
512 A b
513 a
513 a
514 R x/y
514 R x/y
515
515
516 diff --git a/a b/a
516 diff --git a/a b/a
517 --- a/a
517 --- a/a
518 +++ b/a
518 +++ b/a
519 @@ -1,3 +1,2 @@
519 @@ -1,3 +1,2 @@
520 a
520 a
521 -m1
521 -m1
522 -m2
522 -m2
523 +3
523 +3
524 diff --git a/a b/b
524 diff --git a/a b/b
525 copy from a
525 copy from a
526 copy to b
526 copy to b
527 --- a/a
527 --- a/a
528 +++ b/b
528 +++ b/b
529 @@ -1,3 +1,3 @@
529 @@ -1,3 +1,3 @@
530 a
530 a
531 -m1
531 -m1
532 -m2
532 -m2
533 +3
533 +3
534 +b1
534 +b1
535 diff --git a/x/y b/x/y
535 diff --git a/x/y b/x/y
536 deleted file mode 100644
536 deleted file mode 100644
537 --- a/x/y
537 --- a/x/y
538 +++ /dev/null
538 +++ /dev/null
539 @@ -1,1 +0,0 @@
539 @@ -1,1 +0,0 @@
540 -y1
540 -y1
541
541
542 - parent to branch: --rev . --rev 2
542 - parent to branch: --rev . --rev 2
543 M a
543 M a
544 A x/y
544 A x/y
545 R b
545 R b
546
546
547 diff --git a/a b/a
547 diff --git a/a b/a
548 --- a/a
548 --- a/a
549 +++ b/a
549 +++ b/a
550 @@ -1,2 +1,3 @@
550 @@ -1,2 +1,3 @@
551 a
551 a
552 -3
552 -3
553 +m1
553 +m1
554 +m2
554 +m2
555 diff --git a/b b/b
555 diff --git a/b b/b
556 deleted file mode 100644
556 deleted file mode 100644
557 --- a/b
557 --- a/b
558 +++ /dev/null
558 +++ /dev/null
559 @@ -1,3 +0,0 @@
559 @@ -1,3 +0,0 @@
560 -a
560 -a
561 -3
561 -3
562 -b1
562 -b1
563 diff --git a/x/y b/x/y
563 diff --git a/x/y b/x/y
564 new file mode 100644
564 new file mode 100644
565 --- /dev/null
565 --- /dev/null
566 +++ b/x/y
566 +++ b/x/y
567 @@ -0,0 +1,1 @@
567 @@ -0,0 +1,1 @@
568 +y1
568 +y1
569
569
570
570
571 updating to branch default
571 updating to branch default
572 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
572 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
573 created new head
573 created new head
574 ** rename chain **
574 ** rename chain **
575 ** hg mv a b / hg mv b c / hg mv c d
575 ** hg mv a b / hg mv b c / hg mv c d
576 - working to parent:
576 - working to parent:
577 A d
577 A d
578 c
578 c
579 R c
579 R c
580
580
581 diff --git a/c b/d
581 diff --git a/c b/d
582 rename from c
582 rename from c
583 rename to d
583 rename to d
584
584
585 - working to root: --rev 0
585 - working to root: --rev 0
586 A d
586 A d
587 a
587 a
588 R a
588 R a
589
589
590 diff --git a/a b/d
590 diff --git a/a b/d
591 rename from a
591 rename from a
592 rename to d
592 rename to d
593 --- a/a
593 --- a/a
594 +++ b/d
594 +++ b/d
595 @@ -1,1 +1,2 @@
595 @@ -1,1 +1,2 @@
596 a
596 a
597 +4
597 +4
598
598
599 - working to branch: --rev 2
599 - working to branch: --rev 2
600 A d
600 A d
601 a
601 a
602 R a
602 R a
603 R x/y
603 R x/y
604
604
605 diff --git a/a b/d
605 diff --git a/a b/d
606 rename from a
606 rename from a
607 rename to d
607 rename to d
608 --- a/a
608 --- a/a
609 +++ b/d
609 +++ b/d
610 @@ -1,3 +1,2 @@
610 @@ -1,3 +1,2 @@
611 a
611 a
612 -m1
612 -m1
613 -m2
613 -m2
614 +4
614 +4
615 diff --git a/x/y b/x/y
615 diff --git a/x/y b/x/y
616 deleted file mode 100644
616 deleted file mode 100644
617 --- a/x/y
617 --- a/x/y
618 +++ /dev/null
618 +++ /dev/null
619 @@ -1,1 +0,0 @@
619 @@ -1,1 +0,0 @@
620 -y1
620 -y1
621
621
622 - root to parent: --rev 0 --rev .
622 - root to parent: --rev 0 --rev .
623 A c
623 A c
624 a
624 a
625 R a
625 R a
626
626
627 diff --git a/a b/c
627 diff --git a/a b/c
628 rename from a
628 rename from a
629 rename to c
629 rename to c
630 --- a/a
630 --- a/a
631 +++ b/c
631 +++ b/c
632 @@ -1,1 +1,2 @@
632 @@ -1,1 +1,2 @@
633 a
633 a
634 +4
634 +4
635
635
636 - parent to root: --rev . --rev 0
636 - parent to root: --rev . --rev 0
637 A a
637 A a
638 c
638 c
639 R c
639 R c
640
640
641 diff --git a/c b/a
641 diff --git a/c b/a
642 rename from c
642 rename from c
643 rename to a
643 rename to a
644 --- a/c
644 --- a/c
645 +++ b/a
645 +++ b/a
646 @@ -1,2 +1,1 @@
646 @@ -1,2 +1,1 @@
647 a
647 a
648 -4
648 -4
649
649
650 - branch to parent: --rev 2 --rev .
650 - branch to parent: --rev 2 --rev .
651 A c
651 A c
652 a
652 a
653 R a
653 R a
654 R x/y
654 R x/y
655
655
656 diff --git a/a b/c
656 diff --git a/a b/c
657 rename from a
657 rename from a
658 rename to c
658 rename to c
659 --- a/a
659 --- a/a
660 +++ b/c
660 +++ b/c
661 @@ -1,3 +1,2 @@
661 @@ -1,3 +1,2 @@
662 a
662 a
663 -m1
663 -m1
664 -m2
664 -m2
665 +4
665 +4
666 diff --git a/x/y b/x/y
666 diff --git a/x/y b/x/y
667 deleted file mode 100644
667 deleted file mode 100644
668 --- a/x/y
668 --- a/x/y
669 +++ /dev/null
669 +++ /dev/null
670 @@ -1,1 +0,0 @@
670 @@ -1,1 +0,0 @@
671 -y1
671 -y1
672
672
673 - parent to branch: --rev . --rev 2
673 - parent to branch: --rev . --rev 2
674 A a
674 A a
675 c
675 c
676 A x/y
676 A x/y
677 R c
677 R c
678
678
679 diff --git a/c b/a
679 diff --git a/c b/a
680 rename from c
680 rename from c
681 rename to a
681 rename to a
682 --- a/c
682 --- a/c
683 +++ b/a
683 +++ b/a
684 @@ -1,2 +1,3 @@
684 @@ -1,2 +1,3 @@
685 a
685 a
686 -4
686 -4
687 +m1
687 +m1
688 +m2
688 +m2
689 diff --git a/x/y b/x/y
689 diff --git a/x/y b/x/y
690 new file mode 100644
690 new file mode 100644
691 --- /dev/null
691 --- /dev/null
692 +++ b/x/y
692 +++ b/x/y
693 @@ -0,0 +1,1 @@
693 @@ -0,0 +1,1 @@
694 +y1
694 +y1
695
695
696
696
697 updating to branch default
697 updating to branch default
698 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
698 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
699 created new head
699 created new head
700 ** copy chain **
700 ** copy chain **
701 ** hg cp a b / hg cp b c / hg cp c d
701 ** hg cp a b / hg cp b c / hg cp c d
702 - working to parent:
702 - working to parent:
703 A d
703 A d
704 c
704 c
705
705
706 diff --git a/c b/d
706 diff --git a/c b/d
707 copy from c
707 copy from c
708 copy to d
708 copy to d
709
709
710 - working to root: --rev 0
710 - working to root: --rev 0
711 M a
711 M a
712 A b
712 A b
713 a
713 a
714 A c
714 A c
715 a
715 a
716 A d
716 A d
717 a
717 a
718
718
719 diff --git a/a b/a
719 diff --git a/a b/a
720 --- a/a
720 --- a/a
721 +++ b/a
721 +++ b/a
722 @@ -1,1 +1,2 @@
722 @@ -1,1 +1,2 @@
723 a
723 a
724 +5
724 +5
725 diff --git a/a b/b
725 diff --git a/a b/b
726 copy from a
726 copy from a
727 copy to b
727 copy to b
728 --- a/a
728 --- a/a
729 +++ b/b
729 +++ b/b
730 @@ -1,1 +1,2 @@
730 @@ -1,1 +1,2 @@
731 a
731 a
732 +5
732 +5
733 diff --git a/a b/c
733 diff --git a/a b/c
734 copy from a
734 copy from a
735 copy to c
735 copy to c
736 --- a/a
736 --- a/a
737 +++ b/c
737 +++ b/c
738 @@ -1,1 +1,2 @@
738 @@ -1,1 +1,2 @@
739 a
739 a
740 +5
740 +5
741 diff --git a/a b/d
741 diff --git a/a b/d
742 copy from a
742 copy from a
743 copy to d
743 copy to d
744 --- a/a
744 --- a/a
745 +++ b/d
745 +++ b/d
746 @@ -1,1 +1,2 @@
746 @@ -1,1 +1,2 @@
747 a
747 a
748 +5
748 +5
749
749
750 - working to branch: --rev 2
750 - working to branch: --rev 2
751 M a
751 M a
752 A b
752 A b
753 a
753 a
754 A c
754 A c
755 a
755 a
756 A d
756 A d
757 a
757 a
758 R x/y
758 R x/y
759
759
760 diff --git a/a b/a
760 diff --git a/a b/a
761 --- a/a
761 --- a/a
762 +++ b/a
762 +++ b/a
763 @@ -1,3 +1,2 @@
763 @@ -1,3 +1,2 @@
764 a
764 a
765 -m1
765 -m1
766 -m2
766 -m2
767 +5
767 +5
768 diff --git a/a b/b
768 diff --git a/a b/b
769 copy from a
769 copy from a
770 copy to b
770 copy to b
771 --- a/a
771 --- a/a
772 +++ b/b
772 +++ b/b
773 @@ -1,3 +1,2 @@
773 @@ -1,3 +1,2 @@
774 a
774 a
775 -m1
775 -m1
776 -m2
776 -m2
777 +5
777 +5
778 diff --git a/a b/c
778 diff --git a/a b/c
779 copy from a
779 copy from a
780 copy to c
780 copy to c
781 --- a/a
781 --- a/a
782 +++ b/c
782 +++ b/c
783 @@ -1,3 +1,2 @@
783 @@ -1,3 +1,2 @@
784 a
784 a
785 -m1
785 -m1
786 -m2
786 -m2
787 +5
787 +5
788 diff --git a/a b/d
788 diff --git a/a b/d
789 copy from a
789 copy from a
790 copy to d
790 copy to d
791 --- a/a
791 --- a/a
792 +++ b/d
792 +++ b/d
793 @@ -1,3 +1,2 @@
793 @@ -1,3 +1,2 @@
794 a
794 a
795 -m1
795 -m1
796 -m2
796 -m2
797 +5
797 +5
798 diff --git a/x/y b/x/y
798 diff --git a/x/y b/x/y
799 deleted file mode 100644
799 deleted file mode 100644
800 --- a/x/y
800 --- a/x/y
801 +++ /dev/null
801 +++ /dev/null
802 @@ -1,1 +0,0 @@
802 @@ -1,1 +0,0 @@
803 -y1
803 -y1
804
804
805 - root to parent: --rev 0 --rev .
805 - root to parent: --rev 0 --rev .
806 M a
806 M a
807 A b
807 A b
808 a
808 a
809 A c
809 A c
810 a
810 a
811
811
812 diff --git a/a b/a
812 diff --git a/a b/a
813 --- a/a
813 --- a/a
814 +++ b/a
814 +++ b/a
815 @@ -1,1 +1,2 @@
815 @@ -1,1 +1,2 @@
816 a
816 a
817 +5
817 +5
818 diff --git a/a b/b
818 diff --git a/a b/b
819 copy from a
819 copy from a
820 copy to b
820 copy to b
821 --- a/a
821 --- a/a
822 +++ b/b
822 +++ b/b
823 @@ -1,1 +1,2 @@
823 @@ -1,1 +1,2 @@
824 a
824 a
825 +5
825 +5
826 diff --git a/a b/c
826 diff --git a/a b/c
827 copy from a
827 copy from a
828 copy to c
828 copy to c
829 --- a/a
829 --- a/a
830 +++ b/c
830 +++ b/c
831 @@ -1,1 +1,2 @@
831 @@ -1,1 +1,2 @@
832 a
832 a
833 +5
833 +5
834
834
835 - parent to root: --rev . --rev 0
835 - parent to root: --rev . --rev 0
836 M a
836 M a
837 R b
837 R b
838 R c
838 R c
839
839
840 diff --git a/a b/a
840 diff --git a/a b/a
841 --- a/a
841 --- a/a
842 +++ b/a
842 +++ b/a
843 @@ -1,2 +1,1 @@
843 @@ -1,2 +1,1 @@
844 a
844 a
845 -5
845 -5
846 diff --git a/b b/b
846 diff --git a/b b/b
847 deleted file mode 100644
847 deleted file mode 100644
848 --- a/b
848 --- a/b
849 +++ /dev/null
849 +++ /dev/null
850 @@ -1,2 +0,0 @@
850 @@ -1,2 +0,0 @@
851 -a
851 -a
852 -5
852 -5
853 diff --git a/c b/c
853 diff --git a/c b/c
854 deleted file mode 100644
854 deleted file mode 100644
855 --- a/c
855 --- a/c
856 +++ /dev/null
856 +++ /dev/null
857 @@ -1,2 +0,0 @@
857 @@ -1,2 +0,0 @@
858 -a
858 -a
859 -5
859 -5
860
860
861 - branch to parent: --rev 2 --rev .
861 - branch to parent: --rev 2 --rev .
862 M a
862 M a
863 A b
863 A b
864 a
864 a
865 A c
865 A c
866 a
866 a
867 R x/y
867 R x/y
868
868
869 diff --git a/a b/a
869 diff --git a/a b/a
870 --- a/a
870 --- a/a
871 +++ b/a
871 +++ b/a
872 @@ -1,3 +1,2 @@
872 @@ -1,3 +1,2 @@
873 a
873 a
874 -m1
874 -m1
875 -m2
875 -m2
876 +5
876 +5
877 diff --git a/a b/b
877 diff --git a/a b/b
878 copy from a
878 copy from a
879 copy to b
879 copy to b
880 --- a/a
880 --- a/a
881 +++ b/b
881 +++ b/b
882 @@ -1,3 +1,2 @@
882 @@ -1,3 +1,2 @@
883 a
883 a
884 -m1
884 -m1
885 -m2
885 -m2
886 +5
886 +5
887 diff --git a/a b/c
887 diff --git a/a b/c
888 copy from a
888 copy from a
889 copy to c
889 copy to c
890 --- a/a
890 --- a/a
891 +++ b/c
891 +++ b/c
892 @@ -1,3 +1,2 @@
892 @@ -1,3 +1,2 @@
893 a
893 a
894 -m1
894 -m1
895 -m2
895 -m2
896 +5
896 +5
897 diff --git a/x/y b/x/y
897 diff --git a/x/y b/x/y
898 deleted file mode 100644
898 deleted file mode 100644
899 --- a/x/y
899 --- a/x/y
900 +++ /dev/null
900 +++ /dev/null
901 @@ -1,1 +0,0 @@
901 @@ -1,1 +0,0 @@
902 -y1
902 -y1
903
903
904 - parent to branch: --rev . --rev 2
904 - parent to branch: --rev . --rev 2
905 M a
905 M a
906 A x/y
906 A x/y
907 R b
907 R b
908 R c
908 R c
909
909
910 diff --git a/a b/a
910 diff --git a/a b/a
911 --- a/a
911 --- a/a
912 +++ b/a
912 +++ b/a
913 @@ -1,2 +1,3 @@
913 @@ -1,2 +1,3 @@
914 a
914 a
915 -5
915 -5
916 +m1
916 +m1
917 +m2
917 +m2
918 diff --git a/b b/b
918 diff --git a/b b/b
919 deleted file mode 100644
919 deleted file mode 100644
920 --- a/b
920 --- a/b
921 +++ /dev/null
921 +++ /dev/null
922 @@ -1,2 +0,0 @@
922 @@ -1,2 +0,0 @@
923 -a
923 -a
924 -5
924 -5
925 diff --git a/c b/c
925 diff --git a/c b/c
926 deleted file mode 100644
926 deleted file mode 100644
927 --- a/c
927 --- a/c
928 +++ /dev/null
928 +++ /dev/null
929 @@ -1,2 +0,0 @@
929 @@ -1,2 +0,0 @@
930 -a
930 -a
931 -5
931 -5
932 diff --git a/x/y b/x/y
932 diff --git a/x/y b/x/y
933 new file mode 100644
933 new file mode 100644
934 --- /dev/null
934 --- /dev/null
935 +++ b/x/y
935 +++ b/x/y
936 @@ -0,0 +1,1 @@
936 @@ -0,0 +1,1 @@
937 +y1
937 +y1
938
938
939
939
940 updating to branch default
940 updating to branch default
941 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
941 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
942 created new head
942 created new head
943 ** circular rename **
943 ** circular rename **
944 ** add a a1 / hg mv a b / hg mv b a
944 ** add a a1 / hg mv a b / hg mv b a
945 - working to parent:
945 - working to parent:
946 A a
946 A a
947 b
947 b
948 R b
948 R b
949
949
950 diff --git a/b b/a
950 diff --git a/b b/a
951 rename from b
951 rename from b
952 rename to a
952 rename to a
953
953
954 - working to root: --rev 0
954 - working to root: --rev 0
955 M a
955 M a
956
956
957 diff --git a/a b/a
957 diff --git a/a b/a
958 --- a/a
958 --- a/a
959 +++ b/a
959 +++ b/a
960 @@ -1,1 +1,3 @@
960 @@ -1,1 +1,3 @@
961 a
961 a
962 +6
962 +6
963 +a1
963 +a1
964
964
965 - working to branch: --rev 2
965 - working to branch: --rev 2
966 M a
966 M a
967 R x/y
967 R x/y
968
968
969 diff --git a/a b/a
969 diff --git a/a b/a
970 --- a/a
970 --- a/a
971 +++ b/a
971 +++ b/a
972 @@ -1,3 +1,3 @@
972 @@ -1,3 +1,3 @@
973 a
973 a
974 -m1
974 -m1
975 -m2
975 -m2
976 +6
976 +6
977 +a1
977 +a1
978 diff --git a/x/y b/x/y
978 diff --git a/x/y b/x/y
979 deleted file mode 100644
979 deleted file mode 100644
980 --- a/x/y
980 --- a/x/y
981 +++ /dev/null
981 +++ /dev/null
982 @@ -1,1 +0,0 @@
982 @@ -1,1 +0,0 @@
983 -y1
983 -y1
984
984
985 - root to parent: --rev 0 --rev .
985 - root to parent: --rev 0 --rev .
986 A b
986 A b
987 a
987 a
988 R a
988 R a
989
989
990 diff --git a/a b/b
990 diff --git a/a b/b
991 rename from a
991 rename from a
992 rename to b
992 rename to b
993 --- a/a
993 --- a/a
994 +++ b/b
994 +++ b/b
995 @@ -1,1 +1,3 @@
995 @@ -1,1 +1,3 @@
996 a
996 a
997 +6
997 +6
998 +a1
998 +a1
999
999
1000 - parent to root: --rev . --rev 0
1000 - parent to root: --rev . --rev 0
1001 A a
1001 A a
1002 b
1002 b
1003 R b
1003 R b
1004
1004
1005 diff --git a/b b/a
1005 diff --git a/b b/a
1006 rename from b
1006 rename from b
1007 rename to a
1007 rename to a
1008 --- a/b
1008 --- a/b
1009 +++ b/a
1009 +++ b/a
1010 @@ -1,3 +1,1 @@
1010 @@ -1,3 +1,1 @@
1011 a
1011 a
1012 -6
1012 -6
1013 -a1
1013 -a1
1014
1014
1015 - branch to parent: --rev 2 --rev .
1015 - branch to parent: --rev 2 --rev .
1016 A b
1016 A b
1017 a
1017 a
1018 R a
1018 R a
1019 R x/y
1019 R x/y
1020
1020
1021 diff --git a/a b/b
1021 diff --git a/a b/b
1022 rename from a
1022 rename from a
1023 rename to b
1023 rename to b
1024 --- a/a
1024 --- a/a
1025 +++ b/b
1025 +++ b/b
1026 @@ -1,3 +1,3 @@
1026 @@ -1,3 +1,3 @@
1027 a
1027 a
1028 -m1
1028 -m1
1029 -m2
1029 -m2
1030 +6
1030 +6
1031 +a1
1031 +a1
1032 diff --git a/x/y b/x/y
1032 diff --git a/x/y b/x/y
1033 deleted file mode 100644
1033 deleted file mode 100644
1034 --- a/x/y
1034 --- a/x/y
1035 +++ /dev/null
1035 +++ /dev/null
1036 @@ -1,1 +0,0 @@
1036 @@ -1,1 +0,0 @@
1037 -y1
1037 -y1
1038
1038
1039 - parent to branch: --rev . --rev 2
1039 - parent to branch: --rev . --rev 2
1040 A a
1040 A a
1041 b
1041 b
1042 A x/y
1042 A x/y
1043 R b
1043 R b
1044
1044
1045 diff --git a/b b/a
1045 diff --git a/b b/a
1046 rename from b
1046 rename from b
1047 rename to a
1047 rename to a
1048 --- a/b
1048 --- a/b
1049 +++ b/a
1049 +++ b/a
1050 @@ -1,3 +1,3 @@
1050 @@ -1,3 +1,3 @@
1051 a
1051 a
1052 -6
1052 -6
1053 -a1
1053 -a1
1054 +m1
1054 +m1
1055 +m2
1055 +m2
1056 diff --git a/x/y b/x/y
1056 diff --git a/x/y b/x/y
1057 new file mode 100644
1057 new file mode 100644
1058 --- /dev/null
1058 --- /dev/null
1059 +++ b/x/y
1059 +++ b/x/y
1060 @@ -0,0 +1,1 @@
1060 @@ -0,0 +1,1 @@
1061 +y1
1061 +y1
1062
1062
1063
1063
1064 updating to branch default
1064 updating to branch default
1065 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
1065 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
1066 created new head
1066 created new head
1067 moving x/x to y/x
1067 moving x/x to y/x
1068 ** directory move **
1068 ** directory move **
1069 ** hg mv x y / add y/x x1 / add y/x x2
1069 ** hg mv x y / add y/x x1 / add y/x x2
1070 - working to parent:
1070 - working to parent:
1071 M y/x
1071 M y/x
1072
1072
1073 diff --git a/y/x b/y/x
1073 diff --git a/y/x b/y/x
1074 --- a/y/x
1074 --- a/y/x
1075 +++ b/y/x
1075 +++ b/y/x
1076 @@ -1,2 +1,3 @@
1076 @@ -1,2 +1,3 @@
1077 x
1077 x
1078 x1
1078 x1
1079 +x2
1079 +x2
1080
1080
1081 - working to root: --rev 0
1081 - working to root: --rev 0
1082 M a
1082 M a
1083 A y/x
1083 A y/x
1084 x/x
1084 x/x
1085 R x/x
1085 R x/x
1086
1086
1087 diff --git a/a b/a
1087 diff --git a/a b/a
1088 --- a/a
1088 --- a/a
1089 +++ b/a
1089 +++ b/a
1090 @@ -1,1 +1,2 @@
1090 @@ -1,1 +1,2 @@
1091 a
1091 a
1092 +7
1092 +7
1093 diff --git a/x/x b/y/x
1093 diff --git a/x/x b/y/x
1094 rename from x/x
1094 rename from x/x
1095 rename to y/x
1095 rename to y/x
1096 --- a/x/x
1096 --- a/x/x
1097 +++ b/y/x
1097 +++ b/y/x
1098 @@ -1,1 +1,3 @@
1098 @@ -1,1 +1,3 @@
1099 x
1099 x
1100 +x1
1100 +x1
1101 +x2
1101 +x2
1102
1102
1103 - working to branch: --rev 2
1103 - working to branch: --rev 2
1104 M a
1104 M a
1105 A y/x
1105 A y/x
1106 x/x
1106 x/x
1107 R x/x
1107 R x/x
1108 R x/y
1108 R x/y
1109
1109
1110 diff --git a/a b/a
1110 diff --git a/a b/a
1111 --- a/a
1111 --- a/a
1112 +++ b/a
1112 +++ b/a
1113 @@ -1,3 +1,2 @@
1113 @@ -1,3 +1,2 @@
1114 a
1114 a
1115 -m1
1115 -m1
1116 -m2
1116 -m2
1117 +7
1117 +7
1118 diff --git a/x/y b/x/y
1118 diff --git a/x/y b/x/y
1119 deleted file mode 100644
1119 deleted file mode 100644
1120 --- a/x/y
1120 --- a/x/y
1121 +++ /dev/null
1121 +++ /dev/null
1122 @@ -1,1 +0,0 @@
1122 @@ -1,1 +0,0 @@
1123 -y1
1123 -y1
1124 diff --git a/x/x b/y/x
1124 diff --git a/x/x b/y/x
1125 rename from x/x
1125 rename from x/x
1126 rename to y/x
1126 rename to y/x
1127 --- a/x/x
1127 --- a/x/x
1128 +++ b/y/x
1128 +++ b/y/x
1129 @@ -1,1 +1,3 @@
1129 @@ -1,1 +1,3 @@
1130 x
1130 x
1131 +x1
1131 +x1
1132 +x2
1132 +x2
1133
1133
1134 - root to parent: --rev 0 --rev .
1134 - root to parent: --rev 0 --rev .
1135 M a
1135 M a
1136 A y/x
1136 A y/x
1137 x/x
1137 x/x
1138 R x/x
1138 R x/x
1139
1139
1140 diff --git a/a b/a
1140 diff --git a/a b/a
1141 --- a/a
1141 --- a/a
1142 +++ b/a
1142 +++ b/a
1143 @@ -1,1 +1,2 @@
1143 @@ -1,1 +1,2 @@
1144 a
1144 a
1145 +7
1145 +7
1146 diff --git a/x/x b/y/x
1146 diff --git a/x/x b/y/x
1147 rename from x/x
1147 rename from x/x
1148 rename to y/x
1148 rename to y/x
1149 --- a/x/x
1149 --- a/x/x
1150 +++ b/y/x
1150 +++ b/y/x
1151 @@ -1,1 +1,2 @@
1151 @@ -1,1 +1,2 @@
1152 x
1152 x
1153 +x1
1153 +x1
1154
1154
1155 - parent to root: --rev . --rev 0
1155 - parent to root: --rev . --rev 0
1156 M a
1156 M a
1157 A x/x
1157 A x/x
1158 y/x
1158 y/x
1159 R y/x
1159 R y/x
1160
1160
1161 diff --git a/a b/a
1161 diff --git a/a b/a
1162 --- a/a
1162 --- a/a
1163 +++ b/a
1163 +++ b/a
1164 @@ -1,2 +1,1 @@
1164 @@ -1,2 +1,1 @@
1165 a
1165 a
1166 -7
1166 -7
1167 diff --git a/y/x b/x/x
1167 diff --git a/y/x b/x/x
1168 rename from y/x
1168 rename from y/x
1169 rename to x/x
1169 rename to x/x
1170 --- a/y/x
1170 --- a/y/x
1171 +++ b/x/x
1171 +++ b/x/x
1172 @@ -1,2 +1,1 @@
1172 @@ -1,2 +1,1 @@
1173 x
1173 x
1174 -x1
1174 -x1
1175
1175
1176 - branch to parent: --rev 2 --rev .
1176 - branch to parent: --rev 2 --rev .
1177 M a
1177 M a
1178 A y/x
1178 A y/x
1179 x/x
1179 x/x
1180 R x/x
1180 R x/x
1181 R x/y
1181 R x/y
1182
1182
1183 diff --git a/a b/a
1183 diff --git a/a b/a
1184 --- a/a
1184 --- a/a
1185 +++ b/a
1185 +++ b/a
1186 @@ -1,3 +1,2 @@
1186 @@ -1,3 +1,2 @@
1187 a
1187 a
1188 -m1
1188 -m1
1189 -m2
1189 -m2
1190 +7
1190 +7
1191 diff --git a/x/y b/x/y
1191 diff --git a/x/y b/x/y
1192 deleted file mode 100644
1192 deleted file mode 100644
1193 --- a/x/y
1193 --- a/x/y
1194 +++ /dev/null
1194 +++ /dev/null
1195 @@ -1,1 +0,0 @@
1195 @@ -1,1 +0,0 @@
1196 -y1
1196 -y1
1197 diff --git a/x/x b/y/x
1197 diff --git a/x/x b/y/x
1198 rename from x/x
1198 rename from x/x
1199 rename to y/x
1199 rename to y/x
1200 --- a/x/x
1200 --- a/x/x
1201 +++ b/y/x
1201 +++ b/y/x
1202 @@ -1,1 +1,2 @@
1202 @@ -1,1 +1,2 @@
1203 x
1203 x
1204 +x1
1204 +x1
1205
1205
1206 - parent to branch: --rev . --rev 2
1206 - parent to branch: --rev . --rev 2
1207 M a
1207 M a
1208 A x/x
1208 A x/x
1209 y/x
1209 y/x
1210 A x/y
1210 A x/y
1211 R y/x
1211 R y/x
1212
1212
1213 diff --git a/a b/a
1213 diff --git a/a b/a
1214 --- a/a
1214 --- a/a
1215 +++ b/a
1215 +++ b/a
1216 @@ -1,2 +1,3 @@
1216 @@ -1,2 +1,3 @@
1217 a
1217 a
1218 -7
1218 -7
1219 +m1
1219 +m1
1220 +m2
1220 +m2
1221 diff --git a/y/x b/x/x
1221 diff --git a/y/x b/x/x
1222 rename from y/x
1222 rename from y/x
1223 rename to x/x
1223 rename to x/x
1224 --- a/y/x
1224 --- a/y/x
1225 +++ b/x/x
1225 +++ b/x/x
1226 @@ -1,2 +1,1 @@
1226 @@ -1,2 +1,1 @@
1227 x
1227 x
1228 -x1
1228 -x1
1229 diff --git a/x/y b/x/y
1229 diff --git a/x/y b/x/y
1230 new file mode 100644
1230 new file mode 100644
1231 --- /dev/null
1231 --- /dev/null
1232 +++ b/x/y
1232 +++ b/x/y
1233 @@ -0,0 +1,1 @@
1233 @@ -0,0 +1,1 @@
1234 +y1
1234 +y1
1235
1235
1236
1236
1237 % testing copies with unrelated branch
1238 adding a
1239 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1240 adding a
1241 created new head
1242 % unrelated branch diff
1243 diff --git a/a b/a
1244 deleted file mode 100644
1245 --- a/a
1246 +++ /dev/null
1247 @@ -1,1 +0,0 @@
1248 -a
1249 diff --git a/b b/b
1250 new file mode 100644
1251 --- /dev/null
1252 +++ b/b
1253 @@ -0,0 +1,1 @@
1254 +a
General Comments 0
You need to be logged in to leave comments. Login now