~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_transform.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-11-18 22:03:00 UTC
  • mfrom: (4807.2.6 2.1.0b4-win32-accepted)
  • Revision ID: pqm@pqm.ubuntu.com-20091118220300-jh43xy7xqftziwql
(jam) Last few tweaks to get the win32 test suite to pass.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1951
1951
        branch, tt = self.get_branch_and_transform()
1952
1952
        tt.new_file('file', tt.root, 'contents', 'file-id')
1953
1953
        trans_id = tt.new_directory('dir', tt.root, 'dir-id')
1954
 
        tt.new_symlink('symlink', trans_id, 'target', 'symlink-id')
 
1954
        if SymlinkFeature.available():
 
1955
            tt.new_symlink('symlink', trans_id, 'target', 'symlink-id')
1955
1956
        rev = tt.commit(branch, 'message')
1956
1957
        tree = branch.basis_tree()
1957
1958
        self.assertEqual('file', tree.id2path('file-id'))
1958
1959
        self.assertEqual('contents', tree.get_file_text('file-id'))
1959
1960
        self.assertEqual('dir', tree.id2path('dir-id'))
1960
 
        self.assertEqual('dir/symlink', tree.id2path('symlink-id'))
1961
 
        self.assertEqual('target', tree.get_symlink_target('symlink-id'))
 
1961
        if SymlinkFeature.available():
 
1962
            self.assertEqual('dir/symlink', tree.id2path('symlink-id'))
 
1963
            self.assertEqual('target', tree.get_symlink_target('symlink-id'))
1962
1964
 
1963
1965
    def test_add_unversioned(self):
1964
1966
        branch, tt = self.get_branch_and_transform()
2454
2456
        self.assertEqual(('missing', None, None, None), summary)
2455
2457
 
2456
2458
    def test_file_content_summary_executable(self):
2457
 
        if not osutils.supports_executable():
2458
 
            raise TestNotApplicable()
2459
2459
        preview = self.get_empty_preview()
2460
2460
        path_id = preview.new_file('path', preview.root, 'contents', 'path-id')
2461
2461
        preview.set_executability(True, path_id)
2754
2754
        branch = self.make_branch('any')
2755
2755
        tree = branch.repository.revision_tree(_mod_revision.NULL_REVISION)
2756
2756
        tt = TransformPreview(tree)
 
2757
        self.addCleanup(tt.finalize)
2757
2758
        foo_id = tt.new_directory('', ROOT_PARENT)
2758
2759
        bar_id = tt.new_file(u'\u1234bar', foo_id, 'contents')
2759
2760
        limbo_path = tt._limbo_name(bar_id)