~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Martin Pool
  • Date: 2006-11-02 10:20:19 UTC
  • mfrom: (2114 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2119.
  • Revision ID: mbp@sourcefrog.net-20061102102019-9a5a02f485dff6f6
merge bzr.dev and reconcile several changes, also some test fixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006 by Canonical Ltd
 
1
# Copyright (C) 2006 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
18
18
 
19
19
import os
20
20
 
 
21
from bzrlib import (
 
22
    osutils,
 
23
    workingtree,
 
24
)
21
25
from bzrlib.tests import TestCaseWithTransport
22
26
 
23
27
 
128
132
 
129
133
        self.run_bzr('move', 'a', 'b')
130
134
        self.run_bzr('rename', 'b', 'a')
 
135
 
 
136
    def test_mv_through_symlinks(self):
 
137
        if not osutils.has_symlinks():
 
138
            raise TestSkipped('Symlinks are not supported on this platform')
 
139
        tree = self.make_branch_and_tree('.')
 
140
        self.build_tree(['a/', 'a/b'])
 
141
        os.symlink('a', 'c')
 
142
        os.symlink('.', 'd')
 
143
        tree.add(['a', 'a/b', 'c'], ['a-id', 'b-id', 'c-id'])
 
144
        self.run_bzr('mv', 'c/b', 'b')
 
145
        tree = workingtree.WorkingTree.open('.')
 
146
        self.assertEqual('b-id', tree.path2id('b'))