##// END OF EJS Templates
merge.applyupdates: use counters from mergestate...
Siddharth Agarwal -
r27078:a421deba default
parent child Browse files
Show More
@@ -944,7 +944,7 b' def applyupdates(repo, actions, wctx, mc'
944 describes how many files were affected by the update.
944 describes how many files were affected by the update.
945 """
945 """
946
946
947 updated, merged, removed, unresolved = 0, 0, 0, 0
947 updated, merged, removed = 0, 0, 0
948 ms = mergestate.clean(repo, wctx.p1().node(), mctx.node())
948 ms = mergestate.clean(repo, wctx.p1().node(), mctx.node())
949 moves = []
949 moves = []
950 for m, l in actions.items():
950 for m, l in actions.items():
@@ -1084,15 +1084,7 b' def applyupdates(repo, actions, wctx, mc'
1084 continue
1084 continue
1085 audit(f)
1085 audit(f)
1086 complete, r = ms.preresolve(f, wctx, labels=labels)
1086 complete, r = ms.preresolve(f, wctx, labels=labels)
1087 if complete:
1087 if not complete:
1088 if r is not None and r > 0:
1089 unresolved += 1
1090 else:
1091 if r is None:
1092 updated += 1
1093 else:
1094 merged += 1
1095 else:
1096 numupdates += 1
1088 numupdates += 1
1097 tocomplete.append((f, args, msg))
1089 tocomplete.append((f, args, msg))
1098
1090
@@ -1101,17 +1093,12 b' def applyupdates(repo, actions, wctx, mc'
1101 repo.ui.debug(" %s: %s -> m (merge)\n" % (f, msg))
1093 repo.ui.debug(" %s: %s -> m (merge)\n" % (f, msg))
1102 z += 1
1094 z += 1
1103 progress(_updating, z, item=f, total=numupdates, unit=_files)
1095 progress(_updating, z, item=f, total=numupdates, unit=_files)
1104 r = ms.resolve(f, wctx, labels=labels)
1096 ms.resolve(f, wctx, labels=labels)
1105 if r is not None and r > 0:
1106 unresolved += 1
1107 else:
1108 if r is None:
1109 updated += 1
1110 else:
1111 merged += 1
1112
1097
1113 ms.commit()
1098 ms.commit()
1114
1099
1100 unresolved = ms.unresolvedcount()
1101
1115 if usemergedriver and not unresolved and ms.mdstate() != 's':
1102 if usemergedriver and not unresolved and ms.mdstate() != 's':
1116 if not driverconclude(repo, ms, wctx, labels=labels):
1103 if not driverconclude(repo, ms, wctx, labels=labels):
1117 # XXX setting unresolved to at least 1 is a hack to make sure we
1104 # XXX setting unresolved to at least 1 is a hack to make sure we
@@ -1120,6 +1107,10 b' def applyupdates(repo, actions, wctx, mc'
1120
1107
1121 ms.commit()
1108 ms.commit()
1122
1109
1110 msupdated, msmerged, msremoved = ms.counts()
1111 updated += msupdated
1112 merged += msmerged
1113 removed += msremoved
1123 progress(_updating, None, total=numupdates, unit=_files)
1114 progress(_updating, None, total=numupdates, unit=_files)
1124
1115
1125 return updated, merged, removed, unresolved
1116 return updated, merged, removed, unresolved
General Comments 0
You need to be logged in to leave comments. Login now