@@ -1038,6 +1038,8 @@ def applyupdates(repo, actions, wctx, mc
numupdates = sum(len(l) for m, l in actions.items() if m != 'k')
+ wctx.substate # XXX to reproduce issue4988 on Unix
+
if [a for a in actions['r'] if a[0] == '.hgsubstate']:
subrepo.submerge(repo, wctx, mctx, wctx, overwrite)
@@ -1137,19 +1139,27 @@ def applyupdates(repo, actions, wctx, mc
# premerge
tocomplete = []
for f, args, msg in mergeactions:
+ if f == '.hgsubstate':
+ continue
repo.ui.debug(" %s: %s -> m (premerge)\n" % (f, msg))
z += 1
progress(_updating, z, item=f, total=numupdates, unit=_files)
- if f == '.hgsubstate': # subrepo states need updating
- subrepo.submerge(repo, wctx, mctx, wctx.ancestor(mctx),
- overwrite)
- continue
audit(f)
complete, r = ms.preresolve(f, wctx, labels=labels)
if not complete:
numupdates += 1
tocomplete.append((f, args, msg))
+ # premerge for .hgsubstate: 'cd' and 'dc' actions are prompted before;
+ # do submerge only for 'm'
+ for f, args, msg in actions['m']:
+ if f != '.hgsubstate':
+ continue
+ repo.ui.debug(" %s: %s -> m (premerge)\n" % (f, msg))
+ z += 1
+ progress(_updating, z, item=f, total=numupdates, unit=_files)
+ subrepo.submerge(repo, wctx, mctx, wctx.ancestor(mctx), overwrite)
+
# merge
for f, args, msg in tocomplete:
repo.ui.debug(" %s: %s -> m (merge)\n" % (f, msg))