--- a/mercurial/treediscovery.py Thu May 05 14:57:21 2011 +0200
+++ b/mercurial/treediscovery.py Thu May 05 12:53:33 2011 +0200
@@ -33,7 +33,7 @@
base.add(nullid)
if heads != [nullid]:
return [nullid], [nullid], list(heads)
- return [nullid], [], []
+ return [nullid], [], heads
# assume we're closer to the tip than the root
# and start by examining the heads
@@ -46,10 +46,10 @@
else:
base.add(h)
+ if not unknown:
+ return list(base), [], list(heads)
+
heads = unknown
- if not unknown:
- return list(base), [], []
-
req = set(unknown)
reqcnt = 0