##// 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 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 948 ms = mergestate.clean(repo, wctx.p1().node(), mctx.node())
949 949 moves = []
950 950 for m, l in actions.items():
@@ -1084,15 +1084,7 b' def applyupdates(repo, actions, wctx, mc'
1084 1084 continue
1085 1085 audit(f)
1086 1086 complete, r = ms.preresolve(f, wctx, labels=labels)
1087 if 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:
1087 if not complete:
1096 1088 numupdates += 1
1097 1089 tocomplete.append((f, args, msg))
1098 1090
@@ -1101,17 +1093,12 b' def applyupdates(repo, actions, wctx, mc'
1101 1093 repo.ui.debug(" %s: %s -> m (merge)\n" % (f, msg))
1102 1094 z += 1
1103 1095 progress(_updating, z, item=f, total=numupdates, unit=_files)
1104 r = 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
1096 ms.resolve(f, wctx, labels=labels)
1112 1097
1113 1098 ms.commit()
1114 1099
1100 unresolved = ms.unresolvedcount()
1101
1115 1102 if usemergedriver and not unresolved and ms.mdstate() != 's':
1116 1103 if not driverconclude(repo, ms, wctx, labels=labels):
1117 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 1108 ms.commit()
1122 1109
1110 msupdated, msmerged, msremoved = ms.counts()
1111 updated += msupdated
1112 merged += msmerged
1113 removed += msremoved
1123 1114 progress(_updating, None, total=numupdates, unit=_files)
1124 1115
1125 1116 return updated, merged, removed, unresolved
General Comments 0
You need to be logged in to leave comments. Login now