MCPcopy Index your code
hub / github.com/nodejs/node / queueForRemoval

Function queueForRemoval

tools/icu/icutrim.py:210–252  ·  view source on GitHub ↗
(tree)

Source from the content-addressed store, hash-verified

208 keep = set()
209
210def queueForRemoval(tree):
211 global remove
212 if tree not in config.get("trees", {}):
213 return
214 mytree = trees[tree]
215 if options.verbose > 0:
216 print("* %s: %d items" % (tree, len(mytree["locs"])))
217 # do varible substitution for this tree here
218 if isinstance(config["trees"][tree], basestring):
219 treeStr = config["trees"][tree]
220 if options.verbose > 5:
221 print(" Substituting $%s for tree %s" % (treeStr, tree))
222 if treeStr not in config.get("variables", {}):
223 print(" ERROR: no variable: variables.%s for tree %s" % (treeStr, tree))
224 sys.exit(1)
225 config["trees"][tree] = config["variables"][treeStr]
226 myconfig = config["trees"][tree]
227 if options.verbose > 4:
228 print(" Config: %s" % (myconfig))
229 # Process this tree
230 if(len(myconfig)==0 or len(mytree["locs"])==0):
231 if(options.verbose>2):
232 print(" No processing for %s - skipping" % (tree))
233 else:
234 only = None
235 if "only" in myconfig:
236 only = set(myconfig["only"])
237 if (len(only)==0) and (mytree["treeprefix"] != ""):
238 thePool = "%spool.res" % (mytree["treeprefix"])
239 if (thePool in itemset):
240 if(options.verbose>0):
241 print("Removing %s because tree %s is empty." % (thePool, tree))
242 remove.add(thePool)
243 else:
244 print("tree %s - no ONLY")
245 for l in range(len(mytree["locs"])):
246 loc = mytree["locs"][l]
247 if (only is not None) and not loc in only:
248 # REMOVE loc
249 toRemove = "%s%s%s" % (mytree["treeprefix"], loc, mytree["extension"])
250 if(options.verbose>6):
251 print("Queueing for removal: %s" % toRemove)
252 remove.add(toRemove)
253
254def addTreeByType(tree, mytree):
255 if(options.verbose>1):

Callers 2

addTreeByTypeFunction · 0.85
icutrim.pyFile · 0.85

Calls 6

getMethod · 0.65
addMethod · 0.65
printFunction · 0.50
setFunction · 0.50
rangeFunction · 0.50
exitMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…