我项目的.hg目录为40MB。如果我hg push --verbose --debug到一个空的远程存储库,我会看到它发送了数百MB。额外的开销从哪里来?

更新:hg bundle -a生成一个35MB的文件。这是我看到的输出的简化版本:

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

最佳答案

这是一个已知的python错误。由于python http库的工作方式,它首先发送数据,服务器回复它需要身份验证,然后重新发送数据。

对于最近的版本(从1.9开始),您可以使用备用的http库。只需在hgrc中添加以下内容:

[ui]
usehttp2 = true

08-27 22:46