Comments
Patch
@@ -132,18 +132,21 @@
relative paths can be requested
- $ cat >> $HGRCPATH <<EOF
- > [ui]
- > relative-paths = True
- > EOF
- $ hg status --cwd a
+ $ hg status --cwd a --config ui.relative-paths=yes
? 1/in_a_1
? in_a
? ../b/1/in_b_1
? ../b/2/in_b_2
? ../b/in_b
? ../in_root
+ $ hg status --cwd a . --config ui.relative-paths=legacy
+ ? 1/in_a_1
+ ? in_a
+ $ hg status --cwd a . --config ui.relative-paths=no
+ ? a/1/in_a_1
+ ? a/in_a
+
commands.status.relative overrides ui.relative-paths
$ cat >> $HGRCPATH <<EOF
@@ -5416,12 +5416,11 @@
repo = scmutil.unhidehashlikerevs(repo, revs, 'nowarn')
ctx1, ctx2 = scmutil.revpair(repo, revs)
- relative = None
- if pats:
- relative = True
- elif ui.hasconfig('commands', 'status.relative'):
- relative = ui.configbool('commands', 'status.relative')
- uipathfn = scmutil.getuipathfn(repo, forcerelativevalue=relative)
+ forcerelativevalue = None
+ if ui.hasconfig('commands', 'status.relative'):
+ forcerelativevalue = ui.configbool('commands', 'status.relative')
+ uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=bool(pats),
+ forcerelativevalue=forcerelativevalue)
if opts.get('print0'):
end = '\0'