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"))