Hello community,

here is the log from the commit of package obs-service-tar_scm for 
openSUSE:Factory checked in at 2015-03-25 21:05:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/obs-service-tar_scm (Old)
 and      /work/SRC/openSUSE:Factory/.obs-service-tar_scm.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "obs-service-tar_scm"

Changes:
--------
--- /work/SRC/openSUSE:Factory/obs-service-tar_scm/obs-service-tar_scm.changes  
2014-10-09 12:52:34.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.obs-service-tar_scm.new/obs-service-tar_scm.changes 
    2015-03-25 21:33:19.000000000 +0100
@@ -1,0 +2,18 @@
+Wed Mar 18 07:44:18 UTC 2015 - [email protected]
+
+- Update to version 0.5.1.1426664483.de67b88:
+  + be explicit about python2, python may be python3
+  + Fix newline at the end of @PARENT_TAG@
+  + Fix Mercurial version format strings in unittest
+  + Refactoring of package metadata regex matching
+  + Refactor resetting of uid/gid so that it is reusable
+  + Fix handling of --include option
+  + Fix handling of --exclude option
+  + Refactor subdir handling of tarchecker's to prevent code duplication
+  + ignore PEP8's E731 check for lambdas
+  + PEP8 E402 fix: set PYTHONPATH outside code
+  + add @TAG_OFFSET@ support in versionformat for git
+  + fix inconsistencies in tar_scm.service
+  + - fix .service file syntax (OBS 2.6.1 is checking now)
+
+-------------------------------------------------------------------

Old:
----
  obs-service-tar_scm-0.5.0.1412769870.6cda976.tar.gz

New:
----
  obs-service-tar_scm-0.5.1.1426664483.de67b88.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ obs-service-tar_scm.spec ++++++
--- /var/tmp/diff_new_pack.n1GeIV/_old  2015-03-25 21:33:19.000000000 +0100
+++ /var/tmp/diff_new_pack.n1GeIV/_new  2015-03-25 21:33:19.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package obs-service-tar_scm
 #
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
 %define service tar_scm
 
 Name:           obs-service-%{service}
-Version:        0.5.0.1412769870.6cda976
+Version:        0.5.1.1426664483.de67b88
 Release:        0
 Summary:        An OBS source service: checkout or update a tar ball from 
svn/git/hg
 License:        GPL-2.0+

++++++ _service ++++++
--- /var/tmp/diff_new_pack.n1GeIV/_old  2015-03-25 21:33:20.000000000 +0100
+++ /var/tmp/diff_new_pack.n1GeIV/_new  2015-03-25 21:33:20.000000000 +0100
@@ -4,7 +4,7 @@
     <param name="scm">git</param>
     <param name="exclude">.git</param>
     <param name="version">git-master</param>
-    <param name="versionformat">0.5.0.%ct.%h</param>
+    <param name="versionformat">0.5.1.%ct.%h</param>
     <param name="revision">master</param>
     <param name="changesgenerate">enable</param>
   </service>

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.n1GeIV/_old  2015-03-25 21:33:20.000000000 +0100
+++ /var/tmp/diff_new_pack.n1GeIV/_new  2015-03-25 21:33:20.000000000 +0100
@@ -1,6 +1,6 @@
 <servicedata>
   <service name="tar_scm">
     <param name="url">git://github.com/openSUSE/obs-service-tar_scm.git</param>
-    <param 
name="changesrevision">6cda976777de4e38ee88efe97353dec92f609614</param>
+    <param 
name="changesrevision">de67b88320ca42dbd145c7f14ca062739917dc61</param>
   </service>
 </servicedata>
\ No newline at end of file

++++++ obs-service-tar_scm-0.5.0.1412769870.6cda976.tar.gz -> 
obs-service-tar_scm-0.5.1.1426664483.de67b88.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.5.0.1412769870.6cda976/GNUmakefile 
new/obs-service-tar_scm-0.5.1.1426664483.de67b88/GNUmakefile
--- old/obs-service-tar_scm-0.5.0.1412769870.6cda976/GNUmakefile        
2014-10-08 14:13:42.000000000 +0200
+++ new/obs-service-tar_scm-0.5.1.1426664483.de67b88/GNUmakefile        
2015-03-18 08:44:40.000000000 +0100
@@ -16,12 +16,12 @@
                echo "pep8 not installed!  Cannot check PEP8 compliance; 
aborting." >&2; \
                exit 1; \
        fi
