changeset 16365:5d61e007d957

mq: use exact matching in the second dirstate walking for efficiency of 'qnew' 'hg qnew' with pattern/-I/-X creates matching object with them, and uses it twice for 'dirstate.walk()': via 'repo.status()' and 'repo.commit()'. this may cause full manifest scan in the second 'dirstate.walk()', even though mq already knows complete target filenames at the first 'dirstate.walk()'. this patch creates exact matching object also in this case, and use it at 'repo.commit()' invocation to avoid full manifest scan in the second 'dirstate.walk()'. even though 'inclsubs' is added to 'pats' for original matching object, it is also passed to exact matching object, because subrepositories are deleted from result of 'dirstate.walk()' at the end of it.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Thu, 05 Apr 2012 23:52:06 +0900
parents 2cdd7e63211b
children 913d1fa61398
files hgext/mq.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/mq.py	Thu Apr 05 13:00:35 2012 -0700
+++ b/hgext/mq.py	Thu Apr 05 23:52:06 2012 +0900
@@ -962,7 +962,7 @@
             m, a, r, d = repo.status(match=match)[:4]
         else:
             m, a, r, d = self.checklocalchanges(repo, force=True)
-            match = scmutil.matchfiles(repo, m + a + r + inclsubs)
+        match = scmutil.matchfiles(repo, m + a + r + inclsubs)
         if len(repo[None].parents()) > 1:
             raise util.Abort(_('cannot manage merge changesets'))
         commitfiles = m + a + r