[Pkg-bazaar-commits] ./bzr/unstable r483: - change 'file_list' to more explanatory 'specific_files'

Martin Pool mbp at sourcefrog.net
Fri Apr 10 08:20:12 UTC 2009


------------------------------------------------------------
revno: 483
committer: Martin Pool <mbp at sourcefrog.net>
timestamp: Wed 2005-05-11 18:11:37 +1000
message:
  - change 'file_list' to more explanatory 'specific_files'
modified:
  bzrlib/commands.py
  bzrlib/diff.py
  bzrlib/status.py
-------------- next part --------------
=== modified file 'bzrlib/commands.py'
--- a/bzrlib/commands.py	2005-05-11 06:18:45 +0000
+++ b/bzrlib/commands.py	2005-05-11 08:11:37 +0000
@@ -238,7 +238,7 @@
             b = Branch('.', lock_mode='r')
         import status
         status.show_status(b, show_unchanged=all, show_ids=show_ids,
-                           file_list=file_list)
+                           specific_files=file_list)
 
 
 class cmd_cat_revision(Command):
@@ -494,7 +494,7 @@
     def run(self, revision=None, file_list=None):
         from bzrlib.diff import show_diff
     
-        show_diff(Branch('.'), revision, file_list)
+        show_diff(Branch('.'), revision, specific_files=file_list)
 
 
         

=== modified file 'bzrlib/diff.py'
--- a/bzrlib/diff.py	2005-05-11 08:01:27 +0000
+++ b/bzrlib/diff.py	2005-05-11 08:11:37 +0000
@@ -67,7 +67,7 @@
     print >>to_file
 
 
-def show_diff(b, revision, file_list):
+def show_diff(b, revision, specific_files):
     import sys
 
     if revision == None:
@@ -90,7 +90,7 @@
     # be usefully made into a much faster special case.
 
     delta = compare_trees(old_tree, new_tree, want_unchanged=False,
-                          file_list=file_list)
+                          specific_files=specific_files)
 
     for path, file_id, kind in delta.removed:
         print '*** removed %s %r' % (kind, path)
@@ -199,7 +199,7 @@
 
 
 
-def compare_trees(old_tree, new_tree, want_unchanged, file_list=None):
+def compare_trees(old_tree, new_tree, want_unchanged, specific_files=None):
     """Describe changes from one tree to another.
 
     Returns a TreeDelta with details of added, modified, renamed, and
@@ -212,16 +212,16 @@
     want_unchanged
         If true, also list files unchanged from one version to the next.
 
-    file_list
-        If true, only check for changes to specified files.        
+    specific_files
+        If true, only check for changes to specified files.
     """
     old_inv = old_tree.inventory
     new_inv = new_tree.inventory
     delta = TreeDelta()
     mutter('start compare_trees')
 
-    if file_list:
-        file_list = ImmutableSet(file_list)
+    if specific_files:
+        specific_files = ImmutableSet(specific_files)
 
     for file_id in old_tree:
         if file_id in new_tree:
@@ -237,9 +237,9 @@
             old_path = old_inv.id2path(file_id)
             new_path = new_inv.id2path(file_id)
 
-            if file_list:
-                if (old_path not in file_list
-                    and new_path not in file_list):
+            if specific_files:
+                if (old_path not in specific_files
+                    and new_path not in specific_files):
                     continue
 
             if kind == 'file':
@@ -270,8 +270,8 @@
         if file_id in old_inv:
             continue
         new_path = new_inv.id2path(file_id)
-        if file_list:
-            if new_path not in file_list:
+        if specific_files:
+            if new_path not in specific_files:
                 continue
         kind = new_inv.get_file_kind(file_id)
         delta.added.append((new_path, file_id, kind))

=== modified file 'bzrlib/status.py'
--- a/bzrlib/status.py	2005-05-11 08:06:44 +0000
+++ b/bzrlib/status.py	2005-05-11 08:11:37 +0000
@@ -17,14 +17,14 @@
 
 
 def show_status(branch, show_unchanged=False,
-                file_list=None,
+                specific_files=None,
                 show_ids=False):
     """Display single-line status for non-ignored working files.
 
     show_all
         If true, show unmodified files too.
 
-    file_list
+    specific_files
         If set, only show the status of files in this list.
     """
     import sys
@@ -36,7 +36,7 @@
     new = branch.working_tree()
 
     delta = diff.compare_trees(old, new, want_unchanged=show_unchanged,
-                               file_list=file_list)
+                               specific_files=specific_files)
 
     delta.show(sys.stdout, show_ids=show_ids,
                show_unchanged=show_unchanged)
@@ -46,8 +46,8 @@
     for path in unknowns:
         # FIXME: Should also match if the unknown file is within a
         # specified directory.
-        if file_list:
-            if path not in file_list:
+        if specific_files:
+            if path not in specific_files:
                 continue
         if not done_header:
             print 'unknown:'



More information about the Pkg-bazaar-commits mailing list