~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: mbp at sourcefrog
  • Date: 2005-03-28 02:24:18 UTC
  • Revision ID: mbp@sourcefrog.net-20050328022418-9d37f56361aa18e9
doc: more on ignore patterns

Show diffs side-by-side

added added

removed removed

Lines of Context:
480
480
                            state = 'A'
481
481
                        elif (old_ie.name == entry.name
482
482
                              and old_ie.parent_id == entry.parent_id):
 
483
                            state = 'M'
 
484
                        else:
483
485
                            state = 'R'
484
 
                        else:
485
 
                            state = 'M'
486
486
 
487
487
                        show_status(state, entry.kind, quotefn(path))
488
488
 
542
542
        mutter("committing patch r%d" % (self.revno() + 1))
543
543
 
544
544
        mutter("append to revision-history")
545
 
        self.controlfile('revision-history', 'at').write(rev_id + '\n')
 
545
        f = self.controlfile('revision-history', 'at')
 
546
        f.write(rev_id + '\n')
 
547
        f.close()
546
548
 
547
 
        mutter("done!")
 
549
        if verbose:
 
550
            note("commited r%d" % self.revno())
548
551
 
549
552
 
550
553
    def get_revision(self, revision_id):
764
767
    >>> isdir(bd)
765
768
    False
766
769
    """
767
 
    def __init__(self, files = []):
 
770
    def __init__(self, files=[], dirs=[]):
768
771
        """Make a test branch.
769
772
 
770
773
        This creates a temporary directory and runs init-tree in it.
772
775
        If any files are listed, they are created in the working copy.
773
776
        """
774
777
        Branch.__init__(self, tempfile.mkdtemp(), init=True)
 
778
        for d in dirs:
 
779
            os.mkdir(self.abspath(d))
 
780
            
775
781
        for f in files:
776
782
            file(os.path.join(self.base, f), 'w').write('content of %s' % f)
777
783