~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-02-24 19:15:21 UTC
  • mfrom: (3136.1.11 hardlinks2)
  • Revision ID: pqm@pqm.ubuntu.com-20080224191521-mrdhiyn59r5q2z6l
Add hardlink support to checkout and branch (abentley)

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