Compare commits

...
Sign in to create a new pull request.

4 commits

Author SHA1 Message Date
Scott K Logan
55c40014b3 Update to 0.2.8 2020-05-10 02:42:31 -07:00
Scott K Logan
569c36b6c2 Update to 0.2.7 2020-04-15 13:35:39 -07:00
Scott K Logan
c574c045b8 Update to 0.2.4 2019-10-30 12:40:21 -07:00
Scott K Logan
d20b1f4d7f Update to 0.2.3 2019-08-08 16:42:42 -07:00
5 changed files with 101 additions and 50 deletions

4
.gitignore vendored
View file

@ -2,3 +2,7 @@
/vcstool-0.1.40.tar.gz
/vcstool-0.2.1.tar.gz
/vcstool-0.2.2.tar.gz
/vcstool-0.2.3.tar.gz
/vcstool-0.2.4.tar.gz
/vcstool-0.2.7.tar.gz
/vcstool-0.2.8.tar.gz

View file

@ -1,21 +0,0 @@
s/^\( *\)git checkout -b <new-branch-name>$/\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\./
}
}

View file

@ -0,0 +1,61 @@
From 247a7480aaa4b0d71289855f8fd8e1ae566b092b Mon Sep 17 00:00:00 2001
From: Scott K Logan <logans@cottsay.net>
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 <new-branch-name>')
+ 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 '")

View file

