/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/tree.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2018-05-20 17:21:41 UTC
  • mfrom: (6968.2.10 archive)
  • Revision ID: breezy.the.bot@gmail.com-20180520172141-fz1rgat80bbdi77j
Refactor the export API.

Merged from https://code.launchpad.net/~jelmer/brz/archive/+merge/346369

Show diffs side-by-side

added added

removed removed

Lines of Context:
653
653
        searcher = default_searcher
654
654
        return searcher
655
655
 
 
656
    def archive(self, format, name, root='', subdir=None,
 
657
                force_mtime=None):
 
658
        """Create an archive of this tree.
 
659
 
 
660
        :param name: target file name
 
661
        :param format: Format name (e.g. 'tar')
 
662
        :param root: Root directory name (or None)
 
663
        :param subdir: Subdirectory to export (or None)
 
664
        :param per_file_timestamps: Whether to set the timestamp
 
665
            for each file to the last changed time.
 
666
        :return: Iterator over archive chunks
 
667
        """
 
668
        from .archive import create_archive
 
669
        with self.lock_read():
 
670
            return create_archive(format, self, name, root,
 
671
                    subdir, force_mtime=force_mtime)
 
672
 
656
673
    @classmethod
657
674
    def versionable_kind(cls, kind):
658
675
        """Check if this tree support versioning a specific file kind."""