~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: John Arbash Meinel
  • Date: 2006-10-31 21:29:02 UTC
  • mfrom: (2104 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2110.
  • Revision ID: john@arbash-meinel.com-20061031212902-4b33920b90e9ce92
[merge] bzr.dev 2104

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'))