From c34e9ca4ea79504020b57114176c77cbe8f5dcc4 2008-03-15 08:07:04 From: Ville M. Vainio Date: 2008-03-15 08:07:04 Subject: [PATCH] merge --- diff --git a/IPython/Extensions/ipy_completers.py b/IPython/Extensions/ipy_completers.py index e5644cb..10ed5dc 100644 --- a/IPython/Extensions/ipy_completers.py +++ b/IPython/Extensions/ipy_completers.py @@ -211,10 +211,15 @@ def hg_completer(self,event): +__bzr_commands = None + def bzr_commands(): + global __bzr_commands + if __bzr_commands is not None: + return __bzr_commands out = os.popen('bzr help commands') - return [l.split()[0] for l in out] - + __bzr_commands = [l.split()[0] for l in out] + return __bzr_commands def bzr_completer(self,event): """ Completer for bazaar commands """ diff --git a/tools/make_tarball.py b/tools/make_tarball.py index 80bd309..7768bcd 100755 --- a/tools/make_tarball.py +++ b/tools/make_tarball.py @@ -1,12 +1,7 @@ import os,sys,shutil -repo = "http://ipython.scipy.org/svn/ipython/ipython/branches/0.7.3" -basename = 'ipython' -workdir = './mkdist' - -workdir = os.path.abspath(workdir) +basever = '0.8.3' -print "working at",workdir def oscmd(c): print ">",c s = os.system(c) @@ -14,15 +9,24 @@ def oscmd(c): print "Error",s sys.exit(s) +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 + +basename = 'ipython' + +#tarname = '%s.r%s.tgz' % (basename, ver) +oscmd('update_revnum.py') + +ver = verinfo() -assert not os.path.isdir(workdir) -os.mkdir(workdir) -os.chdir(workdir) +if ver['branch-nick'] == 'ipython': + tarname = 'ipython-%s.bzr.r%s.tgz' % (basever, ver['revno']) +else: + tarname = 'ipython-%s.bzr.r%s.%s.tgz' % (basever, ver['revno'], ver['branch-nick']) + +oscmd('bzr export ' + tarname) -oscmd('svn export %s %s' % (repo,basename)) -ver = os.popen('svnversion ../..').read().strip() -tarname = '%s.r%s.tgz' % (basename, ver) -oscmd('tar czvf ../%s %s' % (tarname, basename)) -print "Produced: ",os.path.abspath('../' + tarname) -os.chdir('/') -shutil.rmtree(workdir)