[PATCH 2 of 6] baseset: update documentation

Pierre-Yves David pierre-yves.david at ens-lyon.org
Fri Oct 17 12:50:12 CDT 2014

# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1413524520 25200
#      Thu Oct 16 22:42:00 2014 -0700
# Node ID 33003da1d4ac6ae14cacc295b00ba0583ece96e8
# Parent  bb7965f00332db6792635e6c860bce4fad7c52b2
baseset: update documentation

The main documentation for date from its very first implementantion. Baseset is
no longer the template for all other smartsets. We update the documention with
more relevant information.

diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -2293,14 +2293,17 @@ class abstractsmartset(object):
         if cache and util.safehasattr(condition, 'func_code'):
             condition = util.cachefunc(condition)
         return filteredset(self, condition)
 class baseset(abstractsmartset):
-    """Basic data structure that represents a revset and contains the basic
-    operation that it should be able to perform.
-    Every method in this class should be implemented by any smartset class.
+    """A smartset with explicit elements
+    A `baseset` object is provided all its content at creation time. All
+    sortings and reordering can then happen lazily and membership testing is
+    fast because it is backed up by a native python set. The iteration order is
+    controled by the order of data initially provided. To enforce a different
+    order, use the `.sort()` or `.sort(reverse=True)` methods.
     def __init__(self, data=()):
         if not isinstance(data, list):
             data = list(data)
         self._list = data

More information about the Mercurial-devel mailing list