mq: migrate to scmutil.backuppath()
ClosedPublic

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

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
martinvonz created this revision.Tue, Feb 5, 12:52 PM
martinvonz updated this revision to Diff 13860.Wed, Feb 6, 6:59 PM
This revision was automatically updated to reflect the committed changes.
yuja added a subscriber: yuja.Thu, Feb 7, 7:58 AM
  • absorig = scmutil.origpath(self.ui, repo, absf) + absorig = scmutil.backuppath(self.ui, repo, f) self.ui.note(_('saving current version of %s as %s\n') %
  • (f, os.path.relpath(absorig))) + (f, os.path.relpath(absorig, start=repo.root)))

Why printing a repo-relative path instead of cwd-relative one?

In D5855#86020, @yuja wrote:
  • absorig = scmutil.origpath(self.ui, repo, absf) + absorig = scmutil.backuppath(self.ui, repo, f) self.ui.note(_('saving current version of %s as %s\n') %
  • (f, os.path.relpath(absorig))) + (f, os.path.relpath(absorig, start=repo.root)))

Why printing a repo-relative path instead of cwd-relative one?

Oops, not intended. Feel free to fix it. Otherwise I'll do that in about two hours.

In D5855#86020, @yuja wrote:
  • absorig = scmutil.origpath(self.ui, repo, absf) + absorig = scmutil.backuppath(self.ui, repo, f) self.ui.note(_('saving current version of %s as %s\n') %
  • (f, os.path.relpath(absorig))) + (f, os.path.relpath(absorig, start=repo.root)))

Why printing a repo-relative path instead of cwd-relative one?

Oops, not intended. Feel free to fix it. Otherwise I'll do that in about two hours.

Fixed in the hg-committed repo.