Mercurial > hg-stable
diff mercurial/localrepo.py @ 10863:60b42f318a6d stable
clone: no race possible, we can use changegroup() and have smaller urls
Related to issue2126
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Tue, 06 Apr 2010 00:45:53 +0200 |
parents | 1e819576e926 |
children | 8bc4ad7e34c8 a9702c47a19f |
line wrap: on
line diff
--- a/mercurial/localrepo.py Mon Apr 05 20:10:46 2010 +0200 +++ b/mercurial/localrepo.py Tue Apr 06 00:45:53 2010 +0200 @@ -1454,14 +1454,14 @@ try: common, fetch, rheads = self.findcommonincoming(remote, heads=heads, force=force) - if fetch == [nullid]: - self.ui.status(_("requesting all changes\n")) - if not fetch: self.ui.status(_("no changes found\n")) return 0 - if heads is None and remote.capable('changegroupsubset'): + if fetch == [nullid]: + self.ui.status(_("requesting all changes\n")) + elif heads is None and remote.capable('changegroupsubset'): + # issue1320, avoid a race if remote changed after discovery heads = rheads if heads is None: