~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commands.py

  • Committer: mbp at sourcefrog
  • Date: 2005-03-29 03:02:34 UTC
  • Revision ID: mbp@sourcefrog.net-20050329030234-533d2aff52d93eee
- new 'ignored' command

Show diffs side-by-side

added added

removed removed

Lines of Context:
384
384
        print quotefn(f)
385
385
 
386
386
 
 
387
 
 
388
def cmd_ignored(verbose=True):
 
389
    """List ignored files and the patterns that matched them.
 
390
      """
 
391
    tree = Branch('.').working_tree()
 
392
    for path, file_class, kind, id in tree.list_files():
 
393
        if file_class != 'I':
 
394
            continue
 
395
        ## XXX: Slightly inefficient since this was already calculated
 
396
        pat = tree.is_ignored(path)
 
397
        print '%-50s %s' % (path, pat)
 
398
    
 
399
 
 
400
 
387
401
def cmd_lookup_revision(revno):
388
402
    try:
389
403
        revno = int(revno)