Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove support for Bazaar (bzr) #505

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- uses: actions/checkout@v3

- name: Install required dpkg packages
run: sudo apt-get install libxslt1-dev bzr subversion mercurial
run: sudo apt-get install libxslt1-dev subversion mercurial

- name: Generate default locales
run: |
Expand Down
3 changes: 0 additions & 3 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ SYSCFG = /etc

CLEAN_PYFILES = \
./tar_scm.py \
./TarSCM/scm/bzr.py \
./TarSCM/scm/svn.py \
./TarSCM/exceptions.py \

Expand All @@ -23,13 +22,11 @@ CLEAN_TEST_PYFILES = \
./tests/archiveobscpiotestcases.py \
./tests/gittests.py \
./tests/fixtures.py \
./tests/bzrfixtures.py \
./tests/gitfixtures.py \
./tests/hgfixtures.py \
./tests/svnfixtures.py \
./tests/tarfixtures.py \
./tests/commontests.py \
./tests/bzrtests.py \
./tests/svntests.py \

PYLINT_READY_TEST_MODULES = \
Expand Down
2 changes: 1 addition & 1 deletion KankuFile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
use_module: Kanku::Handler::ExecuteCommandViaSSH
options:
commands:
- zypper -n in git bzr mercurial subversion make tar
- zypper -n in git mercurial subversion make tar
- zypper -n in python3-PyYAML python3-python-dateutil python3-pylint python3-flake8
-
use_module: Kanku::Handler::ExecuteCommandViaSSH
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ https://github.com/openSUSE/obs-service-tar_scm.

`tar_scm` is the legacy source service used to create a source tarball
from one of the supported SCM (source code management) tools: `git`,
`hg`, `svn`, and `bzr`.
`hg`, and `svn`.

`tar_scm` supports many options, e.g. it can adjust resulting tarball
parameters, include or exclude particular files when creating the
tarball, or generate an `rpm` changelog from the SCM commit log. For the
full list of options please see `tar_scm.service.in`.

Apart from various SCM like git, hg, bzr or svn, it additionally
supports `--url` option that allows you to specify URL of the upstream
tarball to be downloaded.
Apart from various SCM like git, hg, or svn, it additionally supports
`--url` option that allows you to specify URL of the upstream tarball to
be downloaded.

