mercurial/localrepo.py
changeset 37174 bb47dc2f71a0
parent 37172 daef13da66fe
child 37181 0dfb5672f015
--- a/mercurial/localrepo.py	Thu Mar 29 22:22:51 2018 -0700
+++ b/mercurial/localrepo.py	Thu Mar 29 22:51:45 2018 -0700
@@ -782,6 +782,8 @@
     def __getitem__(self, changeid):
         if changeid is None:
             return context.workingctx(self)
+        if isinstance(changeid, context.basectx):
+            return changeid
         if isinstance(changeid, slice):
             # wdirrev isn't contiguous so the slice shouldn't include it
             return [context.changectx(self, i)