Ticket #5229: 5992 svn version extention.patch

File 5992 svn version extention.patch, 670 bytes (added by Collin Anderson <cmawebsite@…>, 17 years ago)

This will let you specify your own path, backwards compatible.

  • utils/version.py

     
    22import os.path
    33import re
    44
    5 def get_svn_revision():
     5def get_svn_revision(path=None):
    66    """
    77    Returns the SVN revision in the form SVN-XXXX,
    88    where XXXX is the revision number.
     
    1111    format of internal SVN files.
    1212    """
    1313    rev = None
    14     entries_path = '%s/.svn/entries' % django.__path__[0]
     14    entries_path = '%s/.svn/entries' % path or django.__path__[0]
    1515
    1616    if os.path.exists(entries_path):
    1717        entries = open(entries_path, 'r').read()
Back to Top