From 0948df012fc4c20166549eb7f2be758a704c6aa7 Mon Sep 17 00:00:00 2001 From: Julien Enselme Date: Oct 27 2014 13:32:46 +0000 Subject: Update to 1.0.1 --- diff --git a/.gitignore b/.gitignore index 404b358..fe21843 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ /gitapi-1.0.0.tar.gz +/gitapi-1.1.0.tar.gz +/gitapi-1.0.1.tar.gz diff --git a/LICENSE b/LICENSE index e43d482..2e4931f 100644 --- a/LICENSE +++ b/LICENSE @@ -1,20 +1,18 @@ -+++ LICENSE 2014-08-29 21:30:05.147827489 +0200 -@@ -0,0 +1,18 @@ -+Copyright (c) 2011, Fredrik Håård -+ -+Permission is hereby granted, free of charge, to any person obtaining a copy of -+this software and associated documentation files (the "Software"), to deal in -+the Software without restriction, including without limitation the rights to -+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -+the Software, and to permit persons to whom the Software is furnished to do so, -+subject to the following conditions: -+ -+The above copyright notice and this permission notice shall be included in all -+copies or substantial portions of the Software. -+ -+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +Copyright (c) 2011, Fredrik Håård + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/python-gitapi-1.0.0-import.patch b/python-gitapi-1.0.0-import.patch deleted file mode 100644 index 05ad01a..0000000 --- a/python-gitapi-1.0.0-import.patch +++ /dev/null @@ -1,8 +0,0 @@ ---- gitapi/__init__.py 2014-08-03 19:16:01.357919640 +0200 -+++ gitapi/__init__.py 2014-08-03 19:16:15.399067535 +0200 -@@ -1,4 +1,4 @@ - """Python API to Git - """ --import gitapi.gitapi as _gitapi -+from . import gitapi as _gitapi - Repo = _gitapi.Repo diff --git a/python-gitapi-1.0.0-test-suite.patch b/python-gitapi-1.0.0-test-suite.patch deleted file mode 100644 index ef8ff5e..0000000 --- a/python-gitapi-1.0.0-test-suite.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- a/gitapi/testgitapi.py 2013-09-05 15:05:25.000000000 +0200 -+++ b/gitapi/testgitapi.py 2014-08-14 10:30:20.406218981 +0200 -@@ -48,6 +48,9 @@ class TestGitAPI(unittest.TestCase): - def test_005_Init(self): - self.repo.git_init() - self.assertTrue(os.path.exists("test/.git")) -+ # Configure a default user to avoid the 'Please tell me who you are.' error. -+ self.repo.git_command('config', 'user.email', 'test@example.com') -+ self.repo.git_command('config', 'user.name', 'Testuser') - - - def test_020_Add(self): -@@ -210,6 +213,10 @@ class TestGitAPI(unittest.TestCase): - with open("./test-clone/cities/ghent.txt", "w") as out: - out.write("gent") - self.clone.git_add('cities') -+ # Configure a default user -+ self.clone.git_command('config', 'user.email', 'test@example.com') -+ self.clone.git_command('config', 'user.name', 'Testuser') -+ # Commit - message = "[CLONE] Added one file." - self.clone.git_commit(message) - self.clone.git_push("../test-clone-bare") diff --git a/python-gitapi-1.0.1-test-suite.patch b/python-gitapi-1.0.1-test-suite.patch new file mode 100644 index 0000000..bbc914c --- /dev/null +++ b/python-gitapi-1.0.1-test-suite.patch @@ -0,0 +1,137 @@ +--- a/gitapi/testgitapi.py 2014-10-08 10:31:47.000000000 +0200 ++++ b/gitapi/testgitapi.py 2014-10-27 14:23:40.171263301 +0100 +@@ -48,13 +48,16 @@ + def test_005_Init(self): + self.repo.git_init() + self.assertTrue(os.path.exists("test/.git")) ++ # Configure a default user to avoid the 'Please tell me who you are.' error. ++ self.repo.git_command('config', 'user.email', 'test@example.com') ++ self.repo.git_command('config', 'user.name', 'Testuser') + + + def test_020_Add(self): + with open("test/file.txt", "w") as out: + out.write("stuff") + self.repo.git_add("file.txt") +- ++ + def test_030_Commit(self): + #Commit and check that we're on a real revision + self.repo.git_commit("adding", user="test ") +@@ -81,7 +84,7 @@ + + def test_050_Checkout(self): + node = self.repo.git_id() +- ++ + self.repo.git_checkout('HEAD~1') + self.assertNotEquals(self.repo.git_id(), node) + self.repo.git_checkout(node) +@@ -96,32 +99,32 @@ + ("test.stuff.list", "one two three")): + self.repo.git_command("config", key, value) + #re-read config +- self.repo.read_config() ++ self.repo.read_config() + self.assertEquals(self.repo.config('test', 'stuff.otherstuff'), + "tsosvalue") + + def test_071_ConfigBool(self): + self.assertTrue(self.repo.configbool('test', 'stuff.debug')) + self.assertFalse(self.repo.configbool('test', 'stuff.verbose')) +- ++ + def test_072_ConfigList(self): + self.assertTrue(self.repo.configlist('test', 'stuff.list'), + ["one", "two", "three"]) +- ++ + + def test_090_ModifiedStatus(self): + #write some more to file + with open("test/file.txt", "a") as out: + out.write("stuff stuff stuff") + status = self.repo.git_status() +- self.assertEquals(status, ++ self.assertEquals(status, + {'M': ['file.txt']}) +- ++ + def test_100_CleanStatus(self): + #commit file created in 090 + self.repo.git_commit("Comitting changes", user="Test ") + #Assert status is empty +- self.assertEquals(self.repo.git_status(), ++ self.assertEquals(self.repo.git_status(), + {}) + + def test_110_UntrackedStatus(self): +@@ -129,14 +132,14 @@ + with open("test/file2.txt", "w") as out: + out.write("stuff stuff stuff") + status = self.repo.git_status() +- self.assertEquals(status, ++ self.assertEquals(status, + {'??': ['file2.txt']}) + + def test_120_AddedStatus(self): + #Add file created in 110 + self.repo.git_add("file2.txt") + status = self.repo.git_status() +- self.assertEquals(status, ++ self.assertEquals(status, + {'A': ['file2.txt']}) + + def test_130_MissingStatus(self): +@@ -145,14 +148,14 @@ + import os + os.unlink("test/file2.txt") + status = self.repo.git_status() +- self.assertEquals(status, ++ self.assertEquals(status, + {'D': ['file2.txt']}) + + def test_140_RemovedStatus(self): + #Remove file from repo + self.repo.git_remove("file2.txt") + status = self.repo.git_status() +- self.assertEquals(status, ++ self.assertEquals(status, + {'D': ['file2.txt']}) + + def test_140_EmptyStatus(self): +@@ -163,7 +166,7 @@ + def test_150_ForkAndMerge(self): + #Store this version + node = self.repo.git_id() +- ++ + #creates new branch + self.repo.git_branch("test", "HEAD~2") + self.repo.git_checkout("test") +@@ -210,6 +213,10 @@ + with open("./test-clone/cities/ghent.txt", "w") as out: + out.write("gent") + self.clone.git_add('cities') ++ # Configure a default user to avoid the 'Please tell me who you are.' error. ++ self.clone.git_command('config', 'user.email', 'test@example.com') ++ self.clone.git_command('config', 'user.name', 'Testuser') ++ # Commit + message = "[CLONE] Added one file." + self.clone.git_commit(message) + self.clone.git_push("../test-clone-bare", branch="master") +@@ -217,7 +224,7 @@ + self.assertEquals(self.clone.git_id(), self.bareclone.git_id()) + # check summary of pushed tip + self.assertTrue(message in self.bareclone.git_log(identifier="HEAD")) +- ++ + + def test_doc(): + #Prepare for doctest +@@ -237,4 +244,4 @@ + test_doc() + finally: + unittest.main() +- ++ diff --git a/python-gitapi.spec b/python-gitapi.spec index 69c5599..4845ee0 100644 --- a/python-gitapi.spec +++ b/python-gitapi.spec @@ -1,6 +1,6 @@ Name: python-gitapi -Version: 1.0.0 -Release: 5%{?dist} +Version: 1.0.1 +Release: 1%{?dist} Summary: Pure-Python API to git, which uses the command-line interface License: MIT @@ -9,10 +9,8 @@ Source0: https://pypi.python.org/packages/source/g/gitapi/gitapi-%{versio # Ask upstream to include license in a separate file here: # https://bitbucket.org/haard/gitapi/issue/3/include-the-license-in-a-separate-file Source1: LICENSE -# Correct an import error in the test suite (solved upstreamed). -Patch0: python-gitapi-%{version}-import.patch # Avoid the 'Please tell me who you are.' git error during mock tests. -Patch1: python-gitapi-%{version}-test-suite.patch +Patch0: python-gitapi-%{version}-test-suite.patch BuildArch: noarch BuildRequires: python2-devel python-setuptools git @@ -35,10 +33,8 @@ cp %{SOURCE1} . # Remove egg rm -r gitapi.egg-info # Apply patches -sed -i 's/\r$//' gitapi/__init__.py -%patch0 sed -i 's/\r$//' gitapi/testgitapi.py -%patch1 -p1 +%patch0 -p1 # Correct end of line encoding for README.rst sed -i 's/\r$//' README.rst # Prep python3 @@ -80,6 +76,9 @@ popd %{python3_sitelib}/gitapi/ %changelog +* Mon Oct 27 2014 Julien Enselme - 1.0.1-1 +- Update to 1.0.1 + * Mon Oct 27 2014 Julien Enselme - 1.0.0-5 - Add license as source and not as patch. - Use %%{version} tag in patch. diff --git a/sources b/sources index e285ae7..7b37ef4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f645609bf005efcef37edeeddf6b0566 gitapi-1.0.0.tar.gz +0a2537a2f66abbaa91c2ab803774d2d0 gitapi-1.0.1.tar.gz