/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: Jelmer Vernooij
  • Date: 2018-05-20 15:54:59 UTC
  • mfrom: (6968.2.10 archive)
  • mto: This revision was merged to the branch mainline in revision 6973.
  • Revision ID: jelmer@jelmer.uk-20180520155459-4u1tpealx8jj3sy3
Merge archive branch.

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, name, format=None, root=None, subdir=None):
 
656
    def archive(self, format, name, root='', subdir=None,
 
657
                force_mtime=None):
657
658
        """Create an archive of this tree.
658
659
 
659
660
        :param name: target file name
660
661
        :param format: Format name (e.g. 'tar')
661
662
        :param root: Root directory name (or None)
662
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.
663
666
        :return: Iterator over archive chunks
664
667
        """
665
 
        from .export import get_stream_export_generator
 
668
        from .archive import create_archive
666
669
        with self.lock_read():
667
 
            return get_stream_export_generator(self, name, format, root,
668
 
                    subdir)
 
670
            return create_archive(format, self, name, root,
 
671
                    subdir, force_mtime=force_mtime)
669
672
 
670
673
    @classmethod
671
674
    def versionable_kind(cls, kind):