Mercurial > public > mercurial-scm > hg-stable
diff mercurial/localrepo.py @ 1461:02099220ad49
Implementing clone -r, which clones all changesets needed to reach a
particular revision.
author | Eric Hopper <hopper@omnifarious.org> |
---|---|
date | Fri, 07 Oct 2005 19:51:09 -0700 |
parents | 40d08cf1c544 |
children | 12a8d772fa32 |
line wrap: on
line diff
--- a/mercurial/localrepo.py Fri Oct 07 19:49:25 2005 -0700 +++ b/mercurial/localrepo.py Fri Oct 07 19:51:09 2005 -0700 @@ -850,7 +850,7 @@ # this is the set of all roots we have to push return subset - def pull(self, remote): + def pull(self, remote, heads = None): lock = self.lock() # if we have an empty repo, fetch everything @@ -864,7 +864,10 @@ self.ui.status("no changes found\n") return 1 - cg = remote.changegroup(fetch) + if heads is None: + cg = remote.changegroup(fetch) + else: + cg = remote.changegroupsubset(fetch, heads) return self.addchangegroup(cg) def push(self, remote, force=False):