##// END OF EJS Templates
merge: if filemerge skips merge, report as updated
Matt Mackall -
r3400:d2b55e3c default
parent child Browse files
Show More
@@ -30,7 +30,7 def filemerge(repo, fw, fo, wctx, mctx):
30 fco = mctx.filectx(fo)
30 fco = mctx.filectx(fo)
31
31
32 if not fco.cmp(fcm.data()): # files identical?
32 if not fco.cmp(fcm.data()): # files identical?
33 return 0
33 return None
34
34
35 fca = fcm.ancestor(fco)
35 fca = fcm.ancestor(fco)
36 if not fca:
36 if not fca:
@@ -288,9 +288,13 def applyupdates(repo, action, wctx, mct
288 removed +=1
288 removed +=1
289 elif m == "m": # merge
289 elif m == "m": # merge
290 f2, fd, flag, move = a[2:]
290 f2, fd, flag, move = a[2:]
291 if filemerge(repo, f, f2, wctx, mctx):
291 r = filemerge(repo, f, f2, wctx, mctx)
292 if r > 0:
292 unresolved += 1
293 unresolved += 1
293 else:
294 else:
295 if r is None:
296 updated += 1
297 else:
294 merged += 1
298 merged += 1
295 if f != fd:
299 if f != fd:
296 repo.ui.debug(_("copying %s to %s\n") % (f, fd))
300 repo.ui.debug(_("copying %s to %s\n") % (f, fd))
@@ -11,7 +11,7 1 files updated, 0 files merged, 0 files
11 ? file1.orig
11 ? file1.orig
12 016807e6fdaf tip
12 016807e6fdaf tip
13 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
13 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
14 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
14 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
15 ? file1.orig
15 ? file1.orig
16 016807e6fdaf tip
16 016807e6fdaf tip
17 ? file1.orig
17 ? file1.orig
@@ -1,6 +1,6
1 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
2 %% no merges expected
2 %% no merges expected
3 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
3 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
4 (branch merge, don't forget to commit)
4 (branch merge, don't forget to commit)
5 diff -r d9e5953b9dec b
5 diff -r d9e5953b9dec b
6 --- /dev/null
6 --- /dev/null
@@ -29,7 +29,7 This is file b1
29 %% merge fails
29 %% merge fails
30 abort: outstanding uncommitted changes
30 abort: outstanding uncommitted changes
31 %% merge expected!
31 %% merge expected!
32 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
32 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
33 (branch merge, don't forget to commit)
33 (branch merge, don't forget to commit)
34 diff -r c1dd73cbf59f b
34 diff -r c1dd73cbf59f b
35 --- a/b
35 --- a/b
@@ -92,7 +92,7 resolving manifests
92 copying a to b
92 copying a to b
93 merging rev
93 merging rev
94 my rev@94b33a1b7f2d+ other rev@735846fee2d7 ancestor rev@924404dff337
94 my rev@94b33a1b7f2d+ other rev@735846fee2d7 ancestor rev@924404dff337
95 0 files updated, 2 files merged, 0 files removed, 0 files unresolved
95 1 files updated, 1 files merged, 0 files removed, 0 files unresolved
96 (branch merge, don't forget to commit)
96 (branch merge, don't forget to commit)
97 --------------
97 --------------
98 M b
98 M b
@@ -110,7 +110,7 resolving manifests
110 rev: versions differ -> m
110 rev: versions differ -> m
111 merging rev
111 merging rev
112 my rev@ac809aeed39a+ other rev@97c705ade336 ancestor rev@924404dff337
112 my rev@ac809aeed39a+ other rev@97c705ade336 ancestor rev@924404dff337
113 0 files updated, 2 files merged, 0 files removed, 0 files unresolved
113 1 files updated, 1 files merged, 0 files removed, 0 files unresolved
114 (branch merge, don't forget to commit)
114 (branch merge, don't forget to commit)
115 --------------
115 --------------
116 M b
116 M b
@@ -130,7 +130,7 copying a to b
130 removing a
130 removing a
131 merging rev
131 merging rev
132 my rev@94b33a1b7f2d+ other rev@e03727d2d66b ancestor rev@924404dff337
132 my rev@94b33a1b7f2d+ other rev@e03727d2d66b ancestor rev@924404dff337
133 0 files updated, 2 files merged, 0 files removed, 0 files unresolved
133 1 files updated, 1 files merged, 0 files removed, 0 files unresolved
134 (branch merge, don't forget to commit)
134 (branch merge, don't forget to commit)
135 --------------
135 --------------
136 M b
136 M b
@@ -147,7 +147,7 resolving manifests
147 rev: versions differ -> m
147 rev: versions differ -> m
148 merging rev
148 merging rev
149 my rev@ecf3cb2a4219+ other rev@97c705ade336 ancestor rev@924404dff337
149 my rev@ecf3cb2a4219+ other rev@97c705ade336 ancestor rev@924404dff337
150 0 files updated, 2 files merged, 0 files removed, 0 files unresolved
150 1 files updated, 1 files merged, 0 files removed, 0 files unresolved
151 (branch merge, don't forget to commit)
151 (branch merge, don't forget to commit)
152 --------------
152 --------------
153 M b
153 M b
@@ -133,4 +133,4 adding changesets
133 adding manifests
133 adding manifests
134 adding file changes
134 adding file changes
135 added 1 changesets with 1 changes to 1 files
135 added 1 changesets with 1 changes to 1 files
136 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
136 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
General Comments 0
You need to be logged in to leave comments. Login now