##// END OF EJS Templates
Merge in all development done in bzr since February 16 2008....
Merge in all development done in bzr since February 16 2008. At that time, a clean bzr branch was started from the SVN tree, but without SVN history. That SVN history has now been used as the basis of this branch, and the development done on the history-less BZR branch has been added and is the content of this merge. This branch will be the new official main line of development in Launchpad (equivalent to the old SVN trunk).

File last commit:

r1072:68e9cdaf
r1218:6b454030 merge
Show More
update_revnum.py
23 lines | 569 B | text/x-python | PythonLexer
ville
initialization (no svn history)
r988 #!/usr/bin/env python
""" Change the revision number in Release.py """
import os
Ville M. Vainio
version string in Release contains bzr branch if not 'ipython'
r1072 import re,pprint
ville
initialization (no svn history)
r988
Ville M. Vainio
version string in Release contains bzr branch if not 'ipython'
r1072 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
ville
initialization (no svn history)
r988
Ville M. Vainio
version string in Release contains bzr branch if not 'ipython'
r1072 ver = verinfo()
pprint.pprint(ver)
ville
initialization (no svn history)
r988
Ville M. Vainio
update_revnum opens the file in binary mode (does not botch CRLF)
r1052 rfile = open('../IPython/Release.py','rb').read()
Ville M. Vainio
version string in Release contains bzr branch if not 'ipython'
r1072 newcont = re.sub(r'revision\s*=.*', "revision = '%s'" % ver['revno'], rfile)
newcont = re.sub(r'^branch\s*=[^=].*', "branch = '%s'" % ver['branch-nick'], newcont )
Ville M. Vainio
update_revnum opens the file in binary mode (does not botch CRLF)
r1052 open('../IPython/Release.py','wb').write(newcont)