为什么“hg Push”是“hg Push”?比.hg大这么多?
我的项目的 .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
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是一个已知的 Python 错误。由于 python http 库的工作方式,它首先发送数据,服务器回复它需要身份验证,然后重新发送数据。
使用最近的 Mercurial(从 1.9 开始),您可以使用替代的 http 库。只需在 hgrc 中添加以下内容:
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:
您推送到的存储库可能不支持压缩传输。您使用什么协议?如果是 http,我建议您观察对远程存储库的第一个请求(其中一个是关于确定远程存储库提供的功能)。
如果您使用文件 URL 进行推送,则可能无能为力。
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.