From: Thierry Parmentelat Date: Mon, 14 Jan 2008 14:41:35 +0000 (+0000) Subject: check diffs before tagging - util-vserver not yet subject to tags X-Git-Tag: 4.2-rc2~262 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=d9513719cdd432f8e275c04bba14907d889a6af9;p=build.git check diffs before tagging - util-vserver not yet subject to tags --- diff --git a/module-tag.py b/module-tag.py index 4a0813db..0ade8ebf 100755 --- a/module-tag.py +++ b/module-tag.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python -u subversion_id = "$Id: TestMain.py 7635 2008-01-04 09:46:06Z thierry $" @@ -370,11 +370,7 @@ The module-init function has the following limitations trunk_url=self.trunk_url() tag_url=self.tag_url(spec_dict) - for url in [ trunk_url, tag_url ] : - if not Svnpath(url,self.options).url_exists(): - print 'Could not find svn URL %s'%url - sys.exit(1) - + print 'x'*67,self.name self.run("svn diff %s %s"%(tag_url,trunk_url)) def patch_tags_file (self, tagsfile, oldname, newname): @@ -427,6 +423,13 @@ The module-init function has the following limitations print 'New tag\'s svn URL %s already exists ! '%url sys.exit(1) + # checking for diffs + diff_output=Command("svn diff %s %s"%(old_tag_url,trunk_url), + self.options).output_of() + if len(diff_output) == 0: + if not prompt ("No difference in trunk for module %s, want to tag anyway"%self.name,False): + return + # side effect in trunk's specfile self.patch_spec_var(spec_dict) @@ -442,7 +445,7 @@ Please write a changelog for this new tag in the section above """%(self.name,old_tag_name,new_tag_name,Module.svn_magic_line)) if not self.options.verbose or prompt('Want to see diffs while writing changelog',True): - self.run("(echo 'DIFF========='; svn diff %s %s) >> %s"%(old_tag_url,trunk_url,changelog)) + file(changelog,"w").write('DIFF=========\n' + diff_output) if self.options.debug: prompt('Proceed ?') diff --git a/modules.list b/modules.list index 39bee2e1..02b10052 100644 --- a/modules.list +++ b/modules.list @@ -25,7 +25,8 @@ proper pypcilib ulogd util-python -util-vserver +# using branches/scholz for this module +# util-vserver util-vserver-pl #svn: In directory '/Users/parmentelat/modules/vnetspec/trunk' #svn: Can't move source to dest