diff --git a/.gitignore b/.gitignore index c76bec7..bbbcfc6 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /vcstool-0.2.3.tar.gz /vcstool-0.2.4.tar.gz /vcstool-0.2.7.tar.gz +/vcstool-0.2.8.tar.gz diff --git a/python-vcstool-0.1.37-older_git_syntax.sed b/python-vcstool-0.1.37-older_git_syntax.sed deleted file mode 100644 index 4e0de81..0000000 --- a/python-vcstool-0.1.37-older_git_syntax.sed +++ /dev/null @@ -1,21 +0,0 @@ -s/^\( *\)git checkout -b $/\1git checkout -b new_branch_name/ -s/^(HEAD detached at \([0-9a-f\.]*\))$/(detached from \1)/ -s/^\(HEAD detached at [0-9a-f\.]*\)$/# \1/ -/^Your branch is up to date with 'origin\/.*'\.$/d -/^On branch master$/{ - N - /^On branch master\nYour branch is up to date with 'origin\/.*'\.$/{ - N - /^On branch master\nYour branch is up to date with 'origin\/.*'\.\n$/{ - N - s/^\(On branch master\)\nYour branch is up to date with 'origin\/.*'\.\n\n\(nothing to commit, working tree clean\)$/# \1\n\2/ - } - } -} -/^You are not currently on a branch\.$/{ - N - /^You are not currently on a branch\.\nPlease specify which branch you want to merge with\.$/{ - N - s/^You are not currently on a branch\.\nPlease specify which branch you want to merge with\.\nSee git-pull(1) for details\.$/You are not currently on a branch\. Please specify which\nbranch you want to merge with\. See git-pull(1) for details\./ - } -} diff --git a/python-vcstool-0.2.8-old-git-syntax.patch b/python-vcstool-0.2.8-old-git-syntax.patch new file mode 100644 index 0000000..3bcb00a --- /dev/null +++ b/python-vcstool-0.2.8-old-git-syntax.patch @@ -0,0 +1,61 @@ +From 247a7480aaa4b0d71289855f8fd8e1ae566b092b Mon Sep 17 00:00:00 2001 +From: Scott K Logan +Date: Sun, 10 May 2020 02:24:12 -0700 +Subject: [PATCH] Make tests compatible with git back to 1.8.3.1 + +--- + test/test_commands.py | 26 ++++++++++++++++++++++++-- + 1 file changed, 24 insertions(+), 2 deletions(-) + +diff --git a/test/test_commands.py b/test/test_commands.py +index 6374b3d..eff1b82 100644 +--- a/test/test_commands.py ++++ b/test/test_commands.py +@@ -92,7 +92,11 @@ def test_pull(self): + with self.assertRaises(subprocess.CalledProcessError) as e: + run_command('pull', args=['--workers', '1']) + expected = get_expected_output('pull') +- self.assertEqual(e.exception.output, expected) ++ # replace message from older git versions ++ output = e.exception.output.replace( ++ b'anch. Please specify which\nbranch you want to merge with. See', ++ b'anch.\nPlease specify which branch you want to merge with.\nSee') ++ self.assertEqual(output, expected) + + def test_pull_api(self): + try: +@@ -131,8 +135,12 @@ def test_pull_api(self): + os.chdir(cwd_bck) + + assert rc == 1 ++ # replace message from older git versions ++ output = stdout_stderr.getvalue().replace( ++ 'anch. Please specify which\nbranch you want to merge with. See', ++ 'anch.\nPlease specify which branch you want to merge with.\nSee') + expected = get_expected_output('pull').decode() +- assert stdout_stderr.getvalue() == expected ++ assert output == expected + + def test_reimport(self): + cwd_vcstool = os.path.join(TEST_WORKSPACE, 'vcstool') +@@ -261,6 +269,20 @@ def run_command(command, args=None, subfolder=None): + [sys.executable, script] + (args or []), + stderr=subprocess.STDOUT, cwd=cwd, env=env) + # replace message from older git versions ++ output = output.replace( ++ b'git checkout -b new_branch_name', ++ b'git checkout -b ') ++ output = output.replace( ++ b'(detached from ', b'(HEAD detached at ') ++ output = output.replace( ++ b"ady on 'master'\n=", ++ b"ady on 'master'\nYour branch is up-to-date with 'origin/master'.\n=") ++ output = output.replace( ++ b'# HEAD detached at ', ++ b'HEAD detached at ') ++ output = output.replace( ++ b'# On branch master', ++ b"On branch master\nYour branch is up-to-date with 'origin/master'.\n") + # the following seems to have changed between git 2.17.1 and 2.25.1 + output = output.replace( + b"Note: checking out '", b"Note: switching to '") diff --git a/python-vcstool.spec b/python-vcstool.spec index a34a23d..fcf071e 100644 --- a/python-vcstool.spec +++ b/python-vcstool.spec @@ -4,7 +4,7 @@ %global srcname vcstool Name: python-%{srcname} -Version: 0.2.7 +Version: 0.2.8 Release: 1%{?dist} Summary: Tool to invoke vcs commands on multiple repositories @@ -12,8 +12,8 @@ License: ASL 2.0 URL: https://github.com/dirk-thomas/%{srcname} Source0: https://github.com/dirk-thomas/%{srcname}/archive/%{version}/%{srcname}-%{version}.tar.gz -# Used only for testing -Source1: %{name}-0.1.37-older_git_syntax.sed +# Submitted upstream as dirk-thomas/vcstool#138 +Patch0: %{name}-0.2.8-old-git-syntax.patch BuildArch: noarch @@ -108,11 +108,6 @@ The biggest differences between the two are: %prep %autosetup -p1 -n %{srcname}-%{version} -%if 0%{?rhel} && 0%{?rhel} < 8 -# Test case touch-ups for older git versions -sed -i -f %{SOURCE1} test/*.txt -%endif - %build %if 0%{?with_python2} @@ -214,6 +209,9 @@ ln -s vcs %{buildroot}%{_datadir}/bash-completion/completions/vcs-%{python3_vers %changelog +* Sun May 10 2020 Scott K Logan - 0.2.8-1 +- Update to 0.2.8 (rhbz#1833742) + * Wed Apr 15 2020 Scott K Logan - 0.2.7-1 - Update to 0.2.7 (rhbz#1787844) diff --git a/sources b/sources index 68ac4f2..088d874 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (vcstool-0.2.7.tar.gz) = 5b55b19531ba4e1761f95ed067b71f56c893abfdd8c3525ae3e2919d54f6cc4a4409a0522df983a7ba69c5d62d8d5cb6108f89bb8740e34b20db020dabf0283d +SHA512 (vcstool-0.2.8.tar.gz) = 251acbfe6122206b0ececb5306b963eec9089c20aac39da8ff0ab7f5b0512d56a153636731f376014912df9d06126392bac9a0fcdaa992938e83e270991afa3f