--- a/mercurial/commands.py Thu Sep 22 01:50:53 2022 +0200
+++ b/mercurial/commands.py Thu Sep 22 16:50:30 2022 -0700
@@ -6980,11 +6980,13 @@
)
copy = {}
- if (
- opts.get(b'all')
- or opts.get(b'copies')
- or ui.configbool(b'ui', b'statuscopies')
- ) and not opts.get(b'no_status'):
+ show_copies = ui.configbool(b'ui', b'statuscopies')
+ if opts.get(b'copies') is not None:
+ show_copies = opts.get(b'copies')
+ show_copies = (show_copies or opts.get(b'all')) and not opts.get(
+ b'no_status'
+ )
+ if show_copies:
copy = copies.pathcopies(ctx1, ctx2, m)
morestatus = None
--- a/tests/test-status.t Thu Sep 22 01:50:53 2022 +0200
+++ b/tests/test-status.t Thu Sep 22 16:50:30 2022 -0700
@@ -637,9 +637,16 @@
M a
b
R b
+ $ hg st --config ui.statuscopies=true --no-copies
+ M a
+ R b
$ hg st --config ui.statuscopies=false
M a
R b
+ $ hg st --config ui.statuscopies=false --copies
+ M a
+ b
+ R b
$ hg st --config ui.tweakdefaults=yes
M a
b