This is an archive of the discontinued Mercurial Phabricator instance.

patch: replace "prefix" and "relroot" arguments by "pathfn" (API)

Authored by martinvonz on Feb 8 2019, 3:30 AM.



The two arguments serve a very similar purpose: "relroot" is stripped
from the front of the path, and then "prefix" (a subrepo path) is
added (also to the front). Passing in a function that does that is
more generic and will make it easier to respect ui.relative-paths in
later patches (don't worry, I'm not going to respect that option for
regular patches, only for --stat). I'm deliberately not calling it
"uipathfn", because it's generally for producing valid diffs
(including when prefix is non-empty), so things like using backslash
on Windows is not an option.

Diff Detail

rHG Mercurial
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

martinvonz created this revision.Feb 8 2019, 3:30 AM
martinvonz updated this revision to Diff 13927.Feb 8 2019, 3:18 PM
martinvonz updated this revision to Diff 13967.Feb 9 2019, 5:20 PM
This revision was automatically updated to reflect the committed changes.