Page MenuHomePhabricator

scmutil: introduce a new backuppath() to replace origpath()

Authored by martinvonz on Feb 5 2019, 12:52 PM.



Unlike most functions in our codebase, origpath() takes a path that is
relative to cwd. This commit introduces a replacement for
origpath(). The new function takes a path that is relative to the repo
root. There is a lot of duplication between the two, but I intend to
remove origpath() within the next few commits, so it won't be a
maintenance burden.

origpath() is also a little weird in that it returns either a a
cwd-relative path or an absolute path. It needs to be able to return a
path outside the repo, so it makes sense that it can return an
absolute path. However, it would be simpler to always return an
absolute path. The new function does that.

Diff Detail

rHG Mercurial
Lint Skipped
Unit Tests Skipped

Event Timeline

martinvonz created this revision.Feb 5 2019, 12:52 PM
martinvonz edited the summary of this revision. (Show Details)Feb 6 2019, 6:58 PM
martinvonz updated this revision to Diff 13856.
This revision was automatically updated to reflect the committed changes.