/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/transport/brokenrename.py

  • Committer: Martin Pool
  • Date: 2007-07-03 07:24:42 UTC
  • mto: This revision was merged to the branch mainline in revision 2584.
  • Revision ID: mbp@sourcefrog.net-20070703072442-y3pwex52rrtsa8gg
Better handling in LockDir of rename that moves one directory within another

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
from stat import S_ISDIR
21
21
 
22
 
import bzrlib.errors as errors
 
22
from bzrlib import (
 
23
        errors,
 
24
        urlutils,
 
25
        )
23
26
from bzrlib.transport.decorator import TransportDecorator, DecoratorServer
24
27
 
25
28
 
35
38
        """See Transport.rename().
36
39
        """
37
40
        try:
 
41
            if self._decorated.has(rel_to):
 
42
                rel_to = urlutils.join(rel_to, urlutils.basename(rel_from))
38
43
            self._decorated.rename(rel_from, rel_to)
39
44
        except (errors.DirectoryNotEmpty, errors.FileExists), e:
40
45
            # absorb the error