# HG changeset patch # User Anton Shestakov # Date 1580046745 -25200 # Node ID fa20e48b7713863ce4e75ed5beabc5de169e3448 # Parent 5a2e7c6f9174226338be08a0a9ed5e257b70c652 uncommit: use repo.setparents() instead of repo.dirstate.setparents() setparents() was added to localrepository class in 2012, and now we finally have some differences between calling repo.setparents() vs repo.dirstate.setparents(): _quick_access_* things, introduced in hg 5.3. This patch fixes potential quick-access desync problems where repo[b'.'] would be different from repo.dirstate.p1(). diff -r 5a2e7c6f9174 -r fa20e48b7713 hgext3rd/evolve/cmdrewrite.py --- a/hgext3rd/evolve/cmdrewrite.py Sun Jan 26 20:57:20 2020 +0700 +++ b/hgext3rd/evolve/cmdrewrite.py Sun Jan 26 20:52:25 2020 +0700 @@ -582,7 +582,7 @@ hg.updaterepo(repo, newid, True) else: with repo.dirstate.parentchange(): - repo.dirstate.setparents(newid, node.nullid) + repo.setparents(newid, node.nullid) _uncommitdirstate(repo, old, match, interactive) if not repo[newid].files(): ui.warn(_(b"new changeset is empty\n"))