Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package obs-service-tar_scm for
openSUSE:Factory checked in at 2021-06-18 10:13:31
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/obs-service-tar_scm (Old)
and /work/SRC/openSUSE:Factory/.obs-service-tar_scm.new.2625 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "obs-service-tar_scm"
Fri Jun 18 10:13:31 2021 rev:66 rq:900210 version:0.10.26.1623775884.87f49a8
Changes:
--------
--- /work/SRC/openSUSE:Factory/obs-service-tar_scm/obs-service-tar_scm.changes
2021-03-16 15:45:27.089137730 +0100
+++
/work/SRC/openSUSE:Factory/.obs-service-tar_scm.new.2625/obs-service-tar_scm.changes
2021-06-18 10:13:40.569985512 +0200
@@ -1,0 +2,22 @@
+Tue Jun 15 17:02:19 UTC 2021 - [email protected]
+
+- Update to version 0.10.26.1623775884.87f49a8:
+ * fixed include/exclude filtering
+ * add '--' to git log command if file/dir equal revision exists
+ * add '--source' to git log command
+ * disabled consider-using-with in .pylint*rc
+ * package .gitignore files
+ * Fix version _none_ generate tarball with '-'
+ * Prevent KeyError in check_for_branch_request method
+ * removed skipped test case (obsolete since 5 yrs)
+ * testing for obscpio/obsinfo
+ * fix regression - obsinfo included the version string
+ * Revert "remove useless variables"
+ * remove useless variables
+ * added param --without-version
+ * extracted dstname to _dstname
+ * cleanup TarSCM/tasks.py for pylint
+ * add date/time to logging output for better debugging
+ * Fix typos
+
+-------------------------------------------------------------------
Old:
----
obs-service-tar_scm-0.10.22.1615538418.07a353d.tar.gz
New:
----
obs-service-tar_scm-0.10.26.1623775884.87f49a8.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ obs-service-tar_scm.spec ++++++
--- /var/tmp/diff_new_pack.zizgiX/_old 2021-06-18 10:13:41.473986707 +0200
+++ /var/tmp/diff_new_pack.zizgiX/_new 2021-06-18 10:13:41.477986712 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package obs-service-tar_scm-test
+# spec file
#
# Copyright (c) 2021 SUSE LLC
#
@@ -111,8 +111,8 @@
%define pkg_name obs-service-tar_scm
Name: %{pkg_name}%{nsuffix}
-%define version_unconverted 0.10.22.1615538418.07a353d
-Version: 0.10.22.1615538418.07a353d
+%define version_unconverted 0.10.26.1623775884.87f49a8
+Version: 0.10.26.1623775884.87f49a8
Release: 0
Summary: An OBS source service: create tar ball from svn/git/hg
License: GPL-2.0-or-later
++++++ PKGBUILD ++++++
--- /var/tmp/diff_new_pack.zizgiX/_old 2021-06-18 10:13:41.509986755 +0200
+++ /var/tmp/diff_new_pack.zizgiX/_new 2021-06-18 10:13:41.509986755 +0200
@@ -1,5 +1,5 @@
pkgname=obs-service-tar_scm
-pkgver=0.10.22.1615538418.07a353d
+pkgver=0.10.26.1623775884.87f49a8
pkgrel=0
pkgdesc="Source Service for the OpenSUSE Build Service (OBS)"
arch=('any')
++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.zizgiX/_old 2021-06-18 10:13:41.553986813 +0200
+++ /var/tmp/diff_new_pack.zizgiX/_new 2021-06-18 10:13:41.553986813 +0200
@@ -7,4 +7,4 @@
<param
name="changesrevision">9e8b88b088778c44db56781e6a908a0e82e27cf2</param></service>
<service name="tar_scm">
<param
name="url">git://github.com/openSUSE/obs-service-tar_scm.git</param>
- <param
name="changesrevision">dfdb887643e27ed956ece3a57701ff97aa6f9d35</param></service></servicedata>
\ No newline at end of file
+ <param
name="changesrevision">c7c1213693de8ac641c9802f260df8559467c37f</param></service></servicedata>
\ No newline at end of file
++++++ debian.dsc ++++++
--- /var/tmp/diff_new_pack.zizgiX/_old 2021-06-18 10:13:41.569986834 +0200
+++ /var/tmp/diff_new_pack.zizgiX/_new 2021-06-18 10:13:41.573986839 +0200
@@ -1,6 +1,6 @@
Format: 1.0
Source: obs-service-tar-scm
-Version: 0.10.22.1615538418.07a353d
+Version: 0.10.26.1623775884.87f49a8
Provides: obs-service-obs_scm, obs-service-tar
Binary: obs-service-tar_scm
Maintainer: Adrian Schroeter <[email protected]>
++++++ obs-service-tar_scm-0.10.22.1615538418.07a353d.tar.gz ->
obs-service-tar_scm-0.10.26.1623775884.87f49a8.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/.pylintrc
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/.pylintrc
--- old/obs-service-tar_scm-0.10.22.1615538418.07a353d/.pylintrc
2021-03-12 09:40:18.000000000 +0100
+++ new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/.pylintrc
2021-06-15 18:51:24.000000000 +0200
@@ -84,7 +84,7 @@
# a feature request to improve pylint in this respect:
# https://github.com/PyCQA/pylint/issues/246
-disable=import-star-module-level,old-octal-literal,oct-method,print-statement,unpacking-in-except,parameter-unpacking,backtick,old-raise-syntax,old-ne-operator,long-suffix,dict-view-method,dict-iter-method,metaclass-assignment,next-method-called,raising-string,indexing-exception,raw_input-builtin,long-builtin,file-builtin,execfile-builtin,coerce-builtin,cmp-builtin,buffer-builtin,basestring-builtin,apply-builtin,filter-builtin-not-iterating,using-cmp-argument,useless-suppression,range-builtin-not-iterating,suppressed-message,no-absolute-import,old-division,cmp-method,reload-builtin,zip-builtin-not-iterating,intern-builtin,unichr-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,input-builtin,round-builtin,hex-method,nonzero-method,map-builtin-not-iterating,missing-docstring,old-style-class,bad-whitespace
+disable=import-star-module-level,old-octal-literal,oct-method,print-statement,unpacking-in-except,parameter-unpacking,backtick,old-raise-syntax,old-ne-operator,long-suffix,dict-view-method,dict-iter-method,metaclass-assignment,next-method-called,raising-string,indexing-exception,raw_input-builtin,long-builtin,file-builtin,execfile-builtin,coerce-builtin,cmp-builtin,buffer-builtin,basestring-builtin,apply-builtin,filter-builtin-not-iterating,using-cmp-argument,useless-suppression,range-builtin-not-iterating,suppressed-message,no-absolute-import,old-division,cmp-method,reload-builtin,zip-builtin-not-iterating,intern-builtin,unichr-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,input-builtin,round-builtin,hex-method,nonzero-method,map-builtin-not-iterating,missing-docstring,old-style-class,bad-whitespace,consider-using-with
[REPORTS]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/.pylinttestsrc
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/.pylinttestsrc
--- old/obs-service-tar_scm-0.10.22.1615538418.07a353d/.pylinttestsrc
2021-03-12 09:40:18.000000000 +0100
+++ new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/.pylinttestsrc
2021-06-15 18:51:24.000000000 +0200
@@ -84,7 +84,7 @@
# a feature request to improve pylint in this respect:
# https://github.com/PyCQA/pylint/issues/246
-disable=import-star-module-level,old-octal-literal,oct-method,print-statement,unpacking-in-except,parameter-unpacking,backtick,old-raise-syntax,old-ne-operator,long-suffix,dict-view-method,dict-iter-method,metaclass-assignment,next-method-called,raising-string,indexing-exception,raw_input-builtin,long-builtin,file-builtin,execfile-builtin,coerce-builtin,cmp-builtin,buffer-builtin,basestring-builtin,apply-builtin,filter-builtin-not-iterating,using-cmp-argument,useless-suppression,range-builtin-not-iterating,suppressed-message,no-absolute-import,old-division,cmp-method,reload-builtin,zip-builtin-not-iterating,intern-builtin,unichr-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,input-builtin,round-builtin,hex-method,nonzero-method,map-builtin-not-iterating,missing-docstring,old-style-class,bad-whitespace,duplicate-code,too-many-public-methods
+disable=import-star-module-level,old-octal-literal,oct-method,print-statement,unpacking-in-except,parameter-unpacking,backtick,old-raise-syntax,old-ne-operator,long-suffix,dict-view-method,dict-iter-method,metaclass-assignment,next-method-called,raising-string,indexing-exception,raw_input-builtin,long-builtin,file-builtin,execfile-builtin,coerce-builtin,cmp-builtin,buffer-builtin,basestring-builtin,apply-builtin,filter-builtin-not-iterating,using-cmp-argument,useless-suppression,range-builtin-not-iterating,suppressed-message,no-absolute-import,old-division,cmp-method,reload-builtin,zip-builtin-not-iterating,intern-builtin,unichr-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,input-builtin,round-builtin,hex-method,nonzero-method,map-builtin-not-iterating,missing-docstring,old-style-class,bad-whitespace,duplicate-code,too-many-public-methods,protected-access,too-many-locals,consider-using-with
[REPORTS]
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/TarSCM/__init__.pyc and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/TarSCM/__init__.pyc differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/TarSCM/__pycache__/__init__.cpython-38.pyc
and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/TarSCM/__pycache__/__init__.cpython-38.pyc
differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/TarSCM/__pycache__/archive.cpython-38.pyc
and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/TarSCM/__pycache__/archive.cpython-38.pyc
differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/TarSCM/__pycache__/changes.cpython-38.pyc
and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/TarSCM/__pycache__/changes.cpython-38.pyc
differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/TarSCM/__pycache__/cli.cpython-38.pyc
and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/TarSCM/__pycache__/cli.cpython-38.pyc
differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/TarSCM/__pycache__/config.cpython-38.pyc
and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/TarSCM/__pycache__/config.cpython-38.pyc
differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/TarSCM/__pycache__/exceptions.cpython-38.pyc
and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/TarSCM/__pycache__/exceptions.cpython-38.pyc
differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/TarSCM/__pycache__/helpers.cpython-38.pyc
and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/TarSCM/__pycache__/helpers.cpython-38.pyc
differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/TarSCM/__pycache__/tasks.cpython-38.pyc
and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/TarSCM/__pycache__/tasks.cpython-38.pyc
differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/TarSCM/archive.py
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/TarSCM/archive.py
--- old/obs-service-tar_scm-0.10.22.1615538418.07a353d/TarSCM/archive.py
2021-03-12 09:40:18.000000000 +0100
+++ new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/TarSCM/archive.py
2021-06-15 18:51:24.000000000 +0200
@@ -17,7 +17,7 @@
except:
from StringIO import StringIO
-METADATA_PATTERN = re.compile(r'.*/\.(bzr|git(ignore)?|hg|svn)(\/.*|$)')
+METADATA_PATTERN = re.compile(r'.*/\.(bzr|git|hg|svn)(\/.*|$)')
class BaseArchive():
@@ -83,9 +83,15 @@
)
# transform glob patterns to regular expressions
- includes = r'|'.join([fnmatch.translate(x) for x in args.include])
- excl_arr = [fnmatch.translate(x) for x in args.exclude]
- excludes = r'|'.join(excl_arr) or r'$.'
+ includes = ''
+ excludes = r'$.'
+ topdir_re = '(' + topdir + '/)('
+ if args.include:
+ incl_arr = [fnmatch.translate(x) for x in args.include]
+ includes = topdir_re + r'|'.join(incl_arr) + ')'
+ if args.exclude:
+ excl_arr = [fnmatch.translate(x) for x in args.exclude]
+ excludes = topdir_re + r'|'.join(excl_arr) + ')'
# add topdir without filtering for now
cpiolist = []
@@ -129,7 +135,9 @@
archivefile.close()
# write meta data
- metafile = open(os.path.join(args.outdir, basename + '.obsinfo'), "w")
+ infofile = os.path.join(args.outdir, basename + '.obsinfo')
+ logging.debug("Writing to obsinfo file '%s'", infofile)
+ metafile = open(infofile, "w")
metafile.write("name: " + basename + "\n")
metafile.write("version: " + version + "\n")
metafile.write("mtime: " + str(tstamp) + "\n")
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/TarSCM/archive.pyc and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/TarSCM/archive.pyc differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/TarSCM/changes.pyc and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/TarSCM/changes.pyc differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/TarSCM/cli.py
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/TarSCM/cli.py
--- old/obs-service-tar_scm-0.10.22.1615538418.07a353d/TarSCM/cli.py
2021-03-12 09:40:18.000000000 +0100
+++ new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/TarSCM/cli.py
2021-06-15 18:51:24.000000000 +0200
@@ -184,6 +184,8 @@
parser.add_argument('--maintainers-asc', default = False,
help='File which contains maintainers pubkeys. '
'(only used with \'--latest-signed-*\')')
+ parser.add_argument('--without-version', default = False,
+ help='Do not add version to output file.')
self.verify_args(parser.parse_args(options))
@@ -238,6 +240,7 @@
# Allow forcing verbose mode from the environment; this
# allows debugging when running "osc service disabledrun" etc.
if bool(os.getenv('DEBUG_TAR_SCM')) or args.verbose:
+ logging.basicConfig(format='%(asctime)s %(message)s')
logging.getLogger().setLevel(logging.DEBUG)
for attr in args.__dict__.keys():
Binary files old/obs-service-tar_scm-0.10.22.1615538418.07a353d/TarSCM/cli.pyc
and new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/TarSCM/cli.pyc differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/TarSCM/config.pyc and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/TarSCM/config.pyc differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/TarSCM/exceptions.pyc and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/TarSCM/exceptions.pyc differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/TarSCM/helpers.pyc and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/TarSCM/helpers.pyc differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/TarSCM/scm/__init__.pyc and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/TarSCM/scm/__init__.pyc
differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/TarSCM/scm/__pycache__/__init__.cpython-38.pyc
and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/TarSCM/scm/__pycache__/__init__.cpython-38.pyc
differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/TarSCM/scm/__pycache__/base.cpython-38.pyc
and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/TarSCM/scm/__pycache__/base.cpython-38.pyc
differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/TarSCM/scm/__pycache__/bzr.cpython-38.pyc
and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/TarSCM/scm/__pycache__/bzr.cpython-38.pyc
differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/TarSCM/scm/__pycache__/git.cpython-38.pyc
and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/TarSCM/scm/__pycache__/git.cpython-38.pyc
differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/TarSCM/scm/__pycache__/hg.cpython-38.pyc
and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/TarSCM/scm/__pycache__/hg.cpython-38.pyc
differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/TarSCM/scm/__pycache__/svn.cpython-38.pyc
and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/TarSCM/scm/__pycache__/svn.cpython-38.pyc
differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/TarSCM/scm/__pycache__/tar.cpython-38.pyc
and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/TarSCM/scm/__pycache__/tar.cpython-38.pyc
differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/TarSCM/scm/base.pyc and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/TarSCM/scm/base.pyc differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/TarSCM/scm/bzr.pyc and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/TarSCM/scm/bzr.pyc differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/TarSCM/scm/git.py
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/TarSCM/scm/git.py
--- old/obs-service-tar_scm-0.10.22.1615538418.07a353d/TarSCM/scm/git.py
2021-03-12 09:40:18.000000000 +0100
+++ new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/TarSCM/scm/git.py
2021-06-15 18:51:24.000000000 +0200
@@ -252,12 +252,16 @@
versionformat = self._detect_version_tag_offset(
self._parent_tag,
versionformat)
+ log_cmd = self._get_scm_cmd() + ['log', '-n1', '--date=short',
+ "--pretty=format:%s" % versionformat]
+ if self.revision:
+ log_cmd.append('--source')
+ log_cmd.append(self.revision)
+ revpath = os.path.join(self.clone_dir, self.revision)
+ if os.path.exists(revpath):
+ log_cmd.append('--')
- version = self.helpers.safe_run(
- self._get_scm_cmd() + ['log', '-n1', '--date=short',
- "--pretty=format:%s" % versionformat],
- self.clone_dir
- )[1]
+ version = self.helpers.safe_run(log_cmd, self.clone_dir)[1]
return version
def _detect_parent_tag(self, args=None):
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/TarSCM/scm/git.pyc and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/TarSCM/scm/git.pyc differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/TarSCM/scm/hg.pyc and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/TarSCM/scm/hg.pyc differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/TarSCM/scm/svn.pyc and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/TarSCM/scm/svn.pyc differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/TarSCM/scm/tar.py
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/TarSCM/scm/tar.py
--- old/obs-service-tar_scm-0.10.22.1615538418.07a353d/TarSCM/scm/tar.py
2021-03-12 09:40:18.000000000 +0100
+++ new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/TarSCM/scm/tar.py
2021-06-15 18:51:24.000000000 +0200
@@ -30,7 +30,8 @@
if "/" in version or '..' in version:
sys.exit("verion in obsinfo contains '/' or '..'.")
- self.clone_dir += "-" + version
+ if version != '':
+ self.clone_dir += "-" + version
if not os.path.exists(self.clone_dir):
self._final_rename_needed = True
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/TarSCM/scm/tar.pyc and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/TarSCM/scm/tar.pyc differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/TarSCM/tasks.py
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/TarSCM/tasks.py
--- old/obs-service-tar_scm-0.10.22.1615538418.07a353d/TarSCM/tasks.py
2021-03-12 09:40:18.000000000 +0100
+++ new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/TarSCM/tasks.py
2021-06-15 18:51:24.000000000 +0200
@@ -12,6 +12,7 @@
import sys
import re
import locale
+import json
import yaml
import TarSCM.scm
@@ -141,36 +142,36 @@
if rcode != 0:
raise RuntimeError("download_files has failed:%s" % output)
- def check_for_branch_request(self, args):
+ def check_for_branch_request(self):
# we may have a _branch_request file. In that case we life in a
# branch create by a webhook from github or gitlab pull/merge request
# the source supposed to be merged is more important then the code
# referenced in the _service file.
+ args = self.args
if not os.path.exists('_branch_request'):
return args
# is it a branch request?
- import json
- f = open("_branch_request", "r")
- j = json.load(f)
- if j['object_kind'] == 'merge_request':
+ ofh = open("_branch_request", "r")
+ dat = json.load(ofh)
+ if dat.get('object_kind') == 'merge_request':
# gitlab merge request
- args.url = j['project']['http_url']
- args.revision = j['object_attributes']['source']['default_branch']
- elif j['action'] == 'opened':
+ args.url = dat['project']['http_url']
+ rev = dat['object_attributes']['source']['default_branch']
+ args.revision = rev
+ elif dat.get('action') == 'opened':
# github pull request
args.url = "https://github.com/"
- args.url += j['pull_request']['head']['repo']['full_name']
- args.revision = j['pull_request']['head']['sha']
+ args.url += dat['pull_request']['head']['repo']['full_name']
+ args.revision = dat['pull_request']['head']['sha']
return args
-
def process_single_task(self, args):
'''
do the work for a single task
'''
- self.args = self.check_for_branch_request(args)
+ self.args = self.check_for_branch_request()
logging.basicConfig(format="%(message)s", stream=sys.stderr,
level=logging.INFO)
@@ -208,20 +209,10 @@
sys.exit(1)
scm_object.fetch_upstream()
-
- if args.filename:
- dstname = basename = args.filename
- else:
- dstname = basename = os.path.basename(scm_object.clone_dir)
-
version = self.get_version()
- changesversion = version
- if version and not sys.argv[0].endswith("/tar") \
- and not sys.argv[0].endswith("/snapcraft") \
- and not sys.argv[0].endswith("/appimage"):
- if isinstance(dstname, bytes):
- version = version.encode('UTF-8')
- dstname += '-' + version
+
+ (dstname, changesversion, basename) = self._dstname(scm_object,
+ version)
logging.debug("DST: %s", dstname)
@@ -262,6 +253,22 @@
scm_object.finalize()
+ def _dstname(self, scm_object, version):
+ args = self.args
+ if args.filename:
+ basename = dstname = args.filename
+ else:
+ basename = dstname = os.path.basename(scm_object.clone_dir)
+
+ if version and not sys.argv[0].endswith("/tar") \
+ and not sys.argv[0].endswith("/snapcraft") \
+ and not sys.argv[0].endswith("/appimage"):
+ if isinstance(dstname, bytes):
+ version = version.encode('UTF-8')
+ if not args.without_version:
+ dstname += '-' + version
+ return (dstname, version, basename)
+
def _process_changes(self, args, ver, changesversion, detected_changes):
changesauthor = self.changes.get_changesauthor(args)
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/TarSCM/tasks.pyc and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/TarSCM/tasks.pyc differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/__pycache__/tar_scm.cpython-38.pyc
and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/__pycache__/tar_scm.cpython-38.pyc
differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tar_scm
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tar_scm
--- old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tar_scm 2021-03-12
09:40:18.000000000 +0100
+++ new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tar_scm 1970-01-01
01:00:00.000000000 +0100
@@ -1,30 +0,0 @@
-#!/usr/bin/python2.7
-#
-# A simple script to checkout or update a svn or git repo as source service
-#
-# (C) 2010 by Adrian Schroeter <[email protected]>
-# (C) 2014 by Jan Blunck <[email protected]> (Python rewrite)
-# (C) 2016 by Adrian Schroeter <[email protected]> (OBS cpio support)
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-# See http://www.gnu.org/licenses/gpl-2.0.html for full license text.
-
-import os
-import sys
-
-sys.path.append(os.path.dirname(os.path.abspath(__file__))) # noqa
-
-# These two modules have to be imported after sys.path.append because
-# the additional path is where the modules are found
-import TarSCM # pylint: disable=wrong-import-position; # noqa: E402
-
-
-def main():
- TarSCM.run()
-
-
-if __name__ == '__main__':
- main()
Binary files old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tar_scm.pyc and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tar_scm.pyc differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tar_scm.service.in
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tar_scm.service.in
--- old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tar_scm.service.in
2021-03-12 09:40:18.000000000 +0100
+++ new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tar_scm.service.in
2021-06-15 18:51:24.000000000 +0200
@@ -48,7 +48,7 @@
To store credentials please use the following command lines:
"sudo chown obsservicerun:obsrun /etc/obs/services/tar_scm.d"
"sudo -H -u obsservicerun XDG_DATA_HOME=/etc/obs/services/tar_scm.d
keyring -b keyrings.alt.file.EncryptedKeyring set URL username"
- Its only available for the following combinaison of SCM / protocols:
+ Its only available for the following combination of SCM / protocols:
- git: ftp(s),http(s)
- svn
- bzr: bzr,ftp,http(s)
@@ -114,7 +114,7 @@
</parameter>
<parameter name="match-tag">
<description>
- With this parameter you can specifiy a glob pattern (e.g. v*) to filter
+ With this parameter you can specify a glob pattern (e.g. v*) to filter
relevant tags in your project e.g. if you use @PARENT_TAG@.
</description>
</parameter>
@@ -212,4 +212,7 @@
<parameter name="maintainers-asc">
<description>File which contains maintainers pubkeys (only used with
'--latest-signed-*')</description>
</parameter>
+ <parameter name="without-version">
+ <description>Do not add version to output file.</description>
+ </parameter>
</service>
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/__init__.pyc and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/__init__.pyc differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/__pycache__/__init__.cpython-38.pyc
and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/__pycache__/__init__.cpython-38.pyc
differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/__pycache__/archiveobscpiotestcases.cpython-38.pyc
and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/__pycache__/archiveobscpiotestcases.cpython-38.pyc
differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/__pycache__/bzrfixtures.cpython-38.pyc
and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/__pycache__/bzrfixtures.cpython-38.pyc
differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/__pycache__/bzrtests.cpython-38.pyc
and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/__pycache__/bzrtests.cpython-38.pyc
differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/__pycache__/commontests.cpython-38.pyc
and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/__pycache__/commontests.cpython-38.pyc
differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/__pycache__/fake_classes.cpython-38.pyc
and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/__pycache__/fake_classes.cpython-38.pyc
differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/__pycache__/fixtures.cpython-38.pyc
and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/__pycache__/fixtures.cpython-38.pyc
differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/__pycache__/gitfixtures.cpython-38.pyc
and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/__pycache__/gitfixtures.cpython-38.pyc
differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/__pycache__/githgtests.cpython-38.pyc
and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/__pycache__/githgtests.cpython-38.pyc
differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/__pycache__/gitsvntests.cpython-38.pyc
and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/__pycache__/gitsvntests.cpython-38.pyc
differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/__pycache__/gittests.cpython-38.pyc
and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/__pycache__/gittests.cpython-38.pyc
differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/__pycache__/hgfixtures.cpython-38.pyc
and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/__pycache__/hgfixtures.cpython-38.pyc
differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/__pycache__/hgtests.cpython-38.pyc
and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/__pycache__/hgtests.cpython-38.pyc
differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/__pycache__/scm.cpython-38.pyc
and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/__pycache__/scm.cpython-38.pyc
differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/__pycache__/scmlogs.cpython-38.pyc
and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/__pycache__/scmlogs.cpython-38.pyc
differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/__pycache__/svnfixtures.cpython-38.pyc
and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/__pycache__/svnfixtures.cpython-38.pyc
differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/__pycache__/svntests.cpython-38.pyc
and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/__pycache__/svntests.cpython-38.pyc
differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/__pycache__/tarfixtures.cpython-38.pyc
and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/__pycache__/tarfixtures.cpython-38.pyc
differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/__pycache__/tartests.cpython-38.pyc
and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/__pycache__/tartests.cpython-38.pyc
differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/__pycache__/tasks.cpython-38.pyc
and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/__pycache__/tasks.cpython-38.pyc
differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/__pycache__/test.cpython-38.pyc
and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/__pycache__/test.cpython-38.pyc
differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/__pycache__/testassertions.cpython-38.pyc
and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/__pycache__/testassertions.cpython-38.pyc
differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/__pycache__/testenv.cpython-38.pyc
and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/__pycache__/testenv.cpython-38.pyc
differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/__pycache__/unittestcases.cpython-38.pyc
and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/__pycache__/unittestcases.cpython-38.pyc
differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/__pycache__/utils.cpython-38.pyc
and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/__pycache__/utils.cpython-38.pyc
differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/archiveobscpiotestcases.py
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/archiveobscpiotestcases.py
---
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/archiveobscpiotestcases.py
2021-03-12 09:40:18.000000000 +0100
+++
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/archiveobscpiotestcases.py
2021-06-15 18:51:24.000000000 +0200
@@ -7,6 +7,7 @@
import shutil
import unittest
import six
+import yaml
import TarSCM
@@ -48,13 +49,25 @@
self.cli.outdir = outdir
arch = ObsCpio()
os.makedirs(outdir)
+ version = '0.1.1'
+ (dst, chgv, bname) = self.tasks._dstname(scm_object, version)
arch.create_archive(
scm_object,
cli = self.cli,
- basename = 'test',
- dstname = 'test',
- version = '0.1.1'
+ basename = bname ,
+ dstname = dst,
+ version = chgv
)
+ cpiofile = os.path.join(outdir, "%s-%s.obscpio" % (bname, version))
+ infofile = os.path.join(outdir, bname + ".obsinfo")
+ self.assertTrue(os.path.isfile(cpiofile))
+ self.assertTrue(os.path.isfile(infofile))
+ data = yaml.safe_load(open(infofile, 'r'))
+ self.assertDictEqual(data,
+ {'name': bname,
+ 'version': chgv,
+ 'mtime': 1234567890,
+ 'commit': data['commit']})
def test_obscpio_extract_of(self):
'''
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/archiveobscpiotestcases.pyc
and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/archiveobscpiotestcases.pyc
differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/bzrfixtures.pyc and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/bzrfixtures.pyc differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/bzrtests.pyc and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/bzrtests.pyc differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/commontests.pyc and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/commontests.pyc differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/fake_classes.pyc and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/fake_classes.pyc differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/fixtures.pyc and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/fixtures.pyc differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/gitfixtures.pyc and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/gitfixtures.pyc differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/githgtests.pyc and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/githgtests.pyc differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/gitsvntests.pyc and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/gitsvntests.pyc differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/gittests.py
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/gittests.py
--- old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/gittests.py
2021-03-12 09:40:18.000000000 +0100
+++ new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/gittests.py
2021-06-15 18:51:24.000000000 +0200
@@ -365,3 +365,25 @@
self.tar_scm_std("--revision", "@PARENT_TAG@")
self.assertTarOnly(self.basename(version="1234567890." +
fix.sha1s[fix.wd]["tag2"][:7]))
+
+ def test_without_version(self):
+ fix = self.fixtures
+ fix.create_commits(2)
+ repo_path = fix.repo_path
+ os.chdir(repo_path)
+ self.tar_scm_std("--without-version", "1")
+ tar_path = os.path.join(self.outdir, 'repo.tar')
+ self.assertTrue(os.path.isfile(tar_path))
+
+ def test_file_conflicts_revision(self):
+ fix = self.fixtures
+ fix.create_commits(2)
+ repo_path = fix.repo_path
+ os.chdir(repo_path)
+ os.mkdir("test")
+ with open("test/myfile.txt", 'w') as file:
+ file.write("just for testing")
+ fix.safe_run('add test')
+ fix.safe_run('commit -m "added tests"')
+ fix.safe_run('tag test')
+ self.tar_scm_std("--revision", 'test')
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/gittests.pyc and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/gittests.pyc differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/hgfixtures.pyc and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/hgfixtures.pyc differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/hgtests.pyc and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/hgtests.pyc differ
Binary files old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/scm.pyc
and new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/scm.pyc differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/scmlogs.pyc and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/scmlogs.pyc differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/svnfixtures.pyc and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/svnfixtures.pyc differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/svntests.pyc and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/svntests.pyc differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/tarfixtures.pyc and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/tarfixtures.pyc differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/tartests.pyc and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/tartests.pyc differ
Binary files old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/tasks.pyc
and new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/tasks.pyc differ
Binary files old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/test.pyc
and new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/test.pyc differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/testassertions.pyc and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/testassertions.pyc
differ
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/testenv.pyc and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/testenv.pyc differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/unittestcases.py
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/unittestcases.py
--- old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/unittestcases.py
2021-03-12 09:40:18.000000000 +0100
+++ new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/unittestcases.py
2021-06-15 18:51:24.000000000 +0200
@@ -192,64 +192,6 @@
repohash,
'b9761648b96f105d82a97b8a81f1ca060b015a3f882ef9a55ae6b5bf7be0d48a')
- @unittest.skip("Broken test, relies on the results of an other test case")
- def test_scm_tar(self):
- tc_name = inspect.stack()[0][3]
- cl_name = self.__class__.__name__
- cur_cwd = os.getcwd()
- scm_object = TarSCM.scm.Tar(self.cli, self.tasks)
- wdir = os.path.join(self.tmp_dir, cl_name, tc_name)
- os.makedirs(os.path.join(wdir, 'test'))
- info = os.path.join(wdir, "test.obsinfo")
- print("INFOFILE: '%s'" % info)
- f_h = open(info, 'w')
- f_h.write(
- "name: test\n" +
- "version: 0.1.1\n" +
- "mtime: 1476683264\n" +
- "commit: fea6eb5f43841d57424843c591b6c8791367a9e5\n"
- )
- f_h.close()
- os.chdir(wdir)
- scm_object.fetch_upstream()
- # just to make coverage happy
- scm_object.update_cache()
- tstamp = scm_object.get_timestamp()
- ver = scm_object.detect_version(self.cli)
- empty = scm_object.read_from_obsinfo(info, "nonexistantkey")
-
- self.assertTrue(os.path.isdir(os.path.join(wdir, "test-0.1.1")))
- self.assertFalse(os.path.isdir(os.path.join(wdir, "test")))
- self.assertEqual(tstamp, 1476683264)
- self.assertEqual(ver, "0.1.1")
- self.assertEqual(empty, "")
- # testing non existant basename
- f_h = open(info, 'w')
- f_h.write(
- "name: nonexistantbase\n" +
- "version: 0.1.1\n" +
- "mtime: 1476683264\n" +
- "commit: fea6eb5f43841d57424843c591b6c8791367a9e5\n"
- )
- f_h.close()
-
- six.assertRaisesRegex(
- self,
- SystemExit,
- re.compile('Error while moving from '),
- scm_object.fetch_upstream
- )
-
- # testing with no info
- os.chdir(cur_cwd)
- scm_object.args.obsinfo = None
- six.assertRaisesRegex(
- self,
- SystemExit,
- re.compile('ERROR: no .obsinfo file found in directory:'),
- scm_object.fetch_upstream
- )
-
def test_check_url_valid(self):
tc_arr = [
{
@@ -399,3 +341,19 @@
wdir = os.path.join(self.tmp_dir, cl_name, tc_name)
os.makedirs(wdir)
scm_object.prep_tree_for_archive('test', wdir, 'test')
+
+ def test_method__dstname(self):
+ '''
+ basename != dstname
+ basename is the package name or given by '--filename'
+ dstname includes version string
+ This is important for obscpio/obsinfo
+ '''
+ tc_name = inspect.stack()[0][3]
+ version = '0.1.1'
+ scm_object = Git(self.cli, self.tasks)
+ scm_object.clone_dir = os.path.join(self.fixtures_dir, tc_name)
+ (dst, chgv, bname) = self.tasks._dstname(scm_object, version)
+ self.assertEqual(tc_name, bname)
+ self.assertEqual('%s-%s' % (tc_name, version), dst)
+ self.assertEqual(chgv, version)
Binary files
old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/unittestcases.pyc and
new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/unittestcases.pyc
differ
Binary files old/obs-service-tar_scm-0.10.22.1615538418.07a353d/tests/utils.pyc
and new/obs-service-tar_scm-0.10.26.1623775884.87f49a8/tests/utils.pyc differ