Submitter | Mathias De Maré |
---|---|
Date | April 7, 2015, 7 p.m. |
Message ID | <953040f303b16578919e.1428433247@mathias-Latitude-E6540> |
Download | mbox | patch |
Permalink | /patch/8543/ |
State | Accepted |
Commit | 7d01371e6358d391f3c2a76ac07dc165a9c3f3b4 |
Headers | show |
Comments
On Tue, 2015-04-07 at 21:00 +0200, mathias.demare@gmail.com wrote: > # HG changeset patch > # User Mathias De Maré <mathias.demare@gmail.com> > # Date 1427228757 -3600 > # Tue Mar 24 21:25:57 2015 +0100 > # Node ID 953040f303b16578919e465aa2a46533990a46ae > # Parent b2fb1403994e033584aed8a487ab162a9d75fa80 > commands: add ui.statuscopies config knob This one is queued for default with a few tweaks, thanks.
Patch
diff -r b2fb1403994e -r 953040f303b1 mercurial/commands.py --- a/mercurial/commands.py Mon Apr 06 17:16:55 2015 -0500 +++ b/mercurial/commands.py Tue Mar 24 21:25:57 2015 +0100 @@ -5794,7 +5794,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 -r b2fb1403994e -r 953040f303b1 mercurial/help/config.txt --- a/mercurial/help/config.txt Mon Apr 06 17:16:55 2015 -0500 +++ 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``. diff -r b2fb1403994e -r 953040f303b1 mercurial/ui.py --- a/mercurial/ui.py Mon Apr 06 17:16:55 2015 -0500 +++ 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] diff -r b2fb1403994e -r 953040f303b1 tests/test-status.t --- a/tests/test-status.t Mon Apr 06 17:16:55 2015 -0500 +++ 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.