~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_checkout.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:
29
29
    workingtree,
30
30
    )
31
31
from bzrlib.tests.blackbox import ExternalBase
 
32
from bzrlib.tests import HardlinkFeature
32
33
 
33
34
 
34
35
class TestCheckout(ExternalBase):
142
143
        branch = _mod_branch.Branch.open('branch')
143
144
        self.run_bzr(['checkout', 'branch', 'branch2', '--files-from',
144
145
                      'branch'])
 
146
 
 
147
    def test_checkout_hardlink(self):
 
148
        self.requireFeature(HardlinkFeature)
 
149
        source = self.make_branch_and_tree('source')
 
150
        self.build_tree(['source/file1'])
 
151
        source.add('file1')
 
152
        source.commit('added file')
 
153
        self.run_bzr(['checkout', 'source', 'target', '--files-from', 'source',
 
154
                      '--hardlink'])
 
155
        source_stat = os.stat('source/file1')
 
156
        target_stat = os.stat('target/file1')
 
157
        self.assertEqual(source_stat, target_stat)