comparison tests/test-status.t @ 31589:7e3b145f8247

status: support commands.status.relative config When the config is set to true, status output becomes relative to the working directory. This has bugged me since I started using hg and it turns it is sillily simple to support it (unless I missed something, of course). We could also add a --relative flag, but I would personally always want that on, and I haven't heard any use for having it sometimes on, so this patch only lets you enable it via config.
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 21 Mar 2017 17:50:44 -0700
parents 568d80b24b3a
children bdcaf612e75a
comparison
equal deleted inserted replaced
31588:37a0ad669051 31589:7e3b145f8247
104 combining patterns with root and patterns without a root works 104 combining patterns with root and patterns without a root works
105 105
106 $ hg st a/in_a re:.*b$ 106 $ hg st a/in_a re:.*b$
107 ? a/in_a 107 ? a/in_a
108 ? b/in_b 108 ? b/in_b
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
109 130
110 $ cd .. 131 $ cd ..
111 132
112 $ hg init repo2 133 $ hg init repo2
113 $ cd repo2 134 $ cd repo2