[Pkg-bazaar-commits] ./bzr/unstable r133: - new 'ignored' command

mbp at sourcefrog.net mbp at sourcefrog.net
Fri Apr 10 07:44:11 UTC 2009


------------------------------------------------------------
revno: 133
committer: mbp at sourcefrog.net
timestamp: Tue 2005-03-29 13:02:34 +1000
message:
  - new 'ignored' command
modified:
  NEWS
  bzrlib/commands.py
-------------- next part --------------
=== modified file 'NEWS'
--- a/NEWS	2005-03-28 10:10:23 +0000
+++ b/NEWS	2005-03-29 03:02:34 +0000
@@ -1,20 +1,20 @@
-bzr-0.0.2  NOT RELEASED YET
+bzr-0.0.2  "black cube"  NOT RELEASED YET
 
-  CHANGES:
+  ENHANCEMENTS:
 
     * Default ignore list extended (see bzrlib/__init__.py).
 
     * Patterns in .bzrignore are now added to the default ignore list,
       rather than replacing it.
 
-  ENHANCEMENTS:
-
     * Ignore list is memoized after first request.
 
     * More help topics.
 
     * Reinstate the 'bzr check' command to check invariants of the
       branch.
+
+    * New 'ignored' command shows which files are ignored and why.
 
 bzr-0.0.1  2005-03-26
 

=== modified file 'bzrlib/commands.py'
--- a/bzrlib/commands.py	2005-03-28 04:12:43 +0000
+++ b/bzrlib/commands.py	2005-03-29 03:02:34 +0000
@@ -384,6 +384,20 @@
         print quotefn(f)
 
 
+
+def cmd_ignored(verbose=True):
+    """List ignored files and the patterns that matched them.
+      """
+    tree = Branch('.').working_tree()
+    for path, file_class, kind, id in tree.list_files():
+        if file_class != 'I':
+            continue
+        ## XXX: Slightly inefficient since this was already calculated
+        pat = tree.is_ignored(path)
+        print '%-50s %s' % (path, pat)
+    
+
+
 def cmd_lookup_revision(revno):
     try:
         revno = int(revno)



More information about the Pkg-bazaar-commits mailing list