diff --git a/hgext/keyword.py b/hgext/keyword.py
index eb763217152ab2b472416bcc57722451c317f282_aGdleHQva2V5d29yZC5weQ==..c4ce50a3d6341cb7370f1a2e3137cdef21b6bc29_aGdleHQva2V5d29yZC5weQ== 100644
--- a/hgext/keyword.py
+++ b/hgext/keyword.py
@@ -619,7 +619,7 @@
                 ret = super(kwrepo, self).rollback(dryrun, force)
                 if not dryrun:
                     ctx = self['.']
-                    modified, added = _preselect(self[None].status(), changed)
+                    modified, added = _preselect(ctx.status(), changed)
                     kwt.overwrite(ctx, modified, True, True)
                     kwt.overwrite(ctx, added, True, False)
                 return ret
@@ -702,7 +702,7 @@
             # therefore compare nodes before and after
             kwt.postcommit = True
             ctx = repo['.']
-            wstatus = repo[None].status()
+            wstatus = ctx.status()
             ret = orig(ui, repo, commitfunc, *pats, **opts)
             recctx = repo['.']
             if ctx != recctx: