Gili
Gili

Reputation: 90101

Why is "hg push" so much bigger than .hg?

My project's .hg directory is 40MB. If I hg push --verbose --debug to an empty remote repository I see it sending hundreds of MBs. Where is the extra overhead coming from?

UPDATE: hg bundle -a generates a 35MB file. Here is a stripped-down version of the output I'm seeing:

pushing to https://jace.googlecode.com/hg/
using https://jace.googlecode.com/hg/
sending between command
using auth.default.* for authentication
jace.googlecode.com certificate successfully verified
sending capabilities command
using auth.default.* for authentication
capabilities: branchmap lookup unbundle=HG10UN,HG10UGZ,HG10BZ changegroupsubset
sending heads command
using auth.default.* for authentication
searching for changes
common changesets up to 71818a195bf5
sending branchmap command
[...]
bundling: <filenames>
sending unbundle command
sending xxx bytes
[...]
sending: xxx/xxx kb

Upvotes: 7

Views: 662

Answers (2)

tonfa
tonfa

Reputation: 24491

This is a known python bug. Because of the way the python http library work, it first sends the data, the server replies that it needs an auth, and it resends the data.

With a recent mercurial (starting at 1.9) you can use an alternative http library. Just add the following in hgrc:

[ui]
usehttp2 = true

Upvotes: 7

Johannes Rudolph
Johannes Rudolph

Reputation: 35741

It could be that the repository you're pushing to doesn't support compressed transfer. What protocol are you using? If it's http, I recommend you watch the first requests to the remote repository (one of them is about determining the capabilities the remote repo offers).

If you're using a file URL for pushing, there's probably not much you can do about it.

Upvotes: 1

Related Questions