commands: add ui.statuscopies config knob
statuscopies enables viewing of copies and moves in 'hg status' by default.
--- 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.