diff --git a/IPython/Release.py b/IPython/Release.py index d2f543c..50094ad 100644 --- a/IPython/Release.py +++ b/IPython/Release.py @@ -22,9 +22,13 @@ name = 'ipython' # because bdist_rpm does not accept dashes (an RPM) convention, and # bdist_deb does not accept underscores (a Debian convention). -revision = '54' +revision = '57' +branch = 'ipython' -version = '0.8.3.bzr.r' + revision +if branch == 'ipython': + version = '0.8.3.bzr.r' + revision +else: + version = '0.8.3.bzr.r%s.%s' % (revision,branch) description = "An enhanced interactive Python shell." diff --git a/tools/update_revnum.py b/tools/update_revnum.py index 87e4f0b..f97b933 100755 --- a/tools/update_revnum.py +++ b/tools/update_revnum.py @@ -2,13 +2,22 @@ """ Change the revision number in Release.py """ import os -import re +import re,pprint -rev = os.popen('bzr revno').read().strip() +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 -print "current rev is",rev -assert ':' not in rev +ver = verinfo() + +pprint.pprint(ver) rfile = open('../IPython/Release.py','rb').read() -newcont = re.sub(r'revision\s*=.*', "revision = '%s'" % rev, rfile) +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)