Ticket #5229: 5992 svn version extention.patch
File 5992 svn version extention.patch, 670 bytes (added by , 17 years ago) |
---|
-
utils/version.py
2 2 import os.path 3 3 import re 4 4 5 def get_svn_revision( ):5 def get_svn_revision(path=None): 6 6 """ 7 7 Returns the SVN revision in the form SVN-XXXX, 8 8 where XXXX is the revision number. … … 11 11 format of internal SVN files. 12 12 """ 13 13 rev = None 14 entries_path = '%s/.svn/entries' % django.__path__[0]14 entries_path = '%s/.svn/entries' % path or django.__path__[0] 15 15 16 16 if os.path.exists(entries_path): 17 17 entries = open(entries_path, 'r').read()