From a0b60e3a4082c8c5533ae5e48ed04c941ec15bbc Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Wed, 9 Jan 2008 10:55:23 +0000 Subject: [PATCH] cosmetic about changelog prompting --- module-tag.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/module-tag.py b/module-tag.py index 5d2c852c..1699a2dc 100755 --- a/module-tag.py +++ b/module-tag.py @@ -264,10 +264,12 @@ class Module: def unignored_lines (self, logfile): result=[] + exclude="Tagging module %s"%self.name for logline in file(logfile).readlines(): if logline.strip() == Module.svn_magic_line: break - result += logline + if logline.find(exclude) < 0: + result += [ logline ] return result def insert_changelog (self, logfile, oldtag, newtag): @@ -287,7 +289,7 @@ class Module: oldtag,newtag) new.write(datepart+" "+logpart+"\n") for logline in self.unignored_lines(logfile): - new.write(logline) + new.write("- " + logline) new.write("\n") spec.close() new.close() @@ -433,14 +435,13 @@ The module-init function has the following limitations # so we can provide useful information, such as version numbers and diff # in the same file changelog="/tmp/%s-%d.txt"%(self.name,os.getpid()) - file(changelog,"w").write(""" + file(changelog,"w").write("""Tagging module %s -- from %s to %s + %s -module %s -old tag %s -new tag %s -"""%(Module.svn_magic_line,self.name,old_tag_url,new_tag_url)) +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 run diff',True): + 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)) if self.options.debug: -- 2.47.0