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
This commit is contained in:
parent
191fa2c9b3
commit
c135514295
@ -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" % \
|
||||
|
@ -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))
|
||||
|
@ -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
|
||||
|
||||
|
2
tar_scm
2
tar_scm
@ -378,7 +378,7 @@ detect_version () {
|
||||
if [ -z "$MYFORMAT" ]; then
|
||||
case "$MYSCM" in
|
||||
git)
|
||||
MYFORMAT="%at"
|
||||
MYFORMAT="%ct"
|
||||
;;
|
||||
hg)
|
||||
MYFORMAT="{rev}"
|
||||
|
@ -20,7 +20,7 @@
|
||||
<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. 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.</description>
|
||||
<description>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.</description>
|
||||
</parameter>
|
||||
<parameter name="versionprefix">
|
||||
<description>specify a base version as prefix.</description>
|
||||
|
Loading…
Reference in New Issue
Block a user