mercurial/discovery.py
changeset 29805 f09d0004481c
parent 29804 7b9157aa752f
child 29806 82e8c86cdd6d
--- a/mercurial/discovery.py	Tue Aug 09 15:26:53 2016 +0200
+++ b/mercurial/discovery.py	Tue Aug 09 15:55:44 2016 +0200
@@ -76,10 +76,15 @@
     The sets are computed on demand from the heads, unless provided upfront
     by discovery.'''
 
-    def __init__(self, repo, commonheads, missingheads):
+    def __init__(self, repo, commonheads=None, missingheads=None):
+        cl = repo.changelog
+        if not missingheads:
+            missingheads = cl.heads()
+        if not commonheads:
+            commonheads = [nullid]
         self.commonheads = commonheads
         self.missingheads = missingheads
-        self._revlog = repo.changelog
+        self._revlog = cl
         self._common = None
         self._missing = None
         self.excluded = []