##// END OF EJS Templates
merge: ensure that we always commit the mergestate...
Ryan McElroy -
r34681:c0a524f7 default
parent child Browse files
Show More
@@ -1537,30 +1537,32 b' def applyupdates(repo, actions, wctx, mc'
1537 newactions.append((f, args, msg))
1537 newactions.append((f, args, msg))
1538 mergeactions = newactions
1538 mergeactions = newactions
1539
1539
1540 # premerge
1540 try:
1541 tocomplete = []
1541 # premerge
1542 for f, args, msg in mergeactions:
1542 tocomplete = []
1543 repo.ui.debug(" %s: %s -> m (premerge)\n" % (f, msg))
1543 for f, args, msg in mergeactions:
1544 z += 1
1544 repo.ui.debug(" %s: %s -> m (premerge)\n" % (f, msg))
1545 progress(_updating, z, item=f, total=numupdates, unit=_files)
1545 z += 1
1546 if f == '.hgsubstate': # subrepo states need updating
1546 progress(_updating, z, item=f, total=numupdates, unit=_files)
1547 subrepo.submerge(repo, wctx, mctx, wctx.ancestor(mctx),
1547 if f == '.hgsubstate': # subrepo states need updating
1548 overwrite, labels)
1548 subrepo.submerge(repo, wctx, mctx, wctx.ancestor(mctx),
1549 continue
1549 overwrite, labels)
1550 wctx[f].audit()
1550 continue
1551 complete, r = ms.preresolve(f, wctx)
1551 wctx[f].audit()
1552 if not complete:
1552 complete, r = ms.preresolve(f, wctx)
1553 numupdates += 1
1553 if not complete:
1554 tocomplete.append((f, args, msg))
1554 numupdates += 1
1555 tocomplete.append((f, args, msg))
1555
1556
1556 # merge
1557 # merge
1557 for f, args, msg in tocomplete:
1558 for f, args, msg in tocomplete:
1558 repo.ui.debug(" %s: %s -> m (merge)\n" % (f, msg))
1559 repo.ui.debug(" %s: %s -> m (merge)\n" % (f, msg))
1559 z += 1
1560 z += 1
1560 progress(_updating, z, item=f, total=numupdates, unit=_files)
1561 progress(_updating, z, item=f, total=numupdates, unit=_files)
1561 ms.resolve(f, wctx)
1562 ms.resolve(f, wctx)
1562
1563
1563 ms.commit()
1564 finally:
1565 ms.commit()
1564
1566
1565 unresolved = ms.unresolvedcount()
1567 unresolved = ms.unresolvedcount()
1566
1568
General Comments 0
You need to be logged in to leave comments. Login now