Re-cloning a mercurial repository without generaldelta

孤者浪人 提交于 2019-12-13 03:34:39

问题


I'm trying to do a hg clone on an Internet facing machine for later use on an offline build machine. Unfortunately mercurial is 3.9.1 on the Internet machine, but 1.4 on the offline machine.

I get the error abort: requirement 'generaldelta' not supported! and also abort: requirement 'dotencode' not supported!

I found this is becuase generaldelta feature was added in 1.9, and dotencode in 1.7. I've used instructions from the MissingRequirement wiki page to downgrade this repo using the following.

hg clone -U --config format.generaldelta=0 --config format.dotencode=0 --pull /tmp/foo /tmp/bar

However the new repo at /tmp/bar still uses generaldelta, although dotencode require has gone. i.e.

cat /tmp/bar/.hg/requires 

fncache
generaldelta  <=== still there
revlogv1
store

store

How can I rewrite the repo with both generaldelta and dotencode disabled?


回答1:


The config option should have been format.usegeneraldelta not format.generaldelta. i.e.

hg clone -U --config format.usegeneraldelta=0 --config format.dotencode=0 --pull /tmp/foo /tmp/bar

Note the config. options are all config.use<feature-name> apart from config.dotencode see Mercurial format options. Beware as there is not any error checking either.



来源:https://stackoverflow.com/questions/47689309/re-cloning-a-mercurial-repository-without-generaldelta

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!