diff -r 09f1c17e24dd -r e6ec0737b706 mercurial/commands.py --- a/mercurial/commands.py Thu Jan 31 18:17:02 2019 +0530 +++ b/mercurial/commands.py Tue Jan 29 15:37:14 2019 -0800 @@ -5414,10 +5414,8 @@ repo = scmutil.unhidehashlikerevs(repo, revs, 'nowarn') ctx1, ctx2 = scmutil.revpair(repo, revs) - if pats or ui.configbool('commands', 'status.relative'): - cwd = repo.getcwd() - else: - cwd = '' + relative = pats or ui.configbool('commands', 'status.relative') + uipathfn = scmutil.getuipathfn(repo, relative) if opts.get('print0'): end = '\0' @@ -5468,10 +5466,10 @@ fm.context(ctx=ctx2) fm.data(path=f) fm.condwrite(showchar, 'status', '%s ', char, label=label) - fm.plain(fmt % repo.pathto(f, cwd), label=label) + fm.plain(fmt % uipathfn(f), label=label) if f in copy: fm.data(source=copy[f]) - fm.plain((' %s' + end) % repo.pathto(copy[f], cwd), + fm.plain((' %s' + end) % uipathfn(copy[f]), label='status.copied') if ((ui.verbose or ui.configbool('commands', 'status.verbose'))