From c135514295f5f759d555d82946c9cb66c418ee88a7fa66d0df026603f77919c5 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Wed, 3 Oct 2012 16:41:45 +0000 Subject: [PATCH] Accepting request 136480 from home:cthiel1:branches:openSUSE:Tools - change default versionformat from author date (%at) to commiter date (%ct) for git, to fix issues with cherry-picked commits resulting in decreased version OBS-URL: https://build.opensuse.org/request/show/136480 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Tools/obs-service-tar_scm?expand=0&rev=52 --- gitfixtures.py | 2 +- gittests.py | 2 +- obs-service-tar_scm.changes | 7 +++++++ tar_scm | 2 +- tar_scm.service | 2 +- 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/gitfixtures.py b/gitfixtures.py index d201118..b87ca9f 100644 --- a/gitfixtures.py +++ b/gitfixtures.py @@ -37,7 +37,7 @@ class GitFixtures(Fixtures): tag = 'tag' + str(rev_num) self.run('tag ' + tag) self.revs[rev_num] = tag - self.timestamps[tag] = self.get_metadata('%at') + self.timestamps[tag] = self.get_metadata('%ct') self.sha1s[tag] = self.get_metadata('%h') self.scmlogs.annotate( "Recorded rev %d: id %s, timestamp %s, SHA1 %s" % \ diff --git a/gittests.py b/gittests.py index 2471004..34db4d3 100644 --- a/gittests.py +++ b/gittests.py @@ -11,7 +11,7 @@ class GitTests(GitHgTests): fixtures_class = GitFixtures abbrev_hash_format = '%h' - timestamp_format = '%at' + timestamp_format = '%ct' def default_version(self): return self.timestamps(self.rev(2)) diff --git a/obs-service-tar_scm.changes b/obs-service-tar_scm.changes index 4178de3..f75742f 100644 --- a/obs-service-tar_scm.changes +++ b/obs-service-tar_scm.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Oct 1 07:15:03 UTC 2012 - cthiel@suse.com + +- change default versionformat from author date (%at) to commiter date (%ct) + for git, to fix issues with cherry-picked commits resulting in decreased + version + ------------------------------------------------------------------- Mon Sep 24 11:47:27 UTC 2012 - jslaby@suse.com diff --git a/tar_scm b/tar_scm index 0c10665..99ef0f6 100644 --- a/tar_scm +++ b/tar_scm @@ -378,7 +378,7 @@ detect_version () { if [ -z "$MYFORMAT" ]; then case "$MYSCM" in git) - MYFORMAT="%at" + MYFORMAT="%ct" ;; hg) MYFORMAT="{rev}" diff --git a/tar_scm.service b/tar_scm.service index 35b7914..4db275b 100644 --- a/tar_scm.service +++ b/tar_scm.service @@ -20,7 +20,7 @@ Specify version to be used in tarball. Defaults to automatically detected value formatted by versionformat parameter. - Auto-generate version from checked out source using this format string. For git, value is passed via git show --pretty=format:... (default '%at'); for hg, via hg log --template=... (default '{rev}'); for bzr and svn, %r is revision (default '%r'). Overrides tarball name defined by version parameter. + Auto-generate version from checked out source using this format string. For git, value is passed via git show --pretty=format:... (default '%ct'); for hg, via hg log --template=... (default '{rev}'); for bzr and svn, %r is revision (default '%r'). Overrides tarball name defined by version parameter. specify a base version as prefix.