~ubuntu-branches/ubuntu/karmic/pypy/karmic

« back to all changes in this revision

Viewing changes to pypy/tool/pypyrev.py

  • Committer: Bazaar Package Importer
  • Author(s): Alexandre Fayolle
  • Date: 2007-04-13 09:33:09 UTC
  • Revision ID: james.westby@ubuntu.com-20070413093309-yoojh4jcoocu2krz
Tags: upstream-1.0.0
ImportĀ upstreamĀ versionĀ 1.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
import pypy
 
3
import py
 
4
 
 
5
def pypyrev(cache=[]): 
 
6
    """ return subversion revision number for current pypy package. 
 
7
    """
 
8
    try:
 
9
        return cache[0]
 
10
    except IndexError: 
 
11
        pypydir = py.path.svnwc(pypy.__file__).dirpath()
 
12
        rev = pypydir.info().rev 
 
13
        cache.append(rev) 
 
14
        return rev 
 
15