-       find -name \*.py | xargs pep8 --ignore=E221,E272,E241 $<
+       find -name \*.py | xargs pep8 --ignore=E221,E272,E241,E731 $<
 
 .PHONY: test
 test:
        : Running the test suite.  Please be patient - this takes a few minutes 
...
-       python tests/test.py
+       PYTHONPATH=. python2 tests/test.py
 
 .PHONY: install
 install:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.5.0.1412769870.6cda976/TESTING.md 
new/obs-service-tar_scm-0.5.1.1426664483.de67b88/TESTING.md
--- old/obs-service-tar_scm-0.5.0.1412769870.6cda976/TESTING.md 2014-10-08 
14:13:42.000000000 +0200
+++ new/obs-service-tar_scm-0.5.1.1426664483.de67b88/TESTING.md 2015-03-18 
08:44:40.000000000 +0100
@@ -4,7 +4,7 @@
 
 Run the unit test suite via:
 
-    python tests/test.py
+    python2 tests/test.py
 
 The output may become easier to understand if you uncomment the
 'failfast' option in `test.py`.  This requires Python 2.7, however.
@@ -17,10 +17,10 @@
 development, you can provide command-line arguments:
 
     # only run the 'plain' and 'subdir' git tests
-    python tests/test.py test_plain test_subdir
+    python2 tests/test.py test_plain test_subdir
 
     # run all git tests matching the regexp /subdir/
-    python tests/test.py /subdir/
+    python2 tests/test.py /subdir/
 
 Currently this filtering only applies to the git tests, but you can
 easily tweak `test.py` to change that.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.5.0.1412769870.6cda976/tar_scm.py 
new/obs-service-tar_scm-0.5.1.1426664483.de67b88/tar_scm.py
--- old/obs-service-tar_scm-0.5.0.1412769870.6cda976/tar_scm.py 2014-10-08 
14:13:42.000000000 +0200
+++ new/obs-service-tar_scm-0.5.1.1426664483.de67b88/tar_scm.py 2015-03-18 
08:44:40.000000000 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 #
 # A simple script to checkout or update a svn or git repo as source service
 #
@@ -269,6 +269,10 @@
     return dst
 
 
+# skip vcs files base on this pattern
+METADATA_PATTERN = re.compile(r'.*/\.(bzr|git|hg|svn).*')
+
+
 def create_tar(repodir, outdir, dstname, extension='tar',
                exclude=[], include=[], package_metadata=False):
     """Create a tarball of repodir in destination directory."""
@@ -278,20 +282,22 @@
     excl_patterns = []
 
     for i in include:
-        incl_patterns.append(re.compile(fnmatch.translate(i)))
+        # for backward compatibility add a trailing '*' if i isn't a pattern
+        if fnmatch.translate(i) == i + fnmatch.translate(r''):
+            i += r'*'
 
-    # skip vcs files base on this pattern
-    if not package_metadata:
-        excl_patterns.append(re.compile(r".*/\.bzr.*"))
-        excl_patterns.append(re.compile(r".*/\.git.*"))
-        excl_patterns.append(re.compile(r".*/\.hg.*"))
-        excl_patterns.append(re.compile(r".*/\.svn.*"))
+        pat = fnmatch.translate(os.path.join(topdir, i))
+        incl_patterns.append(re.compile(pat))
 
     for e in exclude:
-        excl_patterns.append(re.compile(fnmatch.translate(e)))
+        pat = fnmatch.translate(os.path.join(topdir, e))
+        excl_patterns.append(re.compile(pat))
 
     def tar_exclude(filename):
         """Exclude (return True) or add (return False) file to tar achive."""
+        if not package_metadata and METADATA_PATTERN.match(filename):
+            return True
+
         if incl_patterns:
             for pat in incl_patterns:
                 if pat.match(filename):
@@ -303,25 +309,33 @@
                 return True
         return False
 
-    def tar_filter(tarinfo):
+    def reset(tarinfo):
         """Python 2.7 only: reset uid/gid to 0/0 (root)."""
         tarinfo.uid = tarinfo.gid = 0
         tarinfo.uname = tarinfo.gname = "root"
+        return tarinfo
 
+    def tar_filter(tarinfo):
         if tar_exclude(tarinfo.name):
             return None
 
-        return tarinfo
+        return reset(tarinfo)
 
     cwd = os.getcwd()
     os.chdir(workdir)
 
     tar = tarfile.open(os.path.join(outdir, dstname + '.' + extension), "w")
     try:
