Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9, 1.9.1, and 1.9.2

status: initially check files which match pattern

Changeset 5dce01b0bd13

Parent 11eef776263b

by Steve Borho

Changes to one file · Browse files at 5dce01b0bd13 Showing diff from parent 11eef776263b Diff from another changeset...

 
23
24
25
 
26
27
28
 
57
58
59
 
60
61
62
 
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
 
 
 
 
 
 
 
 
 
 
218
219
 
220
221
222
 
225
226
227
228
 
229
230
231
 
23
24
25
26
27
28
29
 
58
59
60
61
62
63
64
 
204
205
206
 
 
 
 
 
 
 
207
 
 
 
 
 
208
209
210
211
212
213
214
215
216
217
218
 
219
220
221
222
 
225
226
227
 
228
229
230
231
@@ -23,6 +23,7 @@
 # working copy browser.    # Technical Debt +# emit error strings to parent status bar  # We need a real icon set for file status types  # Add some initial drag distance before starting QDrag  # (it interferes with selection the way it is now) @@ -57,6 +58,7 @@
  self.pats = pats   self.ms = {}   self.curRow = None + self.patchecked = {}     # determine the user configured status colors   # (in the future, we could support full rich-text tags) @@ -202,21 +204,19 @@
  self.ms = merge.mergestate(self.repo)   extract = lambda x, y: dict(zip(x, map(y.get, x)))   stopts = extract(('unknown', 'ignored', 'clean'), self.opts) - if self.pats: - m = cmdutil.match(self.repo, self.pats) - status = self.repo.status(match=m, **stopts) - self.wctx = context.workingctx(self.repo, changes=status) - self.updateModel() - return - wctx = self.repo[None]   try: - wctx.status(**stopts) - except AttributeError: - # your mercurial source is not new enough, falling back - # to triggering implicit status() call. - wctx.modified() + if self.pats: + m = cmdutil.match(self.repo, self.pats) + status = self.repo.status(match=m, **stopts) + # Record all matched files as initially checked + self.patchecked = dict([(fn, True) for group in status \ + for fn in group]) + wctx = context.workingctx(self.repo, changes=status) + else: + wctx = self.repo[None] + wctx.status(**stopts)   except (OSError, IOError, util.Abort), e: - self.status_error = str(e) + print e # TODO   self.wctx = wctx   self.updateModel()   @@ -225,7 +225,7 @@
  if self.tv.model():   checked = self.tv.model().getChecked()   else: - checked = {} + checked = self.patchecked   tm = WctxModel(self.wctx, self.ms, self.opts, checked)   self.tv.setModel(tm)   self.tv.setSortingEnabled(True)