~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_mv.py

  • Committer: Aaron Bentley
  • Date: 2006-10-20 05:28:45 UTC
  • mto: This revision was merged to the branch mainline in revision 2098.
  • Revision ID: aaron.bentley@utoronto.ca-20061020052845-6726ae2723e5633d
Traverse non-terminal symlinks for mv et al

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
import os
20
20
 
 
21
from bzrlib import workingtree
21
22
from bzrlib.tests import TestCaseWithTransport
22
23
 
23
24
 
128
129
 
129
130
        self.run_bzr('move', 'a', 'b')
130
131
        self.run_bzr('rename', 'b', 'a')
 
132
 
 
133
    def test_mv_through_symlinks(self):
 
134
        tree = self.make_branch_and_tree('.')
 
135
        self.build_tree(['a/', 'a/b'])
 
136
        os.symlink('a', 'c')
 
137
        os.symlink('.', 'd')
 
138
        tree.add(['a', 'a/b', 'c'], ['a-id', 'b-id', 'c-id'])
 
139
        self.run_bzr('mv', 'c/b', 'b')
 
140
        tree = workingtree.WorkingTree.open('.')
 
141
        self.assertEqual('b-id', tree.path2id('b'))