~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-07-03 07:49:05 UTC
  • mfrom: (1831.1.2 bzr.merge.no-ignores)
  • Revision ID: pqm@pqm.ubuntu.com-20060703074905-677c02d441974aea
(mbp) remove default ignore pattern list

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
import codecs
21
21
import errno
22
22
import os
 
23
import os.path
23
24
import sys
24
25
 
25
26
import bzrlib
1454
1455
        bzr ignore '*.class'
1455
1456
    """
1456
1457
    # TODO: Complain if the filename is absolute
1457
 
    takes_args = ['name_pattern']
 
1458
    takes_args = ['name_pattern?']
 
1459
    takes_options = [
 
1460
                     Option('old-default-rules',
 
1461
                            help='Out the ignore rules bzr < 0.9 always used.')
 
1462
                     ]
1458
1463
    
1459
 
    def run(self, name_pattern):
 
1464
    def run(self, name_pattern=None, old_default_rules=None):
1460
1465
        from bzrlib.atomicfile import AtomicFile
1461
 
        import os.path
1462
 
 
 
1466
        if old_default_rules is not None:
 
1467
            # dump the rules and exit
 
1468
            for pattern in bzrlib.DEFAULT_IGNORE:
 
1469
                print pattern
 
1470
            return
 
1471
        if name_pattern is None:
 
1472
            raise BzrCommandError("ignore requires a NAME_PATTERN")
1463
1473
        tree, relpath = WorkingTree.open_containing(u'.')
1464
1474
        ifn = tree.abspath('.bzrignore')
1465
 
 
1466
1475
        if os.path.exists(ifn):
1467
1476
            f = open(ifn, 'rt')
1468
1477
            try:
1553
1562
    takes_args = ['dest']
1554
1563
    takes_options = ['revision', 'format', 'root']
1555
1564
    def run(self, dest, revision=None, format=None, root=None):
1556
 
        import os.path
1557
1565
        from bzrlib.export import export
1558
1566
        tree = WorkingTree.open_containing(u'.')[0]
1559
1567
        b = tree.branch