Clone status extension

Matt Mackall mpm at selenic.com
Tue Apr 1 22:25:39 UTC 2014


On Tue, 2014-04-01 at 12:10 +0300, anatoly techtonik wrote:
> On Mon, Mar 31, 2014 at 8:45 PM, Matt Mackall <mpm at selenic.com> wrote:
> > On Mon, 2014-03-31 at 19:58 +0300, anatoly techtonik wrote:
> >> Even with incremental pulls I still fail to get the contents correctly,
> >> HG reports that there are no changesets to pull after 70536, but
> >> still tries to pull something when I omit the revision.
> >
> > $ hg clone https://bitbucket.org/pypy/pypy
> > destination directory: pypy
> > requesting all changes
> > adding changesets
> > adding
> > manifests
> > adding file
> > changes
> > added 70357 changesets with 223207 changes to 44699 files (+124
> > heads)
> > updating to branch default
> > 5087 files updated, 0 files merged, 0 files removed, 0 files
> > unresolved
> >
> > $ cd pypy/
> > $ hg pull
> > pulling from https://bitbucket.org/pypy/pypy
> > searching for changes
> > no changes found
> >
> >
> > I suspect you have a proxy interfering. Possibly choking on the large
> > URLs and headers we use when we find lots of heads.
> 
> Definitely a flaky connection. What bothers me is that `hg pull -r 70357`
> didn't fetch all commits.

Works as designed. The -r flag doesn't say "give me all revisions
between 0 and N like you never even heard of a DAG", it instead says
"give me all revisions that are ancestors of changeset N, ignore
everything else". And because this repo has 123 other heads, that turns
out to be a lot:

$ cd src/pypy
$ hg log -r 'not ::tip' -q | wc
  21790   21790  413129

For repositories with more than 1 head, you'd need to do:

hg pull -r head1 -r head2...

-- 
Mathematics is the supreme nostalgia of our time.





More information about the Mercurial mailing list