##// END OF EJS Templates
Merge: refactor err and failedmerge -> unresolved
Matt Mackall -
r2813:56f99f5a default
parent child Browse files
Show More
@@ -57,8 +57,6 b' def update(repo, node, branchmerge=False'
57 57 if not force and pl[1] != nullid:
58 58 raise util.Abort(_("outstanding uncommitted merges"))
59 59
60 err = False
61
62 60 p1, p2 = pl[0], node
63 61 pa = repo.changelog.ancestor(p1, p2)
64 62 m1n = repo.changelog.read(p1)[0]
@@ -276,7 +274,7 b' def update(repo, node, branchmerge=False'
276 274 repo.dirstate.update([f], 'n')
277 275
278 276 # merge the tricky bits
279 failedmerge = []
277 unresolved = []
280 278 files = merge.keys()
281 279 files.sort()
282 280 for f in files:
@@ -284,8 +282,7 b' def update(repo, node, branchmerge=False'
284 282 my, other, flag = merge[f]
285 283 ret = merge3(repo, f, my, other, xp1, xp2)
286 284 if ret:
287 err = True
288 failedmerge.append(f)
285 unresolved.append(f)
289 286 util.set_exec(repo.wjoin(f), flag)
290 287 if not partial:
291 288 if branchmerge:
@@ -322,14 +319,14 b' def update(repo, node, branchmerge=False'
322 319
323 320 if show_stats:
324 321 stats = ((len(get), _("updated")),
325 (len(merge) - len(failedmerge), _("merged")),
322 (len(merge) - len(unresolved), _("merged")),
326 323 (len(remove), _("removed")),
327 (len(failedmerge), _("unresolved")))
324 (len(unresolved), _("unresolved")))
328 325 note = ", ".join([_("%d files %s") % s for s in stats])
329 326 repo.ui.status("%s\n" % note)
330 327 if not partial:
331 328 if branchmerge:
332 if failedmerge:
329 if unresolved:
333 330 repo.ui.status(_("There are unresolved merges,"
334 331 " you can redo the full merge using:\n"
335 332 " hg update -C %s\n"
@@ -338,10 +335,10 b' def update(repo, node, branchmerge=False'
338 335 repo.changelog.rev(p2))))
339 336 elif remind:
340 337 repo.ui.status(_("(branch merge, don't forget to commit)\n"))
341 elif failedmerge:
338 elif unresolved:
342 339 repo.ui.status(_("There are unresolved merges with"
343 340 " locally modified files.\n"))
344 341
345 repo.hook('update', parent1=xp1, parent2=xxp2, error=int(err))
346 return err
342 repo.hook('update', parent1=xp1, parent2=xxp2, error=len(unresolved))
343 return len(unresolved)
347 344
General Comments 0
You need to be logged in to leave comments. Login now