##// END OF EJS Templates
merge: make unresolved a counter
Matt Mackall -
r2980:54d85098 default
parent child Browse files
Show More
@@ -233,8 +233,7 b' def update(repo, node, branchmerge=False'
233 233 repo.hook('preupdate', throw=True, parent1=xp1, parent2=xxp2)
234 234
235 235 # update files
236 unresolved = []
237 updated, merged, removed = 0, 0, 0
236 updated, merged, removed, unresolved = 0, 0, 0, 0
238 237 files = action.keys()
239 238 files.sort()
240 239 for f in files:
@@ -254,7 +253,7 b' def update(repo, node, branchmerge=False'
254 253 elif other:
255 254 repo.ui.status(_("merging %s\n") % f)
256 255 if merge3(repo, f, my, other, xp1, xp2):
257 unresolved.append(f)
256 unresolved += 1
258 257 util.set_exec(repo.wjoin(f), flag)
259 258 merged += 1
260 259 else:
@@ -299,9 +298,9 b' def update(repo, node, branchmerge=False'
299 298
300 299 if show_stats:
301 300 stats = ((updated, _("updated")),
302 (merged - len(unresolved), _("merged")),
301 (merged - unresolved, _("merged")),
303 302 (removed, _("removed")),
304 (len(unresolved), _("unresolved")))
303 (unresolved, _("unresolved")))
305 304 note = ", ".join([_("%d files %s") % s for s in stats])
306 305 repo.ui.status("%s\n" % note)
307 306 if not partial:
@@ -319,6 +318,6 b' def update(repo, node, branchmerge=False'
319 318 repo.ui.status(_("There are unresolved merges with"
320 319 " locally modified files.\n"))
321 320
322 repo.hook('update', parent1=xp1, parent2=xxp2, error=len(unresolved))
323 return len(unresolved)
321 repo.hook('update', parent1=xp1, parent2=xxp2, error=unresolved)
322 return unresolved
324 323
General Comments 0
You need to be logged in to leave comments. Login now