Another Japan in the World

Jun Aruga's blog.

Download cpytyon with Mercurial

I wanted to compile python from source code, reading a document[1].

However I was failed to do it last time. [2] hg clone was failed because of the issue. It may be because of my PC’s poor memory environment.

$ hg clone
destination directory: cpython
requesting all changes
adding changesets
adding manifests
adding file changes
transaction abort!
rollback completed
abort: stream ended unexpectedly (got 42439 bytes, expected 1852137568)

But today I found an article[3]. And finally I could download. Let me write the way here. cpython(python) has repositories for Mercurial (primary), Github(mirror). But in the git repository, the tags information is not kept. And that is not convenient to install specified version’s python.

Create empty hg environment.

$ hg init cpython

$ cd cpython

Download information one by one, like a fetch. Seeing hg log | less after each hg pull.

$ hg pull -r 50
$ hg pull -r 500
$ hg pull -r 5000
$ hg pull -r 50000
$ hg pull -r 100000
$ hg pull

Download files.

$ hg update

Add paths information manually

$ vi .hg/hgrc
default =

$ hg paths
default =

And check information finally.

$ hg heads
$ hg branches
$ hg tags

Once this operation, it’s no problem to use hg pull.

$ hg pull
pulling from
searching for changes
no changes found