~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/local.py

  • Committer: John Arbash Meinel
  • Date: 2010-08-02 17:16:12 UTC
  • mto: This revision was merged to the branch mainline in revision 5369.
  • Revision ID: john@arbash-meinel.com-20100802171612-rdh5ods70w2bl3j7
We also have to re-implement it for _simple_set_pyx.pyx

Show diffs side-by-side

added added

removed removed

Lines of Context:
99
99
         - relative_reference is url escaped.
100
100
        """
101
101
        if relative_reference in ('.', ''):
102
 
            return self._local_base
 
102
            # _local_base normally has a trailing slash; strip it so that stat
 
103
            # on a transport pointing to a symlink reads the link not the
 
104
            # referent but be careful of / and c:\
 
105
            return osutils.split(self._local_base)[0]
103
106
        return self._local_base + urlutils.unescape(relative_reference)
104
107
 
105
108
    def abspath(self, relpath):
403
406
        try:
404
407
            # *don't* call bzrlib.osutils.rename, because we want to
405
408
            # detect conflicting names on rename, and osutils.rename tries to
406
 
            # mask cross-platform differences there; however we do update the
407
 
            # exception to include the filenames
 
409
            # mask cross-platform differences there
408
410
            os.rename(path_from, path_to)
409
411
        except (IOError, OSError),e:
410
412
            # TODO: What about path_to?
411
 
            self._translate_error(
412
 
                osutils._add_rename_error_details(e, path_from, path_to),
413
 
                path_from)
 
413
            self._translate_error(e, path_from)
414
414
 
415
415
    def move(self, rel_from, rel_to):
416
416
        """Move the item at rel_from to the location at rel_to"""