Mercurial > hg-stable
changeset 34959:527655a049ee stable
morestatus: don't crash with different drive letters for repo.root and CWD
Previously, if there were unresolved files and the CWD drive was different from
the repo drive, `hg status -v` would page the normal status, followed by the
exception header. A stacktrace was waiting when the pager exited. The
underlying cause was the same as f445b10dc7fb.
Unfortunately, I don't see any reasonable way to write a test this [1].
[1] https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-November/107401.html
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sat, 04 Nov 2017 23:39:54 -0400 |
parents | 705d0f2bb677 |
children | 0f5521e56b77 |
files | mercurial/cmdutil.py |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Fri Nov 03 22:22:50 2017 -0400 +++ b/mercurial/cmdutil.py Sat Nov 04 23:39:54 2017 -0400 @@ -570,9 +570,8 @@ unresolvedlist = [f for f in mergestate.unresolved() if m(f)] if unresolvedlist: mergeliststr = '\n'.join( - [' %s' % os.path.relpath( - os.path.join(repo.root, path), - pycompat.getcwd()) for path in unresolvedlist]) + [' %s' % util.pathto(repo.root, pycompat.getcwd(), path) + for path in unresolvedlist]) msg = _('''Unresolved merge conflicts: %s