[Python-modules-commits] [dulwich] 01/02: Add patch older-git: skip worktree list test against older versions of git.
Jelmer Vernooij
jelmer at moszumanska.debian.org
Mon Dec 26 11:39:49 UTC 2016
This is an automated email from the git hooks/post-receive script.
jelmer pushed a commit to branch master
in repository dulwich.
commit e886be31f56d2b584f8631a91ca71200d7919f5d
Author: Jelmer Vernooij <jelmer at jelmer.uk>
Date: Mon Dec 26 11:24:47 2016 +0000
Add patch older-git: skip worktree list test against older versions of git.
---
debian/changelog | 7 +++++++
debian/patches/older-git | 27 +++++++++++++++++++++++++++
debian/patches/series | 1 +
dulwich/tests/compat/test_repository.py | 3 +++
4 files changed, 38 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 2ebb0ad..c49f8d7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+dulwich (0.16.1-2) UNRELEASED; urgency=medium
+
+ * Add patch older-git: skip worktree list test against older versions
+ of git.
+
+ -- Jelmer Vernooij <jelmer at debian.org> Mon, 26 Dec 2016 11:24:46 +0000
+
dulwich (0.16.1-1) unstable; urgency=medium
* New upstream release.
diff --git a/debian/patches/older-git b/debian/patches/older-git
new file mode 100644
index 0000000..1fcc204
--- /dev/null
+++ b/debian/patches/older-git
@@ -0,0 +1,27 @@
+commit cad0484f5293c8e95673ab2744680dcc977099b0
+Author: Jelmer Vernooij <jelmer at jelmer.uk>
+Date: Mon Dec 26 11:20:17 2016 +0000
+
+ Only run 'git worktree list' when it is available.
+
+diff --git a/dulwich/tests/compat/test_repository.py b/dulwich/tests/compat/test_repository.py
+index ee19ae6..c39ff84 100644
+--- a/dulwich/tests/compat/test_repository.py
++++ b/dulwich/tests/compat/test_repository.py
+@@ -34,6 +34,7 @@ from dulwich.repo import (
+ Repo,
+ )
+ from dulwich.tests.compat.utils import (
++ require_git_version,
+ rmtree_ro,
+ run_git_or_fail,
+ CompatTestCase,
+@@ -172,6 +172,8 @@ class WorkingTreeTestCase(ObjectStoreTestCase):
+ return worktrees
+
+ def test_git_worktree_list(self):
++ # 'git worktree list' was introduced in 2.7.0
++ require_git_version((2, 7, 0))
+ output = run_git_or_fail(['worktree', 'list'], cwd=self._repo.path)
+ worktrees = self._parse_worktree_list(output)
+ self.assertEqual(len(worktrees), self._number_of_working_tree)
diff --git a/debian/patches/series b/debian/patches/series
index e69de29..cdeb95e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -0,0 +1 @@
+older-git
diff --git a/dulwich/tests/compat/test_repository.py b/dulwich/tests/compat/test_repository.py
index ee19ae6..e96ad0d 100644
--- a/dulwich/tests/compat/test_repository.py
+++ b/dulwich/tests/compat/test_repository.py
@@ -34,6 +34,7 @@ from dulwich.repo import (
Repo,
)
from dulwich.tests.compat.utils import (
+ require_git_version,
rmtree_ro,
run_git_or_fail,
CompatTestCase,
@@ -172,6 +173,8 @@ class WorkingTreeTestCase(ObjectStoreTestCase):
return worktrees
def test_git_worktree_list(self):
+ # 'git worktree list' was introduced in 2.7.0
+ require_git_version((2, 7, 0))
output = run_git_or_fail(['worktree', 'list'], cwd=self._repo.path)
worktrees = self._parse_worktree_list(output)
self.assertEqual(len(worktrees), self._number_of_working_tree)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/dulwich.git
More information about the Python-modules-commits
mailing list