[Pkg-bazaar-commits] ./bzr/unstable r531: - new utility TreeDelta.touches_file_id
Martin Pool
mbp at sourcefrog.net
Fri Apr 10 08:19:16 UTC 2009
------------------------------------------------------------
revno: 531
committer: Martin Pool <mbp at sourcefrog.net>
timestamp: Tue 2005-05-17 18:20:31 +1000
message:
- new utility TreeDelta.touches_file_id
modified:
bzrlib/diff.py
-------------- next part --------------
=== modified file 'bzrlib/diff.py'
--- a/bzrlib/diff.py 2005-05-11 10:14:09 +0000
+++ b/bzrlib/diff.py 2005-05-17 08:20:31 +0000
@@ -160,6 +160,19 @@
self.modified = []
self.unchanged = []
+
+ def touches_file_id(self, file_id):
+ """Return True if file_id is modified by this delta."""
+ for l in self.added, self.removed, self.modified:
+ for v in l:
+ if v[1] == file_id:
+ return True
+ for v in self.renamed:
+ if v[2] == file_id:
+ return True
+ return False
+
+
def show(self, to_file, show_ids=False, show_unchanged=False):
def show_list(files):
for path, fid, kind in files:
More information about the Pkg-bazaar-commits
mailing list