~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/osutils.py

  • Committer: Robert Collins
  • Date: 2005-10-12 07:28:41 UTC
  • Revision ID: robertc@lifelesslap.robertcollins.net-20051012072841-ffbcdc4c5285b374
revert symlinks correctly

Show diffs side-by-side

added added

removed removed

Lines of Context:
132
132
        return
133
133
    bfn = fn + '~'
134
134
 
 
135
    if has_symlinks() and os.path.islink(fn):
 
136
        target = os.readlink(fn)
 
137
        os.symlink(target, bfn)
 
138
        return
135
139
    inf = file(fn, 'rb')
136
140
    try:
137
141
        content = inf.read()