@@ -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)
@@ -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()