Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 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 | 077683371b7b |
children | 6a6b69d9e539 |
comparison
equal
deleted
inserted
replaced
24818:8d7d0bf62f9f | 24819:22c70c08d4af |
---|---|
5835 if ui.quiet: | 5835 if ui.quiet: |
5836 show = states[:4] | 5836 show = states[:4] |
5837 else: | 5837 else: |
5838 show = states[:5] | 5838 show = states[:5] |
5839 | 5839 |
5840 stat = repo.status(node1, node2, scmutil.match(repo[node2], pats, opts), | 5840 m = scmutil.match(repo[node2], pats, opts) |
5841 stat = repo.status(node1, node2, m, | |
5841 'ignored' in show, 'clean' in show, 'unknown' in show, | 5842 'ignored' in show, 'clean' in show, 'unknown' in show, |
5842 opts.get('subrepos')) | 5843 opts.get('subrepos')) |
5843 changestates = zip(states, 'MAR!?IC', stat) | 5844 changestates = zip(states, 'MAR!?IC', stat) |
5844 | 5845 |
5845 if (opts.get('all') or opts.get('copies') | 5846 if (opts.get('all') or opts.get('copies') |
5846 or ui.configbool('ui', 'statuscopies')) and not opts.get('no_status'): | 5847 or ui.configbool('ui', 'statuscopies')) and not opts.get('no_status'): |
5847 copy = copies.pathcopies(repo[node1], repo[node2]) | 5848 copy = copies.pathcopies(repo[node1], repo[node2], m) |
5848 | 5849 |
5849 fm = ui.formatter('status', opts) | 5850 fm = ui.formatter('status', opts) |
5850 fmt = '%s' + end | 5851 fmt = '%s' + end |
5851 showchar = not opts.get('no_status') | 5852 showchar = not opts.get('no_status') |
5852 | 5853 |