diff mercurial/util.py @ 3566:4d97184a06ad

Make util.unique return a list
author Matt Mackall <mpm@selenic.com>
date Fri, 27 Oct 2006 14:06:32 -0500
parents bb44489b901f
children 23f7d9621783
line wrap: on
line diff
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -128,10 +128,12 @@ def binary(s):
 def unique(g):
     """return the uniq elements of iterable g"""
     seen = {}
+    l = []
     for f in g:
         if f not in seen:
             seen[f] = 1
-            yield f
+            l.append(f)
+    return l
 
 class Abort(Exception):
     """Raised if a command needs to print an error and exit."""