Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.6, 0.7, and 0.7.1

hg-crew-tip remove uses of cmdutil.matchpats()

Changeset b3cdc88edeae

Parent c5cf2cb91390

by Peter Arrenbrecht

Changes to 3 files · Browse files at b3cdc88edeae Showing diff from parent c5cf2cb91390 Diff from another changeset...

Change 1 of 1 Show Entire File hggtk/​diff.py Stacked
 
111
112
113
114
115
 
 
 
116
117
118
 
111
112
113
 
 
114
115
116
117
118
119
@@ -111,8 +111,9 @@
  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", "" ])
Change 1 of 2 Show Entire File hggtk/​status.py Stacked
 
315
316
317
318
319
 
 
320
321
322
323
324
325
 
 
 
 
326
327
328
 
460
461
462
463
464
 
 
465
466
467
 
315
316
317
 
 
318
319
320
321
 
 
 
 
322
323
324
325
326
327
328
 
460
461
462
 
 
463
464
465
466
467
@@ -315,14 +315,14 @@
    # 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), @@ -460,8 +460,8 @@
  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()
 
173
174
175
176
177
178
 
179
180
181
 
 
182
183
184
 
173
174
175
 
176
 
177
178
 
 
179
180
181
182
183
@@ -173,12 +173,11 @@
    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):