##// END OF EJS Templates
scripts: docs-headings: improve performance by grouping 'hg diff' invocations...
Thomas De Schampheleire -
r7419:a188803d default
parent child Browse files
Show More
@@ -30,8 +30,9 b" headermatch = re.compile(r'''\\n*(.+)\\n(["
30 30
31 31
32 32 def main():
33 for fn in subprocess.check_output(['hg', 'loc', 'set:**.rst+kallithea/i18n/how_to']).splitlines():
34 print 'processing %s:' % fn
33 filenames = subprocess.check_output(['hg', 'loc', 'set:**.rst+kallithea/i18n/how_to']).splitlines()
34 for fn in filenames:
35 print 'processing %s' % fn
35 36 s = open(fn).read()
36 37
37 38 # find levels and their styles
@@ -72,8 +73,8 b' def main():'
72 73 s = re.sub(r'''\n+((?:\.\. _[^\n]*\n)+)$''', r'\n\n\n\1', s)
73 74
74 75 open(fn, 'w').write(s)
75 print subprocess.check_output(['hg', 'diff', fn])
76 print
76
77 print subprocess.check_output(['hg', 'diff'] + filenames)
77 78
78 79 if __name__ == '__main__':
79 80 main()
General Comments 0
You need to be logged in to leave comments. Login now