Show More
@@ -4734,7 +4734,7 b' def status(ui, repo, *pats, **opts):' | |||||
4734 | else: |
|
4734 | else: | |
4735 | node1, node2 = scmutil.revpair(repo, revs) |
|
4735 | node1, node2 = scmutil.revpair(repo, revs) | |
4736 |
|
4736 | |||
4737 | if pats: |
|
4737 | if pats or ui.configbool('commands', 'status.relative'): | |
4738 | cwd = repo.getcwd() |
|
4738 | cwd = repo.getcwd() | |
4739 | else: |
|
4739 | else: | |
4740 | cwd = '' |
|
4740 | cwd = '' |
@@ -417,6 +417,10 b' effect and style see :hg:`help color`.' | |||||
417 | ``commands`` |
|
417 | ``commands`` | |
418 | ---------- |
|
418 | ---------- | |
419 |
|
419 | |||
|
420 | ``status.relative`` | |||
|
421 | Make paths in ``hg status`` output relative to the current directory. | |||
|
422 | (default: False) | |||
|
423 | ||||
420 | ``update.requiredest`` |
|
424 | ``update.requiredest`` | |
421 | Require that the user pass a destination when running ``hg update``. |
|
425 | Require that the user pass a destination when running ``hg update``. | |
422 | For example, ``hg update .::`` will be allowed, but a plain ``hg update`` |
|
426 | For example, ``hg update .::`` will be allowed, but a plain ``hg update`` |
@@ -107,6 +107,27 b' combining patterns with root and pattern' | |||||
107 | ? a/in_a |
|
107 | ? a/in_a | |
108 | ? b/in_b |
|
108 | ? b/in_b | |
109 |
|
109 | |||
|
110 | relative paths can be requested | |||
|
111 | ||||
|
112 | $ cat >> $HGRCPATH <<EOF | |||
|
113 | > [commands] | |||
|
114 | > status.relative = True | |||
|
115 | > EOF | |||
|
116 | $ hg status --cwd a | |||
|
117 | ? 1/in_a_1 | |||
|
118 | ? in_a | |||
|
119 | ? ../b/1/in_b_1 | |||
|
120 | ? ../b/2/in_b_2 | |||
|
121 | ? ../b/in_b | |||
|
122 | ? ../in_root | |||
|
123 | $ HGPLAIN=1 hg status --cwd a | |||
|
124 | ? a/1/in_a_1 | |||
|
125 | ? a/in_a | |||
|
126 | ? b/1/in_b_1 | |||
|
127 | ? b/2/in_b_2 | |||
|
128 | ? b/in_b | |||
|
129 | ? in_root | |||
|
130 | ||||
110 | $ cd .. |
|
131 | $ cd .. | |
111 |
|
132 | |||
112 | $ hg init repo2 |
|
133 | $ hg init repo2 |
General Comments 0
You need to be logged in to leave comments.
Login now