1. TortoiseHg
  2. TortoiseHg
  3. thg

Commits

Steve Borho  committed 9153ea5

status: do not pre-check !?IC without 'checkall' option (fixes #381)

  • Participants
  • Parent commits 0a34424
  • Branches stable

Comments (0)

Files changed (2)

File tortoisehg/hgqt/quickop.py

View file
         for s, val in status.statusTypes.iteritems():
             opts[val.name] = s in filetypes
 
+        opts['checkall'] = True # pre-check all matching files
         stwidget = status.StatusWidget(pats, opts, repo.root, self)
         layout.addWidget(stwidget, 1)
 

File tortoisehg/hgqt/status.py

View file
         patchecked = {}
         try:
             if self.pats:
+                if self.opts.get('checkall'):
+                    # quickop sets this flag to pre-check even !?IC files
+                    precheckfn = lambda x: True
+                else:
+                    # status and commit only pre-check MAR files
+                    precheckfn = lambda x: x < 4
                 m = cmdutil.match(self.repo, self.pats)
                 status = self.repo.status(match=m, **stopts)
                 # Record all matched files as initially checked
                         continue
                     val = statusTypes[stat]
                     if self.opts[val.name]:
-                        d = dict([(fn, True) for fn in status[i]])
+                        d = dict([(fn, precheckfn(i)) for fn in status[i]])
                         patchecked.update(d)
                 wctx = context.workingctx(self.repo, changes=status)
                 self.patchecked = patchecked