fix for hgweb.filterfiles
authorBenoit Boissinot <benoit.boissinot@ens-lyon.org>
Wed, 18 Jan 2006 17:07:48 +0100
changeset 1627 11cd38286fdb
parent 1626 f2b1df3dbcbb
child 1628 88ad18c16ae5
child 1629 3024cacfb2c9
child 1630 5ecf05541e11
fix for hgweb.filterfiles some variable weren't converted, fix a possible out of range error
mercurial/hgweb.py
--- a/mercurial/hgweb.py	Wed Jan 18 16:55:05 2006 +0100
+++ b/mercurial/hgweb.py	Wed Jan 18 17:07:48 2006 +0100
@@ -227,10 +227,10 @@
 
     def diff(self, node1, node2, files):
         def filterfiles(filters, files):
-            l = [x for x in list if x in filters]
+            l = [x for x in files if x in filters]
 
             for t in filters:
-                if t[-1] != os.sep:
+                if t and t[-1] != os.sep:
                     t += os.sep
                 l += [x for x in files if x.startswith(t)]
             return l