/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/builtins.py

  • Committer: Jelmer Vernooij
  • Date: 2018-05-20 13:39:19 UTC
  • mto: (6968.4.3 git-archive)
  • mto: This revision was merged to the branch mainline in revision 6972.
  • Revision ID: jelmer@jelmer.uk-20180520133919-iocz3e00g3zleq3w
Simplify export module.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3347
3347
            export_tree = ContentFilterTree(
3348
3348
                    export_tree, export_tree._content_filter_stack)
3349
3349
 
3350
 
        if format != 'dir':
3351
 
            # Try asking the tree first..
3352
 
            chunks = export_tree.archive(
3353
 
                format, dest, root=root, subdir=subdir,
3354
 
                force_mtime=force_mtime)
3355
 
            try:
3356
 
                if dest == '-':
3357
 
                    self.outf.writelines(chunks)
3358
 
                else:
3359
 
                    import tempfile
3360
 
                    with tempfile.NamedTemporaryFile(delete=False) as temp:
3361
 
                        temp.writelines(chunks)
3362
 
                    os.rename(temp.name, dest)
3363
 
            except errors.NoSuchExportFormat:
3364
 
                pass
3365
 
            else:
3366
 
                return
3367
3350
        try:
3368
3351
            export(export_tree, dest, format, root, subdir,
3369
3352
                   per_file_timestamps=per_file_timestamps)