Mercurial 为什么是;hg push“;比。hg大这么多?

Mercurial 为什么是;hg push“;比。hg大这么多?,mercurial,Mercurial,我的项目的.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.* fo

我的项目的
.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
推送至https://jace.googlecode.com/hg/
使用https://jace.googlecode.com/hg/
命令间发送
使用auth.default.*进行身份验证
jace.googlecode.com证书已成功验证
发送能力命令
使用auth.default.*进行身份验证
功能:branchmap lookup unbundle=HG10UN、HG10UGZ、HG10BZ changegroupsubset
发送头命令
使用auth.default.*进行身份验证
搜索更改
常见更改设置为71818a195bf5
发送branchmap命令
[...]
捆绑:
发送解除绑定命令
发送xxx字节
[...]
发送:xxx/xxx kb

可能是您要推送到的存储库不支持压缩传输。你使用什么协议?如果是http,我建议您查看对远程存储库的第一个请求(其中之一是关于确定远程repo提供的功能)


如果您正在使用文件URL进行推送,您可能对此无能为力。

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

使用最近的mercurial(从1.9开始),您可以使用另一个http库。只需在hgrc中添加以下内容:

[ui]
usehttp2 = true

我正在推谷歌代码使用https。这句话引起了我的注意:“功能:branchmap lookup unbundle=HG10UN,HG10UGZ,HG10BZ changegroupsubset”,但我不确定这是什么意思。根据,这意味着支持压缩。推送时发生的情况是,实际上推送的是合并到远程回购中的捆绑包。你能试着把你的整个存储库打包,看看它有多大吗?
hg bundle-a
生成一个35MB的文件。见更新的问题,我已经包括了协议谈判的摘录。@Gili:对不起,我在这里不知所措。也许最好将此转发到mercurial邮件列表。“我看到它发送数百MB。”——你是如何测量的?@Joel,输出(贴在上面)显示“发送xxx字节”,其中xxx大约为300MB。非常有趣!你能不能链接到bug报告和讨论,让我们对这个问题有更多的了解?我不知道如何启用这个选项。目前还不清楚它在hgrc中应该放在哪里,也不清楚Mercurial的哪个版本支持它。这是在1.9中发布的,我错了。实际配置是:ui.usehttp2,我会澄清我的帖子。好吧,这就解释了!Mercurial 1.9三天前才推出:)所以我使用了错误的版本和名称。我再试试……谢谢,谢谢,谢谢!你刚刚帮我省去了几个小时的挫折。对于其他人来说,如果您在发送时看到的内容超过100%,您应该认真尝试使用http2。