Esempio n. 1
0
    def test_symlink(self):
        tree = self.make_svn_branch_and_tree("d", "dc")

        dc = self.get_commit_editor(tree.branch.base)
        file = dc.add_file("file")
        file.modify(b"link target")
        file.change_prop("svn:special", "*")
        dc.close()

        self.client_update("dc")
        tree = SvnBasisTree(tree)
        self.assertEqual('symlink', tree.kind("file"))
        self.assertEqual("target", tree.get_symlink_target("file"))
Esempio n. 2
0
    def test_symlink_with_newlines_in_target(self):
        repos_url = self.make_client("d", "dc")

        dc = self.get_commit_editor(repos_url)
        file = dc.add_file("file")
        file.modify(b"link target\nbar\nbla")
        file.change_prop("svn:special", "*")
        dc.close()

        self.client_update("dc")
        tree = SvnBasisTree(WorkingTree.open("dc"))
        self.assertEqual('symlink', tree.kind("file"))
        self.assertEqual("target\nbar\nbla", tree.get_symlink_target("file"))
Esempio n. 3
0
    def test_symlink_not_special(self):
        tree = self.make_svn_branch_and_tree("d", "dc")

        dc = self.get_commit_editor(tree.branch.base)
        file1 = dc.add_file("file")
        file1.modify(b"fsdfdslhfdsk h")
        file1.change_prop("svn:special", "*")
        file2 = dc.add_file("file2")
        file2.modify(b"a")
        file2.change_prop("svn:special", "*")
        dc.close()

        try:
            self.client_update("dc")
        except subvertpy.SubversionException as e:
            if e.args[1] == subvertpy.ERR_WC_BAD_ADM_LOG:
                raise TestSkipped("Unable to run test with svn 1.4")
            raise
        tree = SvnBasisTree(tree)
        self.assertEqual('file', tree.kind("file"))