--- a/hgext/rebase.py Mon Dec 11 15:43:56 2017 +0800
+++ b/hgext/rebase.py Tue Dec 12 22:05:21 2017 -0800
@@ -1102,13 +1102,14 @@
if wctx.isinmemory():
wctx.setbase(repo[p1])
else:
- # This is necessary to invalidate workingctx's caches.
- wctx = repo[None]
if repo['.'].rev() != p1:
repo.ui.debug(" update to %d:%s\n" % (p1, repo[p1]))
mergemod.update(repo, p1, False, True)
else:
repo.ui.debug(" already in destination\n")
+ # This is, alas, necessary to invalidate workingctx's manifest cache,
+ # as well as other data we litter on it in other places.
+ wctx = repo[None]
repo.dirstate.write(repo.currenttransaction())
repo.ui.debug(" merge against %d:%s\n" % (rev, repo[rev]))
if base is not None: