D6183: copies: add config option for writing copy metadata to file and/or changset

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Thu Apr 18 14:09:02 EDT 2019

martinvonz added a comment.

  In https://phab.mercurial-scm.org/D6183#91062, @indygreg wrote:
  > An idea to consider (which may have been proposed already) is to write a *no copy metadata* entry into extras when writing copy metadata to the changelog. If we did things this way, a new client could know definitively that no copy metadata is available and to not fall back to reading from the filelogs. I haven't fully thought this through, but that should provide better compatibility between older and newer clients. Obviously the tradeoff is you could have a mixed repo (some changesets wouldn't have copy metadata in changelog) and you would need to duplicate copy metadata across changelog and filelogs to maintain compatibility. Something to contemplate...
  That's actually what I did initially, and `context._copies()` is still written to work that way (not consult filelogs if an empty p1copies entry was recorded in the changeset), but I haven't added a mode where we write empty entries. I should do that. Thanks for pointing that out.

  rHG Mercurial


To: martinvonz, #hg-reviewers
Cc: indygreg, yuja, pulkit, gracinet, marmoute, mercurial-devel

More information about the Mercurial-devel mailing list