-        tar.add(topdir, filter=tar_filter)
+        tar.add(topdir, recursive=False, filter=reset)
     except TypeError:
         # Python 2.6 compatibility
-        tar.add(topdir, exclude=tar_exclude)
+        tar.add(topdir, recursive=False)
+    for entry in map(lambda x: os.path.join(topdir, x), os.listdir(topdir)):
+        try:
+            tar.add(entry, filter=tar_filter)
+        except TypeError:
+            # Python 2.6 compatibility
+            tar.add(entry, exclude=tar_exclude)
     tar.close()
 
     os.chdir(cwd)
@@ -365,15 +379,31 @@
     if versionformat is None:
         versionformat = '%ct.%h'
 
+    parent_tag = None
     if re.match('.*@PARENT_TAG@.*', versionformat):
         try:
-            text = safe_run(['git', 'describe', '--tags', '--abbrev=0'],
-                            repodir)[1]
-            versionformat = re.sub('@PARENT_TAG@', text, versionformat)
+            # strip to remove newlines
+            parent_tag = safe_run(['git', 'describe', '--tags', '--abbrev=0'],
+                                  repodir)[1].strip()
+            versionformat = re.sub('@PARENT_TAG@', parent_tag, versionformat)
         except SystemExit:
             sys.exit(r'\e[0;31mThe git repository has no tags,'
                      r' thus @PARENT_TAG@ can not be expanded\e[0m')
 
+    if re.match('.*@TAG_OFFSET@.*', versionformat):
+        try:
+            if parent_tag:
+                tag_offset = safe_run(['git', 'rev-list', '--count',
+                                       parent_tag + '..HEAD'],
+                                      repodir)[1].strip()
+                versionformat = re.sub('@TAG_OFFSET@', tag_offset,
+                                       versionformat)
+            else:
+                sys.exit(r'\e[0;31m@TAG_OFFSET@ can not be expanded, '
+                         r'@PARENT_TAG@ is required\e[0m')
+        except SystemExit:
+            sys.exit(r'\e[0;31m@TAG_OFFSET@ can not be expanded\e[0m')
+
     version = safe_run(['git', 'log', '-n1', '--date=short',
                         "--pretty=format:%s" % versionformat], repodir)[1]
     return version_iso_cleanup(version)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.5.0.1412769870.6cda976/tar_scm.service 
new/obs-service-tar_scm-0.5.1.1426664483.de67b88/tar_scm.service
--- old/obs-service-tar_scm-0.5.0.1412769870.6cda976/tar_scm.service    
2014-10-08 14:13:42.000000000 +0200
+++ new/obs-service-tar_scm-0.5.1.1426664483.de67b88/tar_scm.service    
2015-03-18 08:44:40.000000000 +0100
@@ -1,25 +1,25 @@
 <service name="tar_scm">
-  <summary>Create a tar ball 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>
-  <param name="scm">
-    <description>Used SCM</description>
+  <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>
+  <parameter name="scm">
+    <description>Specify SCM to use.</description>
     <allowedvalue>svn</allowedvalue>
     <allowedvalue>git</allowedvalue>
     <allowedvalue>hg</allowedvalue>
     <allowedvalue>bzr</allowedvalue>
     <required/>
-  </param>
-  <param name="url">
-    <description>Checkout url</description>
+  </parameter>
+  <parameter name="url">
+    <description>Specify URL to checkout.</description>
     <required/>
-  </param>
-  <param name="subdir">
-    <description>package just a sub directory</description>
-  </param>
-  <param name="version">
-    <description>Specify version to be used in tarball. Defaults to 
automatically detected value formatted by versionformat parameter.</description>
-  </param>
-  <param name="versionformat">
+  </parameter>
+  <parameter name="subdir">
+    <description>Package just a subdirectory.</description>
+  </parameter>
+  <parameter name="version">
+    <description>Specify version to be used in tarball.  Defaults to 
automatically detected value formatted by versionformat parameter.</description>
+  </parameter>
+  <parameter name="versionformat">
     <description>
       Auto-generate version from checked out source using this format
       string.  This parameter is used if the 'version' parameter is not
@@ -30,30 +30,34 @@
       remove some unhelpful characters.  Here are some useful examples of
       strings which are expanded, see the git-log documentation for more.
 
