Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 41506:02186c6871ac
status: introduce higher-level ui.relative-paths
The existing commands.status.relative trumps the new config. We need
to keep the existing config around for compatibility. However, I don't
think we need to introduce similar command-specific options for other
commands when they learn to respec ui.relative-paths.
Differential Revision: https://phab.mercurial-scm.org/D5746
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Tue, 29 Jan 2019 15:37:35 -0800 |
parents | e6ec0737b706 |
children | 72a9aacff645 |
comparison
equal
deleted
inserted
replaced
41505:e6ec0737b706 | 41506:02186c6871ac |
---|---|
5412 ctx1 = ctx2.p1() | 5412 ctx1 = ctx2.p1() |
5413 else: | 5413 else: |
5414 repo = scmutil.unhidehashlikerevs(repo, revs, 'nowarn') | 5414 repo = scmutil.unhidehashlikerevs(repo, revs, 'nowarn') |
5415 ctx1, ctx2 = scmutil.revpair(repo, revs) | 5415 ctx1, ctx2 = scmutil.revpair(repo, revs) |
5416 | 5416 |
5417 relative = pats or ui.configbool('commands', 'status.relative') | 5417 relative = None |
5418 if pats: | |
5419 relative = True | |
5420 elif ui.hasconfig('commands', 'status.relative'): | |
5421 relative = ui.configbool('commands', 'status.relative') | |
5418 uipathfn = scmutil.getuipathfn(repo, relative) | 5422 uipathfn = scmutil.getuipathfn(repo, relative) |
5419 | 5423 |
5420 if opts.get('print0'): | 5424 if opts.get('print0'): |
5421 end = '\0' | 5425 end = '\0' |
5422 else: | 5426 else: |