changeset 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 81d681f8bdc1
children 2b1c78674230
files hgext/histedit.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/histedit.py	Wed Jun 27 18:41:14 2012 -0500
+++ b/hgext/histedit.py	Wed Jun 27 18:42:48 2012 -0500
@@ -290,10 +290,10 @@
                 tmpnodes.extend([n.node() for n in newchildren])
             else:
                 created.extend([n.node() for n in newchildren])
-            newchildren = filter(lambda x: x.node() not in existing,
-                                 reduce(lambda x, y: x + y,
-                                        map(lambda r: r.children(),
-                                            newchildren)))
+            filtered = []
+            for r in newchildren:
+                filtered += [c for c in r.children() if c.node not in existing]
+            newchildren = filtered
         m, a, r, d = repo.status()[:4]
         oldctx = repo[currentnode]
         message = oldctx.description()