Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.4rc1, 0.4rc2, and 0.4rc3

overlay: support repo-level display control

Changeset 87cbada96178

Parent 0c0b7bbff2dd

by TK Soh

Changes to one file · Browse files at 87cbada96178 Showing diff from parent 0c0b7bbff2dd Diff from another changeset...

 
10
11
12
13
14
15
16
 
89
90
91
92
93
94
95
96
 
171
172
173
 
 
 
 
 
 
 
 
 
174
175
176
 
242
243
244
245
246
247
248
 
249
250
251
 
10
11
12
 
13
14
15
 
88
89
90
 
 
91
92
93
 
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
 
248
249
250
 
 
 
 
251
252
253
254
@@ -10,7 +10,6 @@
 from mercurial import hg, cmdutil, util  from mercurial import repo as _repo  import thgutil -import shellconf  import sys    # FIXME: quick workaround traceback caused by missing "closed" @@ -89,8 +88,6 @@
  ]     def GetOverlayInfo(self): - shellconf.read() -   icon = thgutil.get_icon_path("status", self.icon)   print "icon = ", icon   @@ -171,6 +168,15 @@
    try:   repo = hg.repository(ui.ui(), path=root) + + # check if to display overlay icons in this repo + show_overlay = repo.ui.config('tortoisehg', 'overlayicons', 'enabled') + print "%s: overlay icons %s" % (path, show_overlay) + if show_overlay != 'enabled': + overlay_cache = {} + for f in get_cache_list(path): + overlay_cache[f] = (UNKNOWN, tc) + return NOT_IN_TREE   except _repo.RepoError:   # We aren't in a working tree   print "%s: not in repo" % dir @@ -242,10 +248,7 @@
  print "%s: %s" % (path, status)   return status   - def IsMemberOf(self, path, attrib): - if not shellconf.show_overlay_icons: - return S_FALSE - + def IsMemberOf(self, path, attrib):   if self._get_state(path) == self.state:   return S_OK   return S_FALSE