mercurial/util.py
branchstable
changeset 19845 a1237a4b437d
parent 19461 dd7c992d3cc1
child 19852 57479e0d203d
equal deleted inserted replaced
19844:bbeee568a84d 19845:a1237a4b437d
   277         result = self.func(obj)
   277         result = self.func(obj)
   278         self.cachevalue(obj, result)
   278         self.cachevalue(obj, result)
   279         return result
   279         return result
   280 
   280 
   281     def cachevalue(self, obj, value):
   281     def cachevalue(self, obj, value):
   282         setattr(obj, self.name, value)
   282         # __dict__ assigment required to bypass __setattr__ (eg: repoview)
       
   283         obj.__dict__[self.name] = value
   283 
   284 
   284 def pipefilter(s, cmd):
   285 def pipefilter(s, cmd):
   285     '''filter string S through command CMD, returning its output'''
   286     '''filter string S through command CMD, returning its output'''
   286     p = subprocess.Popen(cmd, shell=True, close_fds=closefds,
   287     p = subprocess.Popen(cmd, shell=True, close_fds=closefds,
   287                          stdin=subprocess.PIPE, stdout=subprocess.PIPE)
   288                          stdin=subprocess.PIPE, stdout=subprocess.PIPE)