comparison mercurial/cmdutil.py @ 34981: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 362096cfdb1f
children 602c168c0207 0ba3b928f9a9
comparison
equal deleted inserted replaced
34980:705d0f2bb677 34981:527655a049ee
568 568
569 m = scmutil.match(repo[None]) 569 m = scmutil.match(repo[None])
570 unresolvedlist = [f for f in mergestate.unresolved() if m(f)] 570 unresolvedlist = [f for f in mergestate.unresolved() if m(f)]
571 if unresolvedlist: 571 if unresolvedlist:
572 mergeliststr = '\n'.join( 572 mergeliststr = '\n'.join(
573 [' %s' % os.path.relpath( 573 [' %s' % util.pathto(repo.root, pycompat.getcwd(), path)
574 os.path.join(repo.root, path), 574 for path in unresolvedlist])
575 pycompat.getcwd()) for path in unresolvedlist])
576 msg = _('''Unresolved merge conflicts: 575 msg = _('''Unresolved merge conflicts:
577 576
578 %s 577 %s
579 578
580 To mark files as resolved: hg resolve --mark FILE''') % mergeliststr 579 To mark files as resolved: hg resolve --mark FILE''') % mergeliststr