diff hgext3rd/topic/stack.py @ 2838:1c9150e30b28

context: unstable was deprecated Use orphan instead. Match f163edb45c47 mercurial changeset.
author Boris Feld <boris.feld@octobus.net>
date Thu, 10 Aug 2017 20:40:57 +0200
parents bd3824d1b795
children f9c8c754a528
line wrap: on
line diff
--- 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: