Commits

Yuya Nishihara committed 03aa4e7

strip: bring back compatibility with revlog.descendants(*revs) of hg 2.2

Follows up 1018ecb003cf.

Comments (0)

Files changed (1)

tortoisehg/hgqt/thgstrip.py

 # This software may be used and distributed according to the terms of the
 # GNU General Public License version 2, incorporated herein by reference.
 
+import inspect
+
 from PyQt4.QtCore import *
 from PyQt4.QtGui import *
 
         rev = self.get_rev()
         if rev is None:
             return False
-        striprevs = list(self.repo.changelog.descendants([rev]))
+        cl = self.repo.changelog
+        if inspect.getargspec(cl.descendants)[1]:  # hg<2.3: *revs
+            striprevs = list(cl.descendants(rev))
+        else:
+            striprevs = list(cl.descendants([rev]))
         striprevs.append(rev)
         striprevs.sort()
         self.cslist.clear()