~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/export/dir_exporter.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-07-23 20:28:46 UTC
  • mfrom: (4562.1.2 bzr.dev)
  • Revision ID: pqm@pqm.ubuntu.com-20090723202846-qpxxgq1j5805yrf6
(Jelmer) Support exporting symlinks when exporting from a working
        tree.

Show diffs side-by-side

added added

removed removed

Lines of Context:
63
63
            os.mkdir(fullpath)
64
64
        elif ie.kind == "symlink":
65
65
            try:
66
 
                os.symlink(ie.symlink_target, fullpath)
 
66
                symlink_target = tree.get_symlink_target(ie.file_id)
 
67
                os.symlink(symlink_target, fullpath)
67
68
            except OSError,e:
68
69
                raise errors.BzrError(
69
70
                    "Failed to create symlink %r -> %r, error: %s"
70
 
                    % (fullpath, self.symlink_target, e))
 
71
                    % (fullpath, symlink_target, e))
71
72
        else:
72
73
            raise errors.BzrError("don't know how to export {%s} of kind %r" %
73
74
               (ie.file_id, ie.kind))