Exemplo n.º 1
0
 def __init__(self):
     from dulwich.config import ConfigFile
     self._reflog = []
     refs_container = DictRefsContainer({}, logger=self._append_reflog)
     BaseRepo.__init__(self, MemoryObjectStore(), refs_container)
     self._named_files = {}
     self.bare = True
     self._config = ConfigFile()
     self._description = None
Exemplo n.º 2
0
class DictRefsContainerTests(RefsContainerTests, TestCase):
    def setUp(self):
        TestCase.setUp(self)
        self._refs = DictRefsContainer(dict(_TEST_REFS))

    def test_invalid_refname(self):
        # FIXME: Move this test into RefsContainerTests, but requires
        # some way of injecting invalid refs.
        self._refs._refs[b'refs/stash'] = b'00' * 20
        expected_refs = dict(_TEST_REFS)
        expected_refs[b'refs/stash'] = b'00' * 20
        self.assertEqual(expected_refs, self._refs.as_dict())
Exemplo n.º 3
0
class DictRefsContainerTests(RefsContainerTests, TestCase):
    def setUp(self):
        TestCase.setUp(self)
        self._refs = DictRefsContainer(dict(_TEST_REFS))

    def test_invalid_refname(self):
        # FIXME: Move this test into RefsContainerTests, but requires
        # some way of injecting invalid refs.
        self._refs._refs[b"refs/stash"] = b"00" * 20
        expected_refs = dict(_TEST_REFS)
        expected_refs[b"refs/stash"] = b"00" * 20
        self.assertEqual(expected_refs, self._refs.as_dict())
Exemplo n.º 4
0
 def setUp(self):
     TestCase.setUp(self)
     self._refs = DictRefsContainer(dict(_TEST_REFS))
Exemplo n.º 5
0
 def setUp(self):
     TestCase.setUp(self)
     self._refs = DictRefsContainer(dict(_TEST_REFS))
Exemplo n.º 6
0
 def __init__(self):
     from dulwich.config import ConfigFile
     BaseRepo.__init__(self, MemoryObjectStore(), DictRefsContainer({}))
     self._named_files = {}
     self.bare = True
     self._config = ConfigFile()
Exemplo n.º 7
0
Arquivo: repo.py Projeto: zbal/dulwich
 def __init__(self):
     BaseRepo.__init__(self, MemoryObjectStore(), DictRefsContainer({}))
     self._named_files = {}
     self.bare = True