mercurial/setdiscovery.py
changeset 23816 34d4b58580d1
parent 23815 31e75a362d44
child 23817 813aaaf2aff3
--- a/mercurial/setdiscovery.py	Tue Jan 06 17:07:44 2015 -0800
+++ b/mercurial/setdiscovery.py	Wed Jan 07 20:44:20 2015 -0800
@@ -95,6 +95,14 @@
     return always, set(), desiredlen
 
 def _takequicksample(dag, nodes, size):
+    """takes a quick sample of size <size>
+
+    It is meant for initial sampling and focuses on querying heads and close
+    ancestors of heads.
+
+    :dag: a dag object
+    :nodes: set of nodes to discover
+    :size: the maximum size of the sample"""
     sample = dag.headsetofconnecteds(nodes)
     if size <= len(sample):
         return _limitsample(sample, size)