~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/__init__.py

  • Committer: Neil Santos
  • Date: 2010-02-25 03:23:48 UTC
  • mto: (5080.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 5081.
  • Revision ID: neil_santos@users.sourceforge.net-20100225032348-pi4bes9ehqjg394c
Added default link() and symlink() methods to Transport.
Added implementation of link() and symlink() methods to LocalTransport.
Added implementation of symlink() method to SFTPTransport.
Added corresponding tests (symlink() fails for SFTPTransport for some reason; possibly a Paramiko bug?).
Committing in preparation for push and eventual merge proposal to mainline bzr.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1202
1202
        count = self._iterate_over(relpaths, gather, pb, 'stat', expand=False)
1203
1203
        return stats
1204
1204
 
 
1205
    def link(self, source, link_name):
 
1206
        """Create a hardlink pointing to source named link_name.
 
1207
 
 
1208
        Return True if successful.
 
1209
        """
 
1210
        raise errors.TransportNotPossible("Hard links are not supported on %s" % self)
 
1211
 
 
1212
    def symlink(self, source, link_name):
 
1213
        """Create a symlink pointing to source named link_name.
 
1214
 
 
1215
        Return True if successful.
 
1216
        """
 
1217
        raise errors.TransportNotPossible("Symlinks are not supported on %s" % self)
 
1218
 
1205
1219
    def listable(self):
1206
1220
        """Return True if this store supports listing."""
1207
1221
        raise NotImplementedError(self.listable)