##// END OF EJS Templates
merge: add debug diagnostics for findcopies
Matt Mackall -
r5371:17ed9b9a default
parent child Browse files
Show More
@@ -188,9 +188,18 b' def findcopies(repo, m1, m2, ma, limit):'
188 if not m1 or not m2 or not ma:
188 if not m1 or not m2 or not ma:
189 return {}, {}
189 return {}, {}
190
190
191 repo.ui.debug(_(" searching for copies back to rev %d\n") % limit)
192
191 u1 = nonoverlap(m1, m2, ma)
193 u1 = nonoverlap(m1, m2, ma)
192 u2 = nonoverlap(m2, m1, ma)
194 u2 = nonoverlap(m2, m1, ma)
193
195
196 if u1:
197 repo.ui.debug(_(" unmatched files in local:\n %s\n")
198 % "\n ".join(u1))
199 if u2:
200 repo.ui.debug(_(" unmatched files in other:\n %s\n")
201 % "\n ".join(u2))
202
194 for f in u1:
203 for f in u1:
195 checkcopies(ctx(f, m1[f]), m2, ma)
204 checkcopies(ctx(f, m1[f]), m2, ma)
196
205
@@ -204,9 +213,19 b' def findcopies(repo, m1, m2, ma, limit):'
204 fo.remove(f)
213 fo.remove(f)
205 d2[f] = (of, fo)
214 d2[f] = (of, fo)
206
215
216 if fullcopy:
217 repo.ui.debug(_(" all copies found (* = to merge, ! = divergent):\n"))
218 for f in fullcopy:
219 note = ""
220 if f in copy: note += "*"
221 if f in diverge: note += "!"
222 repo.ui.debug(_(" %s -> %s %s\n") % (f, fullcopy[f], note))
223
207 if not fullcopy or not repo.ui.configbool("merge", "followdirs", True):
224 if not fullcopy or not repo.ui.configbool("merge", "followdirs", True):
208 return copy, diverge
225 return copy, diverge
209
226
227 repo.ui.debug(_(" checking for directory renames\n"))
228
210 # generate a directory move map
229 # generate a directory move map
211 d1, d2 = dirs(m1), dirs(m2)
230 d1, d2 = dirs(m1), dirs(m2)
212 invalid = {}
231 invalid = {}
@@ -241,6 +260,9 b' def findcopies(repo, m1, m2, ma, limit):'
241 if not dirmove:
260 if not dirmove:
242 return copy, diverge
261 return copy, diverge
243
262
263 for d in dirmove:
264 repo.ui.debug(_(" dir %s -> %s\n") % (d, dirmove[d]))
265
244 # check unaccounted nonoverlapping files against directory moves
266 # check unaccounted nonoverlapping files against directory moves
245 for f in u1 + u2:
267 for f in u1 + u2:
246 if f not in fullcopy:
268 if f not in fullcopy:
@@ -248,6 +270,7 b' def findcopies(repo, m1, m2, ma, limit):'
248 if f.startswith(d):
270 if f.startswith(d):
249 # new file added in a directory that was moved, move it
271 # new file added in a directory that was moved, move it
250 copy[f] = dirmove[d] + f[len(d):]
272 copy[f] = dirmove[d] + f[len(d):]
273 repo.ui.debug(_(" file %s -> %s\n") % (f, copy[f]))
251 break
274 break
252
275
253 return copy, diverge
276 return copy, diverge
@@ -2,6 +2,14 b' 1 files updated, 0 files merged, 2 files'
2 resolving manifests
2 resolving manifests
3 overwrite None partial False
3 overwrite None partial False
4 ancestor 583c7b748052 local fb3948d97f07+ remote 40da226db0f0
4 ancestor 583c7b748052 local fb3948d97f07+ remote 40da226db0f0
5 searching for copies back to rev 1
6 unmatched files in other:
7 b
8 c
9 all copies found (* = to merge, ! = divergent):
10 c -> a *
11 b -> a *
12 checking for directory renames
5 a: remote moved to c -> m
13 a: remote moved to c -> m
6 a: remote moved to b -> m
14 a: remote moved to b -> m
7 copying a to b
15 copying a to b
@@ -1,6 +1,12 b''
1 resolving manifests
1 resolving manifests
2 overwrite None partial False
2 overwrite None partial False
3 ancestor 310fd17130da local 2092631ce82b+ remote 7731dad1c2b9
3 ancestor 310fd17130da local 2092631ce82b+ remote 7731dad1c2b9
4 searching for copies back to rev 1
5 unmatched files in other:
6 bar
7 all copies found (* = to merge, ! = divergent):
8 bar -> foo *
9 checking for directory renames
4 foo: versions differ -> m
10 foo: versions differ -> m
5 foo: remote copied to bar -> m
11 foo: remote copied to bar -> m
6 copying foo to bar
12 copying foo to bar
@@ -4,6 +4,9 b' 1 files updated, 0 files merged, 0 files'
4 resolving manifests
4 resolving manifests
5 overwrite None partial False
5 overwrite None partial False
6 ancestor bbd179dfa0a7 local 71766447bdbb+ remote 4d9e78aaceee
6 ancestor bbd179dfa0a7 local 71766447bdbb+ remote 4d9e78aaceee
7 searching for copies back to rev 1
8 unmatched files in local:
9 bar
7 foo: remote is newer -> g
10 foo: remote is newer -> g
8 getting foo
11 getting foo
9 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
12 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -4,6 +4,12 b' 1 files updated, 0 files merged, 1 files'
4 resolving manifests
4 resolving manifests
5 overwrite None partial False
5 overwrite None partial False
6 ancestor 81f4b099af3d local c64f439569a9+ remote 2f8037f47a5c
6 ancestor 81f4b099af3d local c64f439569a9+ remote 2f8037f47a5c
7 searching for copies back to rev 1
8 unmatched files in other:
9 1a
10 all copies found (* = to merge, ! = divergent):
11 1a -> 1
12 checking for directory renames
7 1: other deleted -> r
13 1: other deleted -> r
8 1a: remote created -> g
14 1a: remote created -> g
9 removing 1
15 removing 1
@@ -15,6 +21,12 b' 1 files updated, 0 files merged, 1 files'
15 resolving manifests
21 resolving manifests
16 overwrite None partial False
22 overwrite None partial False
17 ancestor c64f439569a9 local ac7575e3c052+ remote 746e9549ea96
23 ancestor c64f439569a9 local ac7575e3c052+ remote 746e9549ea96
24 searching for copies back to rev 1
25 unmatched files in local:
26 1a
27 all copies found (* = to merge, ! = divergent):
28 1a -> 1 *
29 checking for directory renames
18 1a: local moved to 1 -> m
30 1a: local moved to 1 -> m
19 merging 1a and 1
31 merging 1a and 1
20 my 1a@ac7575e3c052+ other 1@746e9549ea96 ancestor 1@81f4b099af3d
32 my 1a@ac7575e3c052+ other 1@746e9549ea96 ancestor 1@81f4b099af3d
@@ -24,6 +36,12 b' 1 files updated, 0 files merged, 1 files'
24 resolving manifests
36 resolving manifests
25 overwrite None partial False
37 overwrite None partial False
26 ancestor c64f439569a9 local 746e9549ea96+ remote ac7575e3c052
38 ancestor c64f439569a9 local 746e9549ea96+ remote ac7575e3c052
39 searching for copies back to rev 1
40 unmatched files in other:
41 1a
42 all copies found (* = to merge, ! = divergent):
43 1a -> 1 *
44 checking for directory renames
27 1: remote moved to 1a -> m
45 1: remote moved to 1a -> m
28 copying 1 to 1a
46 copying 1 to 1a
29 merging 1 and 1a
47 merging 1 and 1a
@@ -23,6 +23,7 b' 0:2665aaee66e9'
23 resolving manifests
23 resolving manifests
24 overwrite None partial False
24 overwrite None partial False
25 ancestor 0a3ab4856510 local 2d2f9a22c82b+ remote 7d3b554bfdf1
25 ancestor 0a3ab4856510 local 2d2f9a22c82b+ remote 7d3b554bfdf1
26 searching for copies back to rev 1
26 bar: versions differ -> m
27 bar: versions differ -> m
27 merging bar
28 merging bar
28 my bar@2d2f9a22c82b+ other bar@7d3b554bfdf1 ancestor bar@0a3ab4856510
29 my bar@2d2f9a22c82b+ other bar@7d3b554bfdf1 ancestor bar@0a3ab4856510
@@ -68,6 +69,7 b' 0:2665aaee66e9'
68 resolving manifests
69 resolving manifests
69 overwrite None partial False
70 overwrite None partial False
70 ancestor 0a3ab4856510 local 2d2f9a22c82b+ remote 96ab80c60897
71 ancestor 0a3ab4856510 local 2d2f9a22c82b+ remote 96ab80c60897
72 searching for copies back to rev 1
71 bar: versions differ -> m
73 bar: versions differ -> m
72 merging bar
74 merging bar
73 my bar@2d2f9a22c82b+ other bar@96ab80c60897 ancestor bar@0a3ab4856510
75 my bar@2d2f9a22c82b+ other bar@96ab80c60897 ancestor bar@0a3ab4856510
@@ -24,6 +24,7 b' warning: conflicts during merge.'
24 resolving manifests
24 resolving manifests
25 overwrite None partial False
25 overwrite None partial False
26 ancestor faaea63e63a9 local 451c744aabcc+ remote a070d41e8360
26 ancestor faaea63e63a9 local 451c744aabcc+ remote a070d41e8360
27 searching for copies back to rev 1
27 test.txt: versions differ -> m
28 test.txt: versions differ -> m
28 merging test.txt
29 merging test.txt
29 my test.txt@451c744aabcc+ other test.txt@a070d41e8360 ancestor test.txt@faaea63e63a9
30 my test.txt@451c744aabcc+ other test.txt@a070d41e8360 ancestor test.txt@faaea63e63a9
@@ -9,6 +9,18 b' 2 files updated, 0 files merged, 2 files'
9 resolving manifests
9 resolving manifests
10 overwrite None partial False
10 overwrite None partial False
11 ancestor f9b20c0d4c51 local ce36d17b18fb+ remote 55119e611c80
11 ancestor f9b20c0d4c51 local ce36d17b18fb+ remote 55119e611c80
12 searching for copies back to rev 1
13 unmatched files in local:
14 a/c
15 unmatched files in other:
16 b/a
17 b/b
18 all copies found (* = to merge, ! = divergent):
19 b/a -> a/a
20 b/b -> a/b
21 checking for directory renames
22 dir a/ -> b/
23 file a/c -> b/c
12 a/c: remote renamed directory to b/c -> d
24 a/c: remote renamed directory to b/c -> d
13 a/b: other deleted -> r
25 a/b: other deleted -> r
14 a/a: other deleted -> r
26 a/a: other deleted -> r
@@ -34,6 +46,18 b' 0 files updated, 0 files merged, 1 files'
34 resolving manifests
46 resolving manifests
35 overwrite None partial False
47 overwrite None partial False
36 ancestor f9b20c0d4c51 local 55119e611c80+ remote ce36d17b18fb
48 ancestor f9b20c0d4c51 local 55119e611c80+ remote ce36d17b18fb
49 searching for copies back to rev 1
50 unmatched files in local:
51 b/a
52 b/b
53 unmatched files in other:
54 a/c
55 all copies found (* = to merge, ! = divergent):
56 b/a -> a/a
57 b/b -> a/b
58 checking for directory renames
59 dir a/ -> b/
60 file a/c -> b/c
37 None: local renamed directory to b/c -> d
61 None: local renamed directory to b/c -> d
38 getting a/c to b/c
62 getting a/c to b/c
39 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
63 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -4,6 +4,17 b' merge'
4 resolving manifests
4 resolving manifests
5 overwrite None partial False
5 overwrite None partial False
6 ancestor af1939970a1c local f26ec4fc3fa3+ remote 8e765a822af2
6 ancestor af1939970a1c local f26ec4fc3fa3+ remote 8e765a822af2
7 searching for copies back to rev 1
8 unmatched files in local:
9 c2
10 unmatched files in other:
11 b
12 b2
13 all copies found (* = to merge, ! = divergent):
14 c2 -> a2
15 b -> a *
16 b2 -> a2
17 checking for directory renames
7 a2: divergent renames -> dr
18 a2: divergent renames -> dr
8 a: remote moved to b -> m
19 a: remote moved to b -> m
9 b2: remote created -> g
20 b2: remote created -> g
@@ -17,6 +17,9 b' summary: 1'
17 resolving manifests
17 resolving manifests
18 overwrite False partial False
18 overwrite False partial False
19 ancestor 33aaa84a386b local 33aaa84a386b+ remote 802f095af299
19 ancestor 33aaa84a386b local 33aaa84a386b+ remote 802f095af299
20 searching for copies back to rev 1
21 unmatched files in other:
22 b
20 a: versions differ -> m
23 a: versions differ -> m
21 b: remote created -> g
24 b: remote created -> g
22 merging a
25 merging a
@@ -50,6 +53,9 b' summary: 1'
50 resolving manifests
53 resolving manifests
51 overwrite False partial False
54 overwrite False partial False
52 ancestor 33aaa84a386b local 33aaa84a386b+ remote 802f095af299
55 ancestor 33aaa84a386b local 33aaa84a386b+ remote 802f095af299
56 searching for copies back to rev 1
57 unmatched files in other:
58 b
53 a: versions differ -> m
59 a: versions differ -> m
54 b: remote created -> g
60 b: remote created -> g
55 merging a
61 merging a
@@ -100,6 +106,7 b' failed'
100 resolving manifests
106 resolving manifests
101 overwrite False partial False
107 overwrite False partial False
102 ancestor 33aaa84a386b local 802f095af299+ remote 030602aee63d
108 ancestor 33aaa84a386b local 802f095af299+ remote 030602aee63d
109 searching for copies back to rev 1
103 a: versions differ -> m
110 a: versions differ -> m
104 b: versions differ -> m
111 b: versions differ -> m
105 merging a
112 merging a
General Comments 0
You need to be logged in to leave comments. Login now