Mercurial > hg-stable
changeset 24819:22c70c08d4af stable
status: pass matcher to pathcopies()
Just like a7f8e3584ef3 (diff: pass the diff matcher to the copy logic,
2015-04-16) sped up 'hg diff --git $path', let's speed up 'hg st -C
$path'. On the Firefox repo, this speeds up
hg st --rev tip~40000 --rev tip -C python
from 16s to 1.8s. Those two revisions differ in 100k files, out of
which 1k is in python/.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Sun, 19 Apr 2015 21:43:53 -0700 |
parents | 8d7d0bf62f9f |
children | 6a6b69d9e539 |
files | mercurial/commands.py |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Sat Apr 18 15:27:03 2015 +0900 +++ b/mercurial/commands.py Sun Apr 19 21:43:53 2015 -0700 @@ -5837,14 +5837,15 @@ else: show = states[:5] - stat = repo.status(node1, node2, scmutil.match(repo[node2], pats, opts), + m = scmutil.match(repo[node2], pats, opts) + stat = repo.status(node1, node2, m, 'ignored' in show, 'clean' in show, 'unknown' in show, opts.get('subrepos')) changestates = zip(states, 'MAR!?IC', stat) 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]) + copy = copies.pathcopies(repo[node1], repo[node2], m) fm = ui.formatter('status', opts) fmt = '%s' + end