Mercurial > public > mercurial-scm > hg
comparison mercurial/util.py @ 19852:57479e0d203d
merge with stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 01 Oct 2013 17:00:03 -0700 |
parents | dfefb719eb92 a1237a4b437d |
children | d51c4d85ec23 |
comparison
equal
deleted
inserted
replaced
19843:5c0dc243fe5b | 19852:57479e0d203d |
---|---|
281 result = self.func(obj) | 281 result = self.func(obj) |
282 self.cachevalue(obj, result) | 282 self.cachevalue(obj, result) |
283 return result | 283 return result |
284 | 284 |
285 def cachevalue(self, obj, value): | 285 def cachevalue(self, obj, value): |
286 setattr(obj, self.name, value) | 286 # __dict__ assigment required to bypass __setattr__ (eg: repoview) |
287 obj.__dict__[self.name] = value | |
287 | 288 |
288 def pipefilter(s, cmd): | 289 def pipefilter(s, cmd): |
289 '''filter string S through command CMD, returning its output''' | 290 '''filter string S through command CMD, returning its output''' |
290 p = subprocess.Popen(cmd, shell=True, close_fds=closefds, | 291 p = subprocess.Popen(cmd, shell=True, close_fds=closefds, |
291 stdin=subprocess.PIPE, stdout=subprocess.PIPE) | 292 stdin=subprocess.PIPE, stdout=subprocess.PIPE) |