~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Andrew Bennetts
  • Date: 2009-08-05 02:37:11 UTC
  • mfrom: (4589 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4608.
  • Revision ID: andrew.bennetts@canonical.com-20090805023711-1mu01azkgbrw4fl1
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
from bzrlib import (branch, bzrdir, errors, repository)
23
23
from bzrlib.repofmt.knitrepo import RepositoryFormatKnit1
24
24
from bzrlib.tests.blackbox import ExternalBase
25
 
from bzrlib.tests import HardlinkFeature
 
25
from bzrlib.tests import (
 
26
    KnownFailure,
 
27
    HardlinkFeature,
 
28
    )
26
29
from bzrlib.tests.test_sftp_transport import TestCaseWithSFTPServer
27
30
from bzrlib.urlutils import local_path_to_url, strip_trailing_slash
28
31
from bzrlib.workingtree import WorkingTree
93
96
        self.build_tree(['source/file1'])
94
97
        source.add('file1')
95
98
        source.commit('added file')
96
 
        self.run_bzr(['branch', 'source', 'target', '--hardlink'])
 
99
        out, err = self.run_bzr(['branch', 'source', 'target', '--hardlink'])
97
100
        source_stat = os.stat('source/file1')
98
101
        target_stat = os.stat('target/file1')
99
 
        self.assertEqual(source_stat, target_stat)
 
102
        same_file = (source_stat == target_stat)
 
103
        if same_file:
 
104
            pass
 
105
        else:
 
106
            # https://bugs.edge.launchpad.net/bzr/+bug/408193
 
107
            self.assertContainsRe(err, "hardlinking working copy files is "
 
108
                "not currently supported")
 
109
            raise KnownFailure("--hardlink doesn't work in formats "
 
110
                "that support content filtering (#408193)")
100
111
 
101
112
    def test_branch_standalone(self):
102
113
        shared_repo = self.make_repository('repo', shared=True)