D6613: commit: improve the files field of changelog for merges (RFC)
mharbison72 (Matt Harbison)
phabricator at mercurial-scm.org
Wed Jul 10 00:09:51 EDT 2019
mharbison72 added a comment.
In D6613#96749 <https://phab.mercurial-scm.org/D6613#96749>, @valentin.gatienbaron wrote:
> In D6613#96743 <https://phab.mercurial-scm.org/D6613#96743>, @mharbison72 wrote:
>> If this goes forward, can this be gated by a config option (even if it is on by default)? IIUC, this will change the hash for merges, and then cascade. That seems problematic for convert operations.
>> Most converts will do things that change hashes anyway, but the default options don't change anything. This is a convenient behavior for easily migrating to/from LFS, for example. (In theory, anyway. In practice, I've seen repos where a convert alters the changelog.) If there is a config option, convert should probably disable it by default to maintain the current behavior. I can see a use case for enabling it though, to clean up the repo.
> Given the implementation, it's easy to add a knob to disable the change. But that doesn't seem enough: If you have a repository where commits have been created with a mix of hg before and after this change, there is no single value of the knob that would make convert be the identity.
It's not great, but at least if you know that about the repository, you can convert with it off up to the point where it switches over. Then run convert again with it on, and it will continue where it left off. Not user friendly at all, but at least there's a mechanism without having to use a hacked up copy of hg. Of course if there's a better way (maybe convert can recognize the source commit used the old way, and explicitly pass a parameter to `localrepo.commitctx()` to bypass this code), that would be nice.
CHANGES SINCE LAST ACTION
To: valentin.gatienbaron, #hg-reviewers, mharbison72
Cc: mharbison72, martinvonz, mjpieters, mercurial-devel
More information about the Mercurial-devel