-      %ct             Commit time as a UNIX timestamp, e.g. 1384855776.
-                      This is the default.
+      %ct               Commit time as a UNIX timestamp, e.g. 1384855776.
+                        This is the default.
 
-      %at             Author time as a UNIX timestamp, e.g. 1384855776.
+      %at               Author time as a UNIX timestamp, e.g. 1384855776.
 
-      %cd             Commit date in YYYYMMDD format, e.g. 20131119
+      %cd               Commit date in YYYYMMDD format, e.g. 20131119
 
-      %ad             Author date in YYYYMMDD format, e.g. 20131119
+      %ad               Author date in YYYYMMDD format, e.g. 20131119
 
-      %h              Abbreviated hash, e.g. cc62c54
+      %h                Abbreviated hash, e.g. cc62c54
 
-      @PARENT_TAG@    the first tag that is reachable, e.g. v0.2.3
+      @PARENT_TAG@      The first tag that is reachable, e.g. v0.2.3
+
+      @TAG_OFFSET@      The commit count since @PARENT_TAG@, e.g. 9
 
       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.
     </description>
-  </param>
-  <param name="versionprefix">
-    <description>specify a base version as prefix.</description>
-  </param>
-  <param name="revision">
+  </parameter>
+  <parameter name="versionprefix">
+    <description>Specify a base version as prefix.</description>
+  </parameter>
+  <parameter name="revision">
     <description>
+       Specify revision of source to check out.
+
        When using git, revision may refer to any of the following:
 
        * explicit SHA1: a1b2c3d4....
@@ -71,34 +75,34 @@
          - set by: git fetch ${url} ${revision}:${revision}
                    git checkout ${revision}
     </description>
-  </param>
-  <param name="filename">
-    <description>name of package - used together with version to determine 
tarball name</description>
-  </param>
-  <param name="exclude">
-    <description>for specifying excludes when creating the tar 
ball</description>
-  </param>
-  <param name="include">
-    <description>for specifying subset of files/subdirectories to pack in the 
tar ball</description>
-  </param>
-  <param name="package-meta">
-    <description>Package the meta data of SCM to allow the user or OBS to 
update after un-tar</description>
+  </parameter>
+  <parameter name="filename">
+    <description>Specify name of package, which is used together with version 
to determine tarball name.</description>
+  </parameter>
+  <parameter name="exclude">
+    <description>Specify regexp to exclude when creating the 
tarball.</description>
+  </parameter>
+  <parameter name="include">
+    <description>Specify subset of files/subdirectories to pack in the 
tarball.</description>
+  </parameter>
+  <parameter name="package-meta">
+    <description>Package the metadata of SCM to allow the user or OBS to 
update after un-tar.</description>
     <allowedvalue>yes</allowedvalue>
-  </param>
-  <param name="history-depth">
-    <description>Stored history depth. Special value "full" clones/pulls full 
history. Only valid if SCM git is used.</description>
-  </param>
-  <param name="submodules">
-    <description>Whether or not to include git submodules.  Default is 
'enable'</description>
+  </parameter>
+  <parameter name="history-depth">
+    <description>Obsolete parameter which will be ignored.</description>
+  </parameter>
+  <parameter name="submodules">
+    <description>Specify whether to include git submodules.  Default is 
'enable'.</description>
     <allowedvalue>enable</allowedvalue>
     <allowedvalue>disable</allowedvalue>
-  </param>
-  <param name="changesgenerate">
-    <description>Whether or not to generate changes file entries from SCM 
commit log since a given parent revision (see changesrevision).  Default is 
'disable'.</description>
+  </parameter>
+  <parameter name="changesgenerate">
+    <description>Specify whether to generate changes file entries from SCM 
commit log since a given parent revision (see changesrevision).  Default is 
'disable'.</description>
     <allowedvalue>enable</allowedvalue>
     <allowedvalue>disable</allowedvalue>
-  </param>
-  <param name="changesauthor">
-    <description>The author of the changes file entry to be written, defaults 
to first email entry in ~/.oscrc or "[email protected]" if there 
is no .oscrc found.</description>
-  </param>
+  </parameter>
+  <parameter name="changesauthor">
+    <description>Specify author of the changes file entry to be written.  
Defaults to first email entry in ~/.oscrc, or "[email protected]" 
if there is no .oscrc found.</description>
+  </parameter>
 </service>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.5.0.1412769870.6cda976/tests/bzrfixtures.py 
