diff -r 7ff92c04f8e5 -r 30c7564f6dfc mercurial/localrepo.py --- a/mercurial/localrepo.py Fri Apr 21 15:14:27 2006 -0500 +++ b/mercurial/localrepo.py Fri Apr 21 15:33:51 2006 -0500 @@ -831,13 +831,18 @@ if base == None: base = {} + if not heads: + heads = remote.heads() + + if self.changelog.tip() == nullid: + if heads != [nullid]: + return [nullid] + return [] + # assume we're closer to the tip than the root # and start by examining the heads self.ui.status(_("searching for changes\n")) - if not heads: - heads = remote.heads() - unknown = [] for h in heads: if h not in m: @@ -998,12 +1003,9 @@ def pull(self, remote, heads=None, force=False): l = self.lock() - # if we have an empty repo, fetch everything - if self.changelog.tip() == nullid: + fetch = self.findincoming(remote, force=force) + if fetch == [nullid]: self.ui.status(_("requesting all changes\n")) - fetch = [nullid] - else: - fetch = self.findincoming(remote, force=force) if not fetch: self.ui.status(_("no changes found\n"))