[PATCH 02 of 19 STABLE] match: add 'convert()' to match for encapsulation of its internal information
FUJIWARA Katsunori
foozy at lares.dti.ne.jp
Mon Feb 27 14:33:22 UTC 2012
At Mon, 27 Feb 2012 19:46:27 +0900,
FUJIWARA Katsunori wrote:
> + m = copy.copy(self)
> + m._files = []
> + if filefn:
> + for f in filefn(self._files):
> + m._files.append(f)
> + else:
> + m._files.extend(self._files)
> + m._fmap = set(m._files)
Oops, here should be as below for resource efficiency, shouldn't it ?
m = copy.copy(self)
if filefn:
m._files = []
for f in filefn(self._files):
m._files.append(f)
m._fmap = set(m._files)
----------------------------------------------------------------------
[FUJIWARA Katsunori] foozy at lares.dti.ne.jp
More information about the Mercurial-devel
mailing list