new/obs-service-tar_scm-0.5.1.1426664483.de67b88/tests/bzrfixtures.py
--- old/obs-service-tar_scm-0.5.0.1412769870.6cda976/tests/bzrfixtures.py       
2014-10-08 14:13:42.000000000 +0200
+++ new/obs-service-tar_scm-0.5.1.1426664483.de67b88/tests/bzrfixtures.py       
2015-03-18 08:44:40.000000000 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python2
 
 import os
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.5.0.1412769870.6cda976/tests/bzrtests.py 
new/obs-service-tar_scm-0.5.1.1426664483.de67b88/tests/bzrtests.py
--- old/obs-service-tar_scm-0.5.0.1412769870.6cda976/tests/bzrtests.py  
2014-10-08 14:13:42.000000000 +0200
+++ new/obs-service-tar_scm-0.5.1.1426664483.de67b88/tests/bzrtests.py  
2015-03-18 08:44:40.000000000 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python2
 
 from commontests import CommonTests
 from bzrfixtures import BzrFixtures
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.5.0.1412769870.6cda976/tests/commontests.py 
new/obs-service-tar_scm-0.5.1.1426664483.de67b88/tests/commontests.py
--- old/obs-service-tar_scm-0.5.0.1412769870.6cda976/tests/commontests.py       
2014-10-08 14:13:42.000000000 +0200
+++ new/obs-service-tar_scm-0.5.1.1426664483.de67b88/tests/commontests.py       
2015-03-18 08:44:40.000000000 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python2
 
 import os
 
@@ -51,8 +51,14 @@
         self.assertRegexpMatches(ti.linkname, '[/.]*/nir/va/na$')
 
     def test_exclude(self):
-        self.tar_scm_std('--exclude', '.' + self.scm)
-        self.assertTarOnly(self.basename())
+        self.tar_scm_std('--exclude', 'a', '--exclude', 'c')
+        self.assertTarOnly(self.basename(),
+                           tarchecker=self.assertIncludeSubdirTar)
+
+    def test_include(self):
+        self.tar_scm_std('--include', self.fixtures.subdir)
+        self.assertTarOnly(self.basename(),
+                           tarchecker=self.assertIncludeSubdirTar)
 
     def test_subdir(self):
         self.tar_scm_std('--subdir', self.fixtures.subdir)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.5.0.1412769870.6cda976/tests/fixtures.py 
new/obs-service-tar_scm-0.5.1.1426664483.de67b88/tests/fixtures.py
--- old/obs-service-tar_scm-0.5.0.1412769870.6cda976/tests/fixtures.py  
2014-10-08 14:13:42.000000000 +0200
+++ new/obs-service-tar_scm-0.5.1.1426664483.de67b88/tests/fixtures.py  
2015-03-18 08:44:40.000000000 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python2
 
 import os
 import shutil
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.5.0.1412769870.6cda976/tests/gitfixtures.py 
new/obs-service-tar_scm-0.5.1.1426664483.de67b88/tests/gitfixtures.py
--- old/obs-service-tar_scm-0.5.0.1412769870.6cda976/tests/gitfixtures.py       
2014-10-08 14:13:42.000000000 +0200
+++ new/obs-service-tar_scm-0.5.1.1426664483.de67b88/tests/gitfixtures.py       
2015-03-18 08:44:40.000000000 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python2
 
 import os
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.5.0.1412769870.6cda976/tests/githgtests.py 
new/obs-service-tar_scm-0.5.1.1426664483.de67b88/tests/githgtests.py
--- old/obs-service-tar_scm-0.5.0.1412769870.6cda976/tests/githgtests.py        
2014-10-08 14:13:42.000000000 +0200
+++ new/obs-service-tar_scm-0.5.1.1426664483.de67b88/tests/githgtests.py        
2015-03-18 08:44:40.000000000 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python2
 
 import os
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.5.0.1412769870.6cda976/tests/gittests.py 
new/obs-service-tar_scm-0.5.1.1426664483.de67b88/tests/gittests.py
--- old/obs-service-tar_scm-0.5.0.1412769870.6cda976/tests/gittests.py  
2014-10-08 14:13:42.000000000 +0200
+++ new/obs-service-tar_scm-0.5.1.1426664483.de67b88/tests/gittests.py  
2015-03-18 08:44:40.000000000 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python2
 
 import datetime
 import os
@@ -66,8 +66,13 @@
     # N.B. --versionformat gets tested thoroughly in githgtests.py
 
     def test_versionformat_parenttag(self):
