/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 bzrlib/export/dir_exporter.py

  • Committer: Martin Pool
  • Date: 2011-06-13 16:34:53 UTC
  • mto: This revision was merged to the branch mainline in revision 5996.
  • Revision ID: mbp@canonical.com-20110613163453-pan7787wy2b2uydy
Delete fairly useless and repetitive per-format export single-call functions.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006, 2008, 2009, 2010 Canonical Ltd
 
1
# Copyright (C) 2005-2011 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
33
33
 
34
34
    `dest` should either not exist or should be empty. If it does not exist it
35
35
    will be created holding the contents of this tree.
36
 
    
 
36
 
37
37
    :param fileobj: Is not used in this exporter
38
38
 
39
39
    :note: If the export fails, the destination directory will be
66
66
            try:
67
67
                symlink_target = tree.get_symlink_target(ie.file_id)
68
68
                os.symlink(symlink_target, fullpath)
69
 
            except OSError,e:
 
69
            except OSError, e:
70
70
                raise errors.BzrError(
71
71
                    "Failed to create symlink %r -> %r, error: %s"
72
72
                    % (fullpath, symlink_target, e))
100
100
        os.utime(fullpath, (mtime, mtime))
101
101
 
102
102
        yield
103
 
        
104
 
def dir_exporter(tree, dest, root, subdir=None, filtered=False, 
105
 
                 force_mtime=None, fileobj=None):
106
 
 
107
 
    for _ in dir_exporter_generator(tree, dest, root, subdir, filtered,
108
 
                                    force_mtime, fileobj):
109
 
        pass