/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/tests/blackbox/test_branch.py

  • Committer: Aaron Bentley
  • Date: 2007-12-20 20:44:45 UTC
  • mto: This revision was merged to the branch mainline in revision 3235.
  • Revision ID: abentley@panoramicfeedback.com-20071220204445-9o2f10gvvd8e4rks
Implement hard-link support for branch and checkout

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
from bzrlib import branch, bzrdir
23
23
from bzrlib.repofmt.knitrepo import RepositoryFormatKnit1
24
24
from bzrlib.tests.blackbox import ExternalBase
 
25
from bzrlib.tests import HardlinkFeature
25
26
from bzrlib.tests.test_sftp_transport import TestCaseWithSFTPServer
26
27
from bzrlib.workingtree import WorkingTree
27
28
 
84
85
        self.assertFalse(pushed_repo.has_revision('a-2'))
85
86
        self.assertTrue(pushed_repo.has_revision('b-1'))
86
87
 
 
88
    def test_branch_hardlink(self):
 
89
        self.requireFeature(HardlinkFeature)
 
90
        source = self.make_branch_and_tree('source')
 
91
        self.build_tree(['source/file1'])
 
92
        source.add('file1')
 
93
        source.commit('added file')
 
94
        self.run_bzr(['branch', 'source', 'target', '--hardlink'])
 
95
        source_stat = os.stat('source/file1')
 
96
        target_stat = os.stat('target/file1')
 
97
        self.assertEqual(source_stat, target_stat)
 
98
 
87
99
 
88
100
class TestRemoteBranch(TestCaseWithSFTPServer):
89
101