##// END OF EJS Templates
make the order of the arguments for filterfiles consistent...
Benoit Boissinot -
r1626:f2b1df3d default
parent child Browse files
Show More
@@ -17,7 +17,7 b' def dodiff(fp, ui, repo, node1, node2, f'
17 changes = repo.changes(node1, node2, files, match=match)
17 changes = repo.changes(node1, node2, files, match=match)
18 modified, added, removed, deleted, unknown = changes
18 modified, added, removed, deleted, unknown = changes
19 if files:
19 if files:
20 modified, added, removed = map(lambda x: filterfiles(x, files),
20 modified, added, removed = map(lambda x: filterfiles(files, x),
21 (modified, added, removed))
21 (modified, added, removed))
22
22
23 if not modified and not added and not removed:
23 if not modified and not added and not removed:
@@ -266,7 +266,7 b' def dodiff(fp, ui, repo, node1, node2, f'
266 changes = repo.changes(node1, node2, files, match=match)
266 changes = repo.changes(node1, node2, files, match=match)
267 modified, added, removed, deleted, unknown = changes
267 modified, added, removed, deleted, unknown = changes
268 if files:
268 if files:
269 modified, added, removed = map(lambda x: filterfiles(x, files),
269 modified, added, removed = map(lambda x: filterfiles(files, x),
270 (modified, added, removed))
270 (modified, added, removed))
271
271
272 if not modified and not added and not removed:
272 if not modified and not added and not removed:
@@ -226,13 +226,13 b' class hgweb(object):'
226 yield self.t(t1, tag=t, **args)
226 yield self.t(t1, tag=t, **args)
227
227
228 def diff(self, node1, node2, files):
228 def diff(self, node1, node2, files):
229 def filterfiles(list, files):
229 def filterfiles(filters, files):
230 l = [x for x in list if x in files]
230 l = [x for x in list if x in filters]
231
231
232 for f in files:
232 for t in filters:
233 if f[-1] != os.sep:
233 if t[-1] != os.sep:
234 f += os.sep
234 t += os.sep
235 l += [x for x in list if x.startswith(f)]
235 l += [x for x in files if x.startswith(t)]
236 return l
236 return l
237
237
238 parity = [0]
238 parity = [0]
@@ -267,7 +267,7 b' class hgweb(object):'
267
267
268 modified, added, removed, deleted, unknown = r.changes(node1, node2)
268 modified, added, removed, deleted, unknown = r.changes(node1, node2)
269 if files:
269 if files:
270 modified, added, removed = map(lambda x: filterfiles(x, files),
270 modified, added, removed = map(lambda x: filterfiles(files, x),
271 (modified, added, removed))
271 (modified, added, removed))
272
272
273 for f in modified:
273 for f in modified:
General Comments 0
You need to be logged in to leave comments. Login now