mercurial/util.py
changeset 35014 be6aa0cff8ea
parent 34647 dacfcdd8b94e
child 35145 25c543944bc0
equal deleted inserted replaced
35013:36507048da0f 35014:be6aa0cff8ea
   928         return result
   928         return result
   929 
   929 
   930     def cachevalue(self, obj, value):
   930     def cachevalue(self, obj, value):
   931         # __dict__ assignment required to bypass __setattr__ (eg: repoview)
   931         # __dict__ assignment required to bypass __setattr__ (eg: repoview)
   932         obj.__dict__[self.name] = value
   932         obj.__dict__[self.name] = value
       
   933 
       
   934 def clearcachedproperty(obj, prop):
       
   935     '''clear a cached property value, if one has been set'''
       
   936     if prop in obj.__dict__:
       
   937         del obj.__dict__[prop]
   933 
   938 
   934 def pipefilter(s, cmd):
   939 def pipefilter(s, cmd):
   935     '''filter string S through command CMD, returning its output'''
   940     '''filter string S through command CMD, returning its output'''
   936     p = subprocess.Popen(cmd, shell=True, close_fds=closefds,
   941     p = subprocess.Popen(cmd, shell=True, close_fds=closefds,
   937                          stdin=subprocess.PIPE, stdout=subprocess.PIPE)
   942                          stdin=subprocess.PIPE, stdout=subprocess.PIPE)