for sk in svn_keywords:
if k in svn_keywords[sk]:
if options.clean:
- buf = re.sub(get_svn_keyword_re(sk), '$\\1$', buf)
+ buf = get_svn_keyword_re(sk).sub('$\\1$', buf)
elif sk == 'Id':
id_str = ' '.join([info_dict['Name'],
info_dict['Revision'],
info_dict['Date'],
info_dict['Author']])
- buf = re.sub(get_svn_keyword_re(sk), '$\\1: ' + id_str + ' $', buf)
+ buf = get_svn_keyword_re(sk).sub('$\\1: ' + id_str + ' $', buf)
else:
- buf = re.sub(get_svn_keyword_re(sk), '$\\1: ' + info_dict[sk] + ' $', buf)
+ buf = get_svn_keyword_re(sk).sub('$\\1: ' + info_dict[sk] + ' $', buf)
with open(os.path.join(g.wd, path), 'w') as f:
f.write(buf)