Cloning to a downgraded repository - examples don't seem to work

Anton Shestakov engored at gmail.com
Sat Jan 6 16:58:09 UTC 2024


06.01.2024 07:16, Chris Green пишет:
> On Fri, Jan 05, 2024 at 05:06:05PM -0300, Anton Shestakov wrote:
>> 03.01.2024 08:50, Chris Green пишет:
>>> I want to clone this repository so that I can use it with some older
>>> versions of mercurial that don't have share-safe, so I did:-
>>>
>>>       hg --config format.share-safe=0 clone --pull .cfg .newcfg
>>
>> The config option you're looking for is `format.use-share-safe`.
>>
> Oh, OK, thank you.  How would I deduce that from the help at
> https://wiki.mercurial-scm.org/MissingRequirement ?
> 
> It lists the requirements and there's "dotencode" from the sample
> given and there's "share-safe".  How would I deduce that I have to put
> "use-" on the front of "share-safe"?  Unless, of course, the example
> is wrong and it should have "format.use-dotencode".

The problem is that the things that go into `.hg/requires` and things 
that go into `format` config section aren't exactly the same. They are 
related obviously, and sometimes they have the same name (like 
dotencode), but sometimes they don't (like share-safe and 
use-share-safe). The table in "Repository format" only lists the 
requirements and describes what they're about. Then the "Downgrade..." 
section links to the list of format config options. Another way to see 
this list is to use `hg help config.format` command.

> Yes, but it was much smaller when I **didn't** use the --pull.
> 
> When I used --pull the clone was just about the same size as the
> original, without the --pull it was about a quarter of the size (6Mb
> instead of 24Mb if I remember right).

Interesting. I can't say I know the reason for this without looking at 
the resulting clones. But it could be something obvious like using 
hardlinks for cloning and counting file size only for the first clone...


More information about the Mercurial mailing list