def unignored_lines (self, logfile):
result=[]
exclude="Tagging module %s"%self.name
+ white_line_matcher = re.compile("\A\s*\Z")
for logline in file(logfile).readlines():
if logline.strip() == Module.svn_magic_line:
break
- if logline.find(exclude) < 0:
- result += [ logline ]
+ if logline.find(exclude) >= 0:
+ continue
+ elif white_line_matcher.match(logline):
+ continue
+ else:
+ result.append(logline.strip()+'\n')
return result
def insert_changelog (self, logfile, oldtag, newtag):
buildname=Module.config['build']
except:
buildname="build"
+ if self.options.build_branch:
+ buildname+=":"+self.options.build_branch
build = Module(buildname,self.options)
build.init_moddir()
build.init_edge_dir()
if mode == "tag" :
parser.add_option("-c","--no-changelog", action="store_false", dest="changelog", default=True,
help="do not update changelog section in specfile when tagging")
+ parser.add_option("-b","--build-branch", action="store", dest="build_branch", default=None,
+ help="specify a build branch; used for locating the *tags*.mk files where adoption is to take place")
if mode == "tag" or mode == "sync" :
parser.add_option("-e","--editor", action="store", dest="editor", default=default_editor(),
help="specify editor")