[Pkg-bazaar-commits] ./bzr/unstable r532: - put back support for log on specific files

Martin Pool mbp at sourcefrog.net
Fri Apr 10 08:19:16 UTC 2009


------------------------------------------------------------
revno: 532
committer: Martin Pool <mbp at sourcefrog.net>
timestamp: Tue 2005-05-17 18:23:28 +1000
message:
  - put back support for log on specific files
modified:
  bzrlib/log.py
-------------- next part --------------
=== modified file 'bzrlib/log.py'
--- a/bzrlib/log.py	2005-05-17 08:18:00 +0000
+++ b/bzrlib/log.py	2005-05-17 08:23:28 +0000
@@ -121,13 +121,10 @@
         import sys
         to_file = sys.stdout
 
-    if specific_fileid:
-        raise NotImplementedError('sorry, option not implemented at the moment')
-    
     which_revs = branch.enum_history(direction)
 
-    if not verbose:
-        # no actual deltas generated
+    if not (verbose or specific_fileid):
+        # no need to know what changed between revisions
         with_deltas = deltas_for_log_dummy(branch, which_revs)
     elif direction == 'reverse':
         with_deltas = deltas_for_log_reverse(branch, which_revs)
@@ -135,8 +132,14 @@
         raise NotImplementedError("sorry, verbose forward logs not done yet")
 
     for revno, rev, delta in with_deltas:
-        # TODO: if filename given, check if it's changed; if not
-        # changed, skip this one
+        if specific_fileid:
+            if not delta.touches_file_id(specific_fileid):
+                continue
+        
+        if not verbose:
+            # although we calculated it, throw it away without display
+            delta = None
+            
         show_one_log(revno, rev, delta, show_ids, to_file, show_timezone)
 
 



More information about the Pkg-bazaar-commits mailing list