changeset 7273:52983fa97f49

hg: support rename of obsolete related attributes in Mercurial 4.6 The internals and the UI should perhaps also change at some point.
author Mads Kiilerich <mads@kiilerich.com>
date Fri, 11 May 2018 14:26:48 +0200
parents 61fd14c13e60
children 0188f3e33c54
files kallithea/lib/vcs/backends/hg/changeset.py
diffstat 1 files changed, 12 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/lib/vcs/backends/hg/changeset.py	Fri May 11 14:26:48 2018 +0200
+++ b/kallithea/lib/vcs/backends/hg/changeset.py	Fri May 11 14:26:48 2018 +0200
@@ -54,11 +54,17 @@
 
     @LazyProperty
     def bumped(self):
-        return self._ctx.bumped()
+        try:
+            return self._ctx.phasedivergent()
+        except AttributeError: # renamed in Mercurial 4.6 (9fa874fb34e1)
+            return self._ctx.bumped()
 
     @LazyProperty
     def divergent(self):
-        return self._ctx.divergent()
+        try:
+            return self._ctx.contentdivergent()
+        except AttributeError: # renamed in Mercurial 4.6 (8b2d7684407b)
+            return self._ctx.divergent()
 
     @LazyProperty
     def extinct(self):
@@ -66,7 +72,10 @@
 
     @LazyProperty
     def unstable(self):
-        return self._ctx.unstable()
+        try:
+            return self._ctx.orphan()
+        except AttributeError: # renamed in Mercurial 4.6 (03039ff3082b)
+            return self._ctx.unstable()
 
     @LazyProperty
     def phase(self):