mercurial/revset.py
changeset 22722 e8832cf1abf6
parent 22721 adc43967d401
child 22723 d4706faa2061
--- a/mercurial/revset.py	Thu Oct 02 18:52:09 2014 -0500
+++ b/mercurial/revset.py	Thu Oct 02 18:59:41 2014 -0500
@@ -2248,11 +2248,19 @@
 
     def min(self):
         """return the minimum element in the set"""
-        raise NotImplementedError()
+        if self.fastasc is not None:
+            for r in self.fastasc():
+                return r
+            raise ValueError('arg is an empty sequence')
+        return min(self)
 
     def max(self):
         """return the maximum element in the set"""
-        raise NotImplementedError()
+        if self.fastdesc is not None:
+            for r in self.fastdesc():
+                return r
+            raise ValueError('arg is an empty sequence')
+        return max(self)
 
     def reverse(self):
         """reverse the expected iteration order"""