mercurial/patch.py
changeset 4184 da0588996ecc
parent 4106 797dbdd4d7e1
child 4200 b5d1eaade333
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