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

My .hg project is 40 MB. If I hg push --verbose --debug to an empty remote repository, I see that it sends hundreds of MB. Where does the extra overhead come from?

UPDATE : hg bundle -a creates a 35 MB file. Here is a stripped-down version of the output that I see:

 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 
+7
source share
2 answers

This is a known python bug. Due to how the python http library works, it sends the data first, the server replies that it needs auth, and it retransmits the data.

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

 [ui] usehttp2 = true 
+7
source

Maybe the repository you click on does not support compressed transfer. What protocol are you using? If this is http, I recommend that you look at the first requests to the remote repository (one of them is devoted to determining the capabilities provided by the remote repo).

If you use the file url to click, you probably cannot do this.

+1
source

All Articles