@ -1,10 +1,10 @@
%{?!_without_python2:%global with_python2 0%{?_with_python2:1} || (0%{?fedora} < 30 && 0%{?rhel} < 8)}
%{?!_without_python2:%global with_python2 0%{?_with_python2:1} || !(0%{?fedora} >= 30 || 0%{?rhel} >= 8)}
%{?!_without_python3:%global with_python3 0%{?_with_python3:1} || !0%{?rhel} || 0%{?rhel} >= 7}
%global srcname vcstool
Name: python-%{srcname}
Version: 0.2.2
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
@ -43,14 +43,14 @@ BuildRequires: python2-pyyaml
BuildRequires: python2-setuptools
%{?python_provide:%python_provide python2-%{srcname}}
%if %{undefined python_disable_dependency_generator}
%if %{undefined __pythondist_requires}
Requires: python2-pyyaml
Requires: python2-setuptools
%endif # python_disable_dependency_generator
%endif
%if 0%{?fedora}
%if !0%{?rhel} || 0%{?rhel} >= 8
Recommends: git
%endif # fedora
%endif
%description -n python2-%{srcname}
Vcstool is a version control system (VCS) tool, designed to make working with
@ -66,7 +66,7 @@ The biggest differences between the two are:
as keys in YAML which avoids collisions by design.
- vcstool has significantly less lines of code than vcstools including the
command line tools built on top.
%endif # with_python2
%endif
%if 0%{?with_python3}
@ -79,14 +79,14 @@ BuildRequires: python%{python3_pkgversion}-PyYAML
BuildRequires: python%{python3_pkgversion}-setuptools
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
%if %{undefined python_disable_dependency_generator}
%if %{undefined __pythondist_requires}
Requires: python%{python3_pkgversion}-PyYAML
Requires: python%{python3_pkgversion}-setuptools
%endif # python_disable_dependency_generator
%endif
%if 0%{?fedora}
%if !0%{?rhel} || 0%{?rhel} >= 8
Recommends: git
%endif # fedora
%endif
%description -n python%{python3_pkgversion}-%{srcname}
Vcstool is a version control system (VCS) tool, designed to make working with
@ -102,26 +102,21 @@ The biggest differences between the two are:
as keys in YAML which avoids collisions by design.
- vcstool has significantly less lines of code than vcstools including the
command line tools built on top.
%endif # with_python3
%endif
%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}
%py2_build
%endif # with_python2
%endif
%if 0%{?with_python3}
%py3_build
%endif # with_python3
%endif
%install
@ -142,7 +137,7 @@ for f in `ls %{buildroot}%{_bindir}2`; do
%if !(0%{?with_python3})
ln -s $f-%{python2_version} %{buildroot}%{_bindir}/$f
echo "%{_bindir}/$f" >> py2_bins
%endif # with_python3
%endif
echo -e "%{_bindir}/$f-2\n%{_bindir}/$f-%{python2_version}" >> py2_bins
done
@ -150,7 +145,7 @@ done
cp -f %{buildroot}%{_datadir}/%{srcname}-completion/vcs.bash %{buildroot}%{_datadir}/bash-completion/completions/vcs
ln -sf vcs %{buildroot}%{_datadir}/bash-completion/completions/vcs-2
ln -s vcs %{buildroot}%{_datadir}/bash-completion/completions/vcs-%{python2_version}
%endif # with_python2
%endif
%if 0%{?with_python3}
%py3_install -- --install-scripts %{_bindir}%{python3_pkgversion}
@ -167,7 +162,7 @@ done
cp -f %{buildroot}%{_datadir}/%{srcname}-completion/vcs.bash %{buildroot}%{_datadir}/bash-completion/completions/vcs
ln -sf vcs %{buildroot}%{_datadir}/bash-completion/completions/vcs-3
ln -s vcs %{buildroot}%{_datadir}/bash-completion/completions/vcs-%{python3_version}
%endif # with_python3
%endif
%check
@ -181,11 +176,11 @@ ln -s vcs %{buildroot}%{_datadir}/bash-completion/completions/vcs-%{python3_vers
%if 0%{?with_python2}
%{__python2} -m pytest %pytest_options
%endif # with_python2
%endif
%if 0%{?with_python3}
%{__python3} -m pytest %pytest_options
%endif # with_python3
%endif
%if 0%{?with_python2}
@ -198,7 +193,7 @@ ln -s vcs %{buildroot}%{_datadir}/bash-completion/completions/vcs-%{python3_vers
%{_datadir}/bash-completion/completions/vcs
%{_datadir}/bash-completion/completions/vcs-2
%{_datadir}/bash-completion/completions/vcs-%{python2_version}
%endif # with_python2
%endif
%if 0%{?with_python3}
%files -n python%{python3_pkgversion}-%{srcname} -f py3_bins
@ -210,10 +205,22 @@ ln -s vcs %{buildroot}%{_datadir}/bash-completion/completions/vcs-%{python3_vers
%{_datadir}/bash-completion/completions/vcs
%{_datadir}/bash-completion/completions/vcs-3
%{_datadir}/bash-completion/completions/vcs-%{python3_version}
%endif # with_python3
%endif
%changelog
* Sun May 10 2020 Scott K Logan <logans@cottsay.net> - 0.2.8-1
- Update to 0.2.8 (rhbz#1833742)
* Wed Apr 15 2020 Scott K Logan <logans@cottsay.net> - 0.2.7-1
- Update to 0.2.7 (rhbz#1787844)
* Wed Oct 30 2019 Scott K Logan <logans@cottsay.net> - 0.2.4-1
- Update to 0.2.4 (rhbz#1764143)
* Thu Aug 08 2019 Scott K Logan <logans@cottsay.net> - 0.2.3-1
- Update to 0.2.3
* Wed Jul 17 2019 Scott K Logan <logans@cottsay.net> - 0.2.2-1
- Update to 0.2.2

View file

@ -1 +1 @@
SHA512 (vcstool-0.2.2.tar.gz) = d4a22b7df55b6948e870174f75007e127592991a03c2ec5709600e60c3cde250bdad1b34001e63e22847b2d3a6158678a05ae6f5a39f70c16762f3f651bb092f
SHA512 (vcstool-0.2.8.tar.gz) = 251acbfe6122206b0ececb5306b963eec9089c20aac39da8ff0ab7f5b0512d56a153636731f376014912df9d06126392bac9a0fcdaa992938e83e270991afa3f