##// END OF EJS Templates
Fixes for Jorgen's branch in tests to genutils....
Fixes for Jorgen's branch in tests to genutils. - Make sure that tests run correctly with out write access to test dir. - Fix failure in Unix that depended on where the tests were being run from. - Cleanup: uppercase globals and reuse them rather than recomputing hardcoded paths multiple time.

File last commit:

r1072:68e9cdaf
r1843:d22048f9
Show More
update_revnum.py
23 lines | 569 B | text/x-python | PythonLexer
#!/usr/bin/env python
""" Change the revision number in Release.py """
import os
import re,pprint
def verinfo():
out = os.popen('bzr version-info')
pairs = (l.split(':',1) for l in out)
d = dict(((k,v.strip()) for (k,v) in pairs))
return d
ver = verinfo()
pprint.pprint(ver)
rfile = open('../IPython/Release.py','rb').read()
newcont = re.sub(r'revision\s*=.*', "revision = '%s'" % ver['revno'], rfile)
newcont = re.sub(r'^branch\s*=[^=].*', "branch = '%s'" % ver['branch-nick'], newcont )
open('../IPython/Release.py','wb').write(newcont)