diff mercurial/commands.py @ 41492: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
line wrap: on
line diff
--- a/mercurial/commands.py	Tue Jan 29 15:37:14 2019 -0800
+++ b/mercurial/commands.py	Tue Jan 29 15:37:35 2019 -0800
@@ -5414,7 +5414,11 @@
         repo = scmutil.unhidehashlikerevs(repo, revs, 'nowarn')
         ctx1, ctx2 = scmutil.revpair(repo, revs)
 
-    relative = pats or ui.configbool('commands', 'status.relative')
+    relative = None
+    if pats:
+        relative = True
+    elif ui.hasconfig('commands', 'status.relative'):
+        relative = ui.configbool('commands', 'status.relative')
     uipathfn = scmutil.getuipathfn(repo, relative)
 
     if opts.get('print0'):