comparison hgext/histedit.py @ 17068:a86e110430f6

histedit: remove use of reduce() builtin spotted by check-code
author Augie Fackler <raf@durin42.com>
date Wed, 27 Jun 2012 18:42:48 -0500
parents baf8887d40e2
children 2b1c78674230
comparison
equal deleted inserted replaced
17067:81d681f8bdc1 17068:a86e110430f6
288 while newchildren: 288 while newchildren:
289 if action in ('f', 'fold'): 289 if action in ('f', 'fold'):
290 tmpnodes.extend([n.node() for n in newchildren]) 290 tmpnodes.extend([n.node() for n in newchildren])
291 else: 291 else:
292 created.extend([n.node() for n in newchildren]) 292 created.extend([n.node() for n in newchildren])
293 newchildren = filter(lambda x: x.node() not in existing, 293 filtered = []
294 reduce(lambda x, y: x + y, 294 for r in newchildren:
295 map(lambda r: r.children(), 295 filtered += [c for c in r.children() if c.node not in existing]
296 newchildren))) 296 newchildren = filtered
297 m, a, r, d = repo.status()[:4] 297 m, a, r, d = repo.status()[:4]
298 oldctx = repo[currentnode] 298 oldctx = repo[currentnode]
299 message = oldctx.description() 299 message = oldctx.description()
300 if action in ('e', 'edit', 'm', 'mess'): 300 if action in ('e', 'edit', 'm', 'mess'):
301 message = ui.edit(message, ui.username()) 301 message = ui.edit(message, ui.username())