revset: add a default argument for baseset.__init__
authorPierre-Yves David <pierre-yves.david@fb.com>
Fri, 14 Mar 2014 11:41:26 -0700
changeset 20752 6744f4621434
parent 20751 91a3d50f0e3a
child 20753 13c38b1aeebe
revset: add a default argument for baseset.__init__ We are now able to create empty baseset using `baseset()` as we are able to create empty list with `list()`.
mercurial/revset.py
--- a/mercurial/revset.py	Thu Mar 13 11:36:45 2014 -0700
+++ b/mercurial/revset.py	Fri Mar 14 11:41:26 2014 -0700
@@ -2174,7 +2174,7 @@
 
     Every method in this class should be implemented by any smartset class.
     """
-    def __init__(self, data):
+    def __init__(self, data=()):
         super(baseset, self).__init__(data)
         self._set = None