Show More
@@ -5416,12 +5416,11 b' def status(ui, repo, *pats, **opts):' | |||||
5416 | repo = scmutil.unhidehashlikerevs(repo, revs, 'nowarn') |
|
5416 | repo = scmutil.unhidehashlikerevs(repo, revs, 'nowarn') | |
5417 | ctx1, ctx2 = scmutil.revpair(repo, revs) |
|
5417 | ctx1, ctx2 = scmutil.revpair(repo, revs) | |
5418 |
|
5418 | |||
5419 | relative = None |
|
5419 | forcerelativevalue = None | |
5420 | if pats: |
|
5420 | if ui.hasconfig('commands', 'status.relative'): | |
5421 | relative = True |
|
5421 | forcerelativevalue = ui.configbool('commands', 'status.relative') | |
5422 | elif ui.hasconfig('commands', 'status.relative'): |
|
5422 | uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=bool(pats), | |
5423 | relative = ui.configbool('commands', 'status.relative') |
|
5423 | forcerelativevalue=forcerelativevalue) | |
5424 | uipathfn = scmutil.getuipathfn(repo, forcerelativevalue=relative) |
|
|||
5425 |
|
5424 | |||
5426 | if opts.get('print0'): |
|
5425 | if opts.get('print0'): | |
5427 | end = '\0' |
|
5426 | end = '\0' |
@@ -132,11 +132,7 b' tweaking defaults works' | |||||
132 |
|
132 | |||
133 | relative paths can be requested |
|
133 | relative paths can be requested | |
134 |
|
134 | |||
135 | $ cat >> $HGRCPATH <<EOF |
|
135 | $ hg status --cwd a --config ui.relative-paths=yes | |
136 | > [ui] |
|
|||
137 | > relative-paths = True |
|
|||
138 | > EOF |
|
|||
139 | $ hg status --cwd a |
|
|||
140 | ? 1/in_a_1 |
|
136 | ? 1/in_a_1 | |
141 | ? in_a |
|
137 | ? in_a | |
142 | ? ../b/1/in_b_1 |
|
138 | ? ../b/1/in_b_1 | |
@@ -144,6 +140,13 b' relative paths can be requested' | |||||
144 | ? ../b/in_b |
|
140 | ? ../b/in_b | |
145 | ? ../in_root |
|
141 | ? ../in_root | |
146 |
|
142 | |||
|
143 | $ hg status --cwd a . --config ui.relative-paths=legacy | |||
|
144 | ? 1/in_a_1 | |||
|
145 | ? in_a | |||
|
146 | $ hg status --cwd a . --config ui.relative-paths=no | |||
|
147 | ? a/1/in_a_1 | |||
|
148 | ? a/in_a | |||
|
149 | ||||
147 | commands.status.relative overrides ui.relative-paths |
|
150 | commands.status.relative overrides ui.relative-paths | |
148 |
|
151 | |||
149 | $ cat >> $HGRCPATH <<EOF |
|
152 | $ cat >> $HGRCPATH <<EOF |
General Comments 0
You need to be logged in to leave comments.
Login now