`tar_scm` can be used in combination with other services like
[download_files](https://github.com/openSUSE/obs-service-download_files),
Expand Down
12 changes: 6 additions & 6 deletions TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ development, you can provide command-line arguments:
Currently this filtering only applies to the git tests, but you can
easily tweak `test.py` to change that.

Note that for each test, a fresh `svn`/`git`/`hg`/`bzr` repository is
created, and `tar_scm` is invoked one *or more* times in a faked-up
OBS source service environment. Whenever `tar_scm` invokes the VCS
for which its functionality is being tested, through modification of
`$PATH` it actually invokes `scm-wrapper`, which logs the VCS
invocation before continuing.
Note that for each test, a fresh `svn`/`git`/`hg` repository is created,
and `tar_scm` is invoked one *or more* times in a faked-up OBS source
service environment. Whenever `tar_scm` invokes the VCS for which its
functionality is being tested, through modification of `$PATH` it
actually invokes `scm-wrapper`, which logs the VCS invocation before
continuing.

### Persistence between test runs

Expand Down
2 changes: 1 addition & 1 deletion TarSCM/archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
except:
from StringIO import StringIO

METADATA_PATTERN = re.compile(r'.*/\.(bzr|git|hg|svn)(\/.*|$)')
METADATA_PATTERN = re.compile(r'.*/\.(git|hg|svn)(\/.*|$)')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Black would make changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don’t understand: obs-service-tar_scm should be blackened? Running black . produces a massive, 7298 lines long, patch.



class BaseArchive():
Expand Down
2 changes: 1 addition & 1 deletion TarSCM/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def parse_args(self, options):
help='Enable verbose output')
parser.add_argument('--scm',
help='Specify SCM',
choices=['git', 'hg', 'bzr', 'svn', 'tar'])
choices=['git', 'hg', 'svn', 'tar'])
parser.add_argument('--url',
help='Specify URL of upstream tarball to download')
parser.add_argument('--user',
Expand Down
1 change: 0 additions & 1 deletion TarSCM/scm/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from TarSCM.scm.git import Git
from TarSCM.scm.bzr import Bzr
from TarSCM.scm.hg import Hg
from TarSCM.scm.svn import Svn
from TarSCM.scm.tar import Tar
7 changes: 1 addition & 6 deletions TarSCM/scm/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,9 @@ def __del__(self):
self._revert_gpg_settings()

def auth_url(self):
if self.scm not in ('bzr', 'git', 'hg'):
if self.scm not in ('git', 'hg'):
return
auth_patterns = {}
auth_patterns['bzr'] = {}
auth_patterns['bzr']['proto'] = r'^(ftp|bzr|https?)://.*'
auth_patterns['bzr']['already'] = r'^(ftp|bzr|https?)://.*:.*@.*'
auth_patterns['bzr']['sub'] = r'^((ftp|bzr|https?)://)(.*)'
auth_patterns['bzr']['format'] = r'\g<1>{user}:{pwd}@\g<3>'
auth_patterns['git'] = {}
auth_patterns['git']['proto'] = r'^(ftps?|https?)://.*'
auth_patterns['git']['already'] = r'^(ftps?|https?)://.*:.*@.*'
Expand Down
75 changes: 0 additions & 75 deletions TarSCM/scm/bzr.py

This file was deleted.

3 changes: 1 addition & 2 deletions TarSCM/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def generate_list(self):
job from cli arguments.
'''
args = self.args
scms = ['git', 'tar', 'svn', 'bzr', 'hg']
scms = ['git', 'tar', 'svn', 'hg']

if args.appimage:
# we read the SCM config from appimage.yml
Expand Down Expand Up @@ -194,7 +194,6 @@ def process_single_task(self, args):

scm2class = {
'git': 'Git',
'bzr': 'Bzr',
'hg': 'Hg',
'svn': 'Svn',
'tar': 'Tar',
Expand Down
4 changes: 2 additions & 2 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Homepage: https://github.com/openSUSE/obs-service-tar_scm
Package: obs-service-tar-scm
Architecture: all
Provides: obs-service-obs-scm, obs-service-tar, obs-service-gbp
Depends: ${misc:Depends}, ${python3:Depends}, python3, bzr, git, subversion, cpio, python3-dateutil, python3-yaml, locales-all
Depends: ${misc:Depends}, ${python3:Depends}, python3, git, subversion, cpio, python3-dateutil, python3-yaml, locales-all
Recommends: mercurial, git-buildpackage, git-lfs
Description: OBS source service: fetches SCM tarballs
This is a source service for openSUSE Build Service.
It supports downloading from svn, git, hg and bzr repositories.
It supports downloading from svn, git, and hg repositories.
4 changes: 2 additions & 2 deletions dist/debian.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ Build-Depends: debhelper (>= 8.0.0), python3, python3-dateutil, dh-python, pytho
Package: obs-service-tar-scm
Architecture: all
Provides: obs-service-obs-scm, obs-service-tar
Depends: ${misc:Depends}, ${python3:Depends}, python3, bzr, git, subversion, cpio, python3-dateutil, python3-yaml
Depends: ${misc:Depends}, ${python3:Depends}, python3, git, subversion, cpio, python3-dateutil, python3-yaml
Recommends: mercurial, git-buildpackage, git-lfs
Description: An OBS source service: fetches SCM tarballs
This is a source service for openSUSE Build Service.
It supports downloading from svn, git, hg and bzr repositories.
It supports downloading from svn, git, and hg repositories.

6 changes: 2 additions & 4 deletions dist/obs-service-tar_scm.spec
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ Requires: obs-service-obs_scm-common = %version-%release \
%define scm_dependencies \
Requires: git-core \
%if 0%{?suse_version} >= 1315 \
Recommends: bzr \
Recommends: mercurial \
Recommends: subversion \
Recommends: obs-service-download_files \
Expand Down Expand Up @@ -138,7 +137,6 @@ BuildRequires: %{pkg_name} = %{version}
BuildRequires: %{use_python}-keyring
BuildRequires: %{use_python}-keyrings.alt
BuildRequires: %{use_python}-six
BuildRequires: bzr
BuildRequires: gpg
BuildRequires: git-core
BuildRequires: mercurial
Expand Down Expand Up @@ -179,7 +177,7 @@ Requires: %{python_path}
%description
This is a source service for openSUSE Build Service.

It supports downloading from svn, git, hg and bzr repositories.
It supports downloading from svn, git, and hg repositories.

%package -n obs-service-obs_scm-common
Summary: Common parts of SCM handling services
Expand All @@ -194,7 +192,7 @@ Requires: %{use_python}-argparse
%description -n obs-service-obs_scm-common
This is a source service for openSUSE Build Service.

It supports downloading from svn, git, hg and bzr repositories.
It supports downloading from svn, git, and hg repositories.

This package holds the shared files for different services.

Expand Down
8 changes: 3 additions & 5 deletions tar_scm.service.in
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
===OBS_ONLY
<service name="obs_scm">
<summary>Create a special OBS archive from a SCM</summary>
<description>This service uses a SCM client to checkout or update from a given repository. Supported are svn, git, hg and bzr. The result will archived in a format which can be stored
<description>This service uses a SCM client to checkout or update from a given repository. Supported are svn, git, and hg. The result will archived in a format which can be stored
incremental by the OBS source server, currently a cpio format. This archive will be extracted again inside of the build root.</description>
===

===TAR_ONLY
<service name="tar_scm">
<summary>Create a tarball from SCM repository</summary>
<description>This service uses a SCM client to checkout or update from a given repository. Supported are svn, git, hg and bzr.</description>
<description>This service uses a SCM client to checkout or update from a given repository. Supported are svn, git, and hg.</description>
===

===GBP_ONLY
Expand All @@ -30,7 +30,6 @@
<allowedvalue>svn</allowedvalue>
<allowedvalue>git</allowedvalue>
<allowedvalue>hg</allowedvalue>
<allowedvalue>bzr</allowedvalue>
<required/>
</parameter>
<parameter name="url">
Expand All @@ -51,7 +50,6 @@
Its only available for the following combination of SCM / protocols:
- git: ftp(s),http(s)
- svn
- bzr: bzr,ftp,http(s)
- hg: http(s)
</description>
</parameter>
Expand Down Expand Up @@ -93,7 +91,7 @@
For hg, the value is passed to hg log --template=.... See the
hg documentation for more information. The default is '{rev}'

For bzr and svn, '%r' is expanded to the revision, and is the default.
For svn, '%r' is expanded to the revision, and is the default.
</description>
</parameter>
<parameter name="versionrewrite-pattern">
Expand Down
38 changes: 0 additions & 38 deletions tests/bzrfixtures.py

This file was deleted.

42 changes: 0 additions & 42 deletions tests/bzrtests.py

This file was deleted.

Loading
Loading