Explorar el Código

Skip porcelain archive test when c git is not available.

Jelmer Vernooij hace 11 años
padre
commit
041b6f6bdc
Se han modificado 2 ficheros con 5 adiciones y 0 borrados
  1. 2 0
      dulwich/porcelain.py
  2. 3 0
      dulwich/tests/test_porcelain.py

+ 2 - 0
dulwich/porcelain.py

@@ -88,6 +88,8 @@ def archive(location, committish=None, outstream=sys.stdout,
     client, path = get_transport_and_path(location)
     if committish is None:
         committish = "HEAD"
+    # TODO(jelmer): This invokes C git; this introduces a dependency.
+    # Instead, dulwich should have its own archiver implementation.
     client.archive(path, committish, outstream.write, errstream.write)
 
 

+ 3 - 0
dulwich/tests/test_porcelain.py

@@ -35,6 +35,7 @@ from dulwich.repo import Repo
 from dulwich.tests import (
     TestCase,
     )
+from dulwich.tests.compat.utils import require_git_version
 from dulwich.tests.utils import (
     build_commit_graph,
     make_object,
@@ -54,6 +55,8 @@ class ArchiveTests(PorcelainTestCase):
     """Tests for the archive command."""
 
     def test_simple(self):
+        # TODO(jelmer): Remove this once dulwich has its own implementation of archive.
+        require_git_version((1, 5, 0))
         c1, c2, c3 = build_commit_graph(self.repo.object_store, [[1], [2, 1], [3, 1, 2]])
         self.repo.refs["refs/heads/master"] = c3.id
         out = BytesIO()