hgext3rd/topic/stack.py
changeset 2838 1c9150e30b28
parent 2750 bd3824d1b795
child 2839 f9c8c754a528
--- a/hgext3rd/topic/stack.py	Thu Aug 10 20:31:39 2017 +0200
+++ b/hgext3rd/topic/stack.py	Thu Aug 10 20:40:57 2017 +0200
@@ -5,13 +5,20 @@
 from mercurial.i18n import _
 from mercurial import (
     destutil,
+    context,
     error,
     node,
+    util,
 )
 from .evolvebits import builddependencies, _orderrevs, _singlesuccessor
 
 short = node.short
 
+# TODO: compat
+
+if not util.safehasattr(context.basectx, 'orphan'):
+    context.basectx.orphan = context.basectx.unstable
+
 def getstack(repo, branch=None, topic=None):
     # XXX need sorting
     if topic is not None and branch is not None:
@@ -122,7 +129,7 @@
             # "base" is kind of a "ghost" entry
             # skip other label for them (no current, no unstable)
             states = ['base']
-        elif ctx.unstable():
+        elif ctx.orphan():
             # current revision can be unstable also, so in that case show both
             # the states and the symbol '@' (issue5553)
             if iscurrentrevision: