Commits

Peter Arrenbrecht committed b3cdc88

remove uses of cmdutil.matchpats()

Comments (0)

Files changed (3)

         except hg.RepoError:
             return None
 
-        self.files, matchfn, anypats = cmdutil.matchpats(self.repo, self.files)
-        modified, added, removed = self.repo.status(files=self.files)[0:3]
+        matcher = cmdutil.match(self.repo, self.files)
+        modified, added, removed = self.repo.status(match=matcher)[0:3]
+        self.files = matcher.files()
 
         self.model.clear()
         self.model.append(None, [ "Complete Diff", "" ])
         
         # node2 is None (the working dir) when 0 or 1 rev is specificed
         self._node1, self._node2 = cmdutil.revpair(self.repo, self.opts.get('rev'))
-    
-        files, matchfn, anypats = cmdutil.matchpats(self.repo, self.pats, self.opts)
+
+        matcher = cmdutil.match(self.repo, self.pats, self.opts)
         cwd = (self.pats and self.repo.getcwd()) or ''
         modified, added, removed, deleted, unknown, ignored, clean = [
-            n for n in self.repo.status(node1=self._node1, node2=self._node2, files=files,
-                                 match=matchfn,
-                                 list_ignored=self.test_opt('ignored'),
-                                 list_clean=self.test_opt('clean'))]
+            n for n in self.repo.status(node1=self._node1, node2=self._node2,
+                                 match=matcher,
+                                 ignored=self.test_opt('ignored'),
+                                 clean=self.test_opt('clean'))]
 
         changetypes = (('modified', 'M', modified),
                        ('added', 'A', added),
             try:
                 if len(files) != 0:
                     wfiles = [self.repo.wjoin(x) for x in files]
-                    fns, matchfn, anypats = cmdutil.matchpats(self.repo, wfiles, self.opts)
-                    patch.diff(self.repo, self._node1, self._node2, fns, match=matchfn,
+                    matcher = cmdutil.match(self.repo, wfiles, self.opts)
+                    patch.diff(self.repo, self._node1, self._node2, match=matcher,
                                fp=difftext, opts=patch.diffopts(self.ui, self.opts))
 
                 buffer = gtk.TextBuffer()

tortoise/iconoverlay.py

 
         modified, added, removed, deleted = [], [], [], []
         unknown, ignored, clean = [], [], []
-        files = []
         try:
-            files, matchfn, anypats = cmdutil.matchpats(repo, [pdir])
+            matcher = cmdutil.match(repo, [pdir])
             modified, added, removed, deleted, unknown, ignored, clean = \
-                    repo.status(files=files, list_ignored=True, 
-                            list_clean=True, list_unknown=True)
+                    repo.status(match=matcher, ignored=True, 
+                            clean=True, unknown=True)
 
             # add directory status to list
             for grp in (clean,modified,added,removed,deleted,ignored,unknown):
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.