Mercurial > hg > gitweb
comparison mercurial/patch.py @ 4184:da0588996ecc
remove obsolete code from patch.diff
repo.status already does this filtering. If the caller supplies a set of
changes, it's his responsibility to filter out what he doesn't want.
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Sat, 10 Mar 2007 23:00:43 -0300 |
parents | 797dbdd4d7e1 |
children | b5d1eaade333 |
comparison
equal
deleted
inserted
replaced
4183:6f9474044736 | 4184:da0588996ecc |
---|---|
464 date1 = util.datestr(change[2]) | 464 date1 = util.datestr(change[2]) |
465 | 465 |
466 if not changes: | 466 if not changes: |
467 changes = repo.status(node1, node2, files, match=match)[:5] | 467 changes = repo.status(node1, node2, files, match=match)[:5] |
468 modified, added, removed, deleted, unknown = changes | 468 modified, added, removed, deleted, unknown = changes |
469 if files: | |
470 def filterfiles(filters): | |
471 l = [x for x in filters if x in files] | |
472 | |
473 for t in files: | |
474 if not t.endswith("/"): | |
475 t += "/" | |
476 l += [x for x in filters if x.startswith(t)] | |
477 return l | |
478 | |
479 modified, added, removed = map(filterfiles, (modified, added, removed)) | |
480 | 469 |
481 if not modified and not added and not removed: | 470 if not modified and not added and not removed: |
482 return | 471 return |
483 | 472 |
484 # returns False if there was no rename between n1 and n2 | 473 # returns False if there was no rename between n1 and n2 |