/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/osutils.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-10-27 16:14:18 UTC
  • mfrom: (2091.3.7 symlink-paths)
  • Revision ID: pqm@pqm.ubuntu.com-20061027161418-ed489293a9231843
Fix bzr mv across symlinks

Show diffs side-by-side

added added

removed removed

Lines of Context:
1110
1110
        b += new
1111
1111
    return b
1112
1112
 
 
1113
def dereference_path(path):
 
1114
    """Determine the real path to a file.
 
1115
 
 
1116
    All parent elements are dereferenced.  But the file itself is not
 
1117
    dereferenced.
 
1118
    :param path: The original path.  May be absolute or relative.
 
1119
    :return: the real path *to* the file
 
1120
    """
 
1121
    parent, base = os.path.split(path)
 
1122
    # The pathjoin for '.' is a workaround for Python bug #1213894.
 
1123
    # (initial path components aren't dereferenced)
 
1124
    return pathjoin(realpath(pathjoin('.', parent)), base)