~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/export/dir_exporter.py

  • Committer: Jelmer Vernooij
  • Date: 2009-07-23 16:30:49 UTC
  • mto: This revision was merged to the branch mainline in revision 4564.
  • Revision ID: jelmer@samba.org-20090723163049-93hqum4ce31ja4nq
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))