Mercurial > hg-stable
changeset 24663:7d01371e6358
commands: add ui.statuscopies config knob
statuscopies enables viewing of copies and moves in 'hg status' by default.
author | Mathias De Maré <mathias.demare@gmail.com> |
---|---|
date | Tue, 24 Mar 2015 21:25:57 +0100 |
parents | b5cd8c2f6e65 |
children | ea4a7c8909ae |
files | mercurial/commands.py mercurial/help/config.txt mercurial/ui.py tests/test-status.t |
diffstat | 4 files changed, 15 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Sat Apr 04 22:30:59 2015 +0900 +++ b/mercurial/commands.py Tue Mar 24 21:25:57 2015 +0100 @@ -5845,7 +5845,8 @@ opts.get('subrepos')) changestates = zip(states, 'MAR!?IC', stat) - if (opts.get('all') or opts.get('copies')) and not opts.get('no_status'): + if (opts.get('all') or opts.get('copies') + or ui.configbool('ui', 'statuscopies')) and not opts.get('no_status'): copy = copies.pathcopies(repo[node1], repo[node2]) fm = ui.formatter('status', opts)
--- a/mercurial/help/config.txt Sat Apr 04 22:30:59 2015 +0900 +++ b/mercurial/help/config.txt Tue Mar 24 21:25:57 2015 +0100 @@ -1432,6 +1432,9 @@ backslash character (``\``)). Default is False. +``statuscopies`` + Display copies in the status command. + ``ssh`` command to use for SSH connections. Default is ``ssh``.
--- a/mercurial/ui.py Sat Apr 04 22:30:59 2015 +0900 +++ b/mercurial/ui.py Tue Mar 24 21:25:57 2015 +0100 @@ -158,7 +158,7 @@ if self.plain(): for k in ('debug', 'fallbackencoding', 'quiet', 'slash', - 'logtemplate', 'style', + 'logtemplate', 'statuscopies', 'style', 'traceback', 'verbose'): if k in cfg['ui']: del cfg['ui'][k]
--- a/tests/test-status.t Sat Apr 04 22:30:59 2015 +0900 +++ b/tests/test-status.t Tue Mar 24 21:25:57 2015 +0100 @@ -438,6 +438,15 @@ b R b +using ui.statuscopies setting + $ hg st --config ui.statuscopies=true + M a + b + R b + $ hg st --config ui.statuscopies=false + M a + R b + Other "bug" highlight, the revision status does not report the copy information. This is buggy behavior.