histedit: remove use of reduce() builtin spotted by check-code
authorAugie Fackler <raf@durin42.com>
Wed, 27 Jun 2012 18:42:48 -0500
changeset 17068 a86e110430f6
parent 17067 81d681f8bdc1
child 17069 2b1c78674230
histedit: remove use of reduce() builtin spotted by check-code
hgext/histedit.py
--- 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()