annotate publish.py @ 27:dc4be35d17e0

Bug fixes Bug fix: compat.py now works in Python 3 (module __builtin__ was renamed builtins). Bug fix: random spaces in the indentation of testcases.py have been removed. Bug fix: false dummy{in,out}name's are now again replaced with the values of testcase{in,out}name.
author Oleg Oshmyan <chortos@inbox.lv>
date Fri, 15 Oct 2010 22:17:31 +0000
parents a2c9f7cfa174
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10
c87ec78f1fae Auto-update and revision number reporting added
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
1 #! /usr/bin/python
c87ec78f1fae Auto-update and revision number reporting added
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
2 # Copyright (c) 2009-2010 Chortos-2 <chortos@inbox.lv>
c87ec78f1fae Auto-update and revision number reporting added
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
3
11
231e3317477d More version reporting
Oleg Oshmyan <chortos@inbox.lv>
parents: 10
diff changeset
4 with open('test-svn.py') as t:
10
c87ec78f1fae Auto-update and revision number reporting added
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
5 f = t.read()
c87ec78f1fae Auto-update and revision number reporting added
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
6 i = f.find('# $Rev: ')
c87ec78f1fae Auto-update and revision number reporting added
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
7 j = f.find('\n', i)
13
a2c9f7cfa174 $Rev$ substitution still
Oleg Oshmyan <chortos@inbox.lv>
parents: 11
diff changeset
8 rev = f[i+8:j-2]
10
c87ec78f1fae Auto-update and revision number reporting added
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
9 f = f[0:i] + f[j+1:]
c87ec78f1fae Auto-update and revision number reporting added
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
10 f = f.replace('$$REV$$', rev)
11
231e3317477d More version reporting
Oleg Oshmyan <chortos@inbox.lv>
parents: 10
diff changeset
11 with open('test.py', 'wb') as t:
10
c87ec78f1fae Auto-update and revision number reporting added
Oleg Oshmyan <chortos@inbox.lv>
parents:
diff changeset
12 t.write(f)