-        self.tar_scm_std('--versionformat', "@PARENT_TAG@")
-        self.assertTarOnly(self.basename(version=self.rev(2)))
+        # the .1 to catch newlines at the end of PARENT_TAG
+        self.tar_scm_std('--versionformat', "@[email protected]")
+        self.assertTarOnly(self.basename(version=self.rev(2)) + '.1')
+
+    def test_versionformat_tagoffset(self):
+        self.tar_scm_std('--versionformat', "@PARENT_TAG@.@TAG_OFFSET@")
+        self.assertTarOnly(self.basename(version=self.rev(2) + ".0"))
 
     def _submodule_fixture(self, submod_name):
         fix = self.fixtures
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.5.0.1412769870.6cda976/tests/hgfixtures.py 
new/obs-service-tar_scm-0.5.1.1426664483.de67b88/tests/hgfixtures.py
--- old/obs-service-tar_scm-0.5.0.1412769870.6cda976/tests/hgfixtures.py        
2014-10-08 14:13:42.000000000 +0200
+++ new/obs-service-tar_scm-0.5.1.1426664483.de67b88/tests/hgfixtures.py        
2015-03-18 08:44:40.000000000 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python2
 
 import os
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.5.0.1412769870.6cda976/tests/hgtests.py 
new/obs-service-tar_scm-0.5.1.1426664483.de67b88/tests/hgtests.py
--- old/obs-service-tar_scm-0.5.0.1412769870.6cda976/tests/hgtests.py   
2014-10-08 14:13:42.000000000 +0200
+++ new/obs-service-tar_scm-0.5.1.1426664483.de67b88/tests/hgtests.py   
2015-03-18 08:44:40.000000000 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python2
 
 import datetime
 
@@ -22,8 +22,8 @@
 
     abbrev_hash_format = '{node|short}'
     timestamp_format   = '{date}'
-    yyyymmdd_format    = '{date|shortdate}'
-    yyyymmddhhmmss_format = '{date|isodatesec}'
+    yyyymmdd_format    = '{date|localdate|shortdate}'
+    yyyymmddhhmmss_format = '{date|localdate|isodatesec}'
 
     def default_version(self):
         return self.rev(2)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.5.0.1412769870.6cda976/tests/scmlogs.py 
new/obs-service-tar_scm-0.5.1.1426664483.de67b88/tests/scmlogs.py
--- old/obs-service-tar_scm-0.5.0.1412769870.6cda976/tests/scmlogs.py   
2014-10-08 14:13:42.000000000 +0200
+++ new/obs-service-tar_scm-0.5.1.1426664483.de67b88/tests/scmlogs.py   
2015-03-18 08:44:40.000000000 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python2
 
 import glob
 import os
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.5.0.1412769870.6cda976/tests/svnfixtures.py 
new/obs-service-tar_scm-0.5.1.1426664483.de67b88/tests/svnfixtures.py
--- old/obs-service-tar_scm-0.5.0.1412769870.6cda976/tests/svnfixtures.py       
2014-10-08 14:13:42.000000000 +0200
+++ new/obs-service-tar_scm-0.5.1.1426664483.de67b88/tests/svnfixtures.py       
2015-03-18 08:44:40.000000000 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python2
 
 import os
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.5.0.1412769870.6cda976/tests/svntests.py 
new/obs-service-tar_scm-0.5.1.1426664483.de67b88/tests/svntests.py
--- old/obs-service-tar_scm-0.5.0.1412769870.6cda976/tests/svntests.py  
2014-10-08 14:13:42.000000000 +0200
+++ new/obs-service-tar_scm-0.5.1.1426664483.de67b88/tests/svntests.py  
2015-03-18 08:44:40.000000000 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python2
 
 from commontests import CommonTests
 from svnfixtures import SvnFixtures
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.5.0.1412769870.6cda976/tests/test.py 
new/obs-service-tar_scm-0.5.1.1426664483.de67b88/tests/test.py
--- old/obs-service-tar_scm-0.5.0.1412769870.6cda976/tests/test.py      
2014-10-08 14:13:42.000000000 +0200
+++ new/obs-service-tar_scm-0.5.1.1426664483.de67b88/tests/test.py      
2015-03-18 08:44:40.000000000 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python2
 #
 # This CLI tool is responsible for running the tests.
 # See TESTING.md for more information.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.5.0.1412769870.6cda976/tests/testassertions.py 
