[PATCH 1 of 8] commands: add ui.statuscopies config knob
Mathias De Maré
mathias.demare at gmail.com
Sat Mar 28 10:51:01 UTC 2015
# HG changeset patch
# User Mathias De Maré <mathias.demare at gmail.com>
# Date 1427228757 -3600
# Tue Mar 24 21:25:57 2015 +0100
# Node ID 60bbe7ef868927b8a8240bbcc981c66bc1480210
# Parent efa094701a05d58d505c3b0c3b3c73dba4e51e97
commands: add ui.statuscopies config knob
statuscopies enables viewing of copies and moves in 'hg status' by default.
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -5792,7 +5792,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)
diff --git a/mercurial/help/config.txt b/mercurial/help/config.txt
--- a/mercurial/help/config.txt
+++ b/mercurial/help/config.txt
@@ -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``.
diff --git a/tests/test-status.t b/tests/test-status.t
--- a/tests/test-status.t
+++ b/tests/test-status.t
@@ -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.
More information about the Mercurial-devel
mailing list