new/obs-service-tar_scm-0.5.1.1426664483.de67b88/tests/testassertions.py
--- old/obs-service-tar_scm-0.5.0.1412769870.6cda976/tests/testassertions.py    
2014-10-08 14:13:42.000000000 +0200
+++ new/obs-service-tar_scm-0.5.1.1426664483.de67b88/tests/testassertions.py    
2015-03-18 08:44:40.000000000 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python2
 
 import os
 from pprint import pprint, pformat
@@ -65,21 +65,30 @@
         self.assertEqual(expected, got, msg)
         return th, tarents
 
+    def assertSubdirDirents(self, entries, top):
+        self.assertEqual(entries[0].name, top)
+        self.assertEqual(entries[1].name, top + '/b')
+
     def assertStandardTar(self, tar, top):
         th, entries = self.assertNumTarEnts(tar, 5)
         entries.sort(lambda x, y: cmp(x.name, y.name))
         self.assertEqual(entries[0].name, top)
         self.assertEqual(entries[1].name, top + '/a')
         self.assertEqual(entries[2].name, top + '/c')
-        self.assertEqual(entries[3].name, top + '/subdir')
-        self.assertEqual(entries[4].name, top + '/subdir/b')
+        self.assertSubdirDirents(entries[3:], top + '/subdir')
         return th
 
     def assertSubdirTar(self, tar, top):
         th, entries = self.assertNumTarEnts(tar, 2)
         entries.sort(lambda x, y: cmp(x.name, y.name))
+        self.assertSubdirDirents(entries, top)
+        return th
+
+    def assertIncludeSubdirTar(self, tar, top):
+        th, entries = self.assertNumTarEnts(tar, 3)
+        entries.sort(lambda x, y: cmp(x.name, y.name))
         self.assertEqual(entries[0].name, top)
-        self.assertEqual(entries[1].name, top + '/b')
+        self.assertSubdirDirents(entries[1:], top + '/subdir')
         return th
 
     def checkTar(self, tar, tarbasename, toptardir=None, tarchecker=None):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.5.0.1412769870.6cda976/tests/testenv.py 
new/obs-service-tar_scm-0.5.1.1426664483.de67b88/tests/testenv.py
--- old/obs-service-tar_scm-0.5.0.1412769870.6cda976/tests/testenv.py   
2014-10-08 14:13:42.000000000 +0200
+++ new/obs-service-tar_scm-0.5.1.1426664483.de67b88/tests/testenv.py   
2015-03-18 08:44:40.000000000 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python2
 
 import datetime
 import os
@@ -165,7 +165,7 @@
 
         cmdargs = args + ['--outdir', self.outdir]
         quotedargs = ["'%s'" % arg for arg in cmdargs]
-        cmdstr = 'python %s %s 2>&1' % \
+        cmdstr = 'python2 %s %s 2>&1' % \
                  (self.tar_scm_bin(), " ".join(quotedargs))
         print
         print ">>>>>>>>>>>"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.5.0.1412769870.6cda976/tests/unittestcases.py 
new/obs-service-tar_scm-0.5.1.1426664483.de67b88/tests/unittestcases.py
--- old/obs-service-tar_scm-0.5.0.1412769870.6cda976/tests/unittestcases.py     
2014-10-08 14:13:42.000000000 +0200
+++ new/obs-service-tar_scm-0.5.1.1426664483.de67b88/tests/unittestcases.py     
2015-03-18 08:44:40.000000000 +0100
@@ -1,12 +1,9 @@
-#!/usr/bin/python
+#!/usr/bin/env python2
 
 import unittest
 import sys
 import os
 
-here = os.path.dirname(os.path.realpath(__file__))
-sys.path.append(os.path.join(here, '..'))
-
 from tar_scm import _calc_dir_to_clone_to
 
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/obs-service-tar_scm-0.5.0.1412769870.6cda976/tests/utils.py 
new/obs-service-tar_scm-0.5.1.1426664483.de67b88/tests/utils.py
--- old/obs-service-tar_scm-0.5.0.1412769870.6cda976/tests/utils.py     
2014-10-08 14:13:42.000000000 +0200
+++ new/obs-service-tar_scm-0.5.1.1426664483.de67b88/tests/utils.py     
2015-03-18 08:44:40.000000000 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python2
 #
 # Simple utility functions to help executing processes.
 

-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to