summaryrefslogtreecommitdiff
path: root/django/utils/version.py
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2012-04-29 13:40:10 +0200
committerAymeric Augustin <aymeric.augustin@m4x.org>2012-04-29 13:40:10 +0200
commit02a5b41db4ff8544f93a5d9854b346a9aae4f556 (patch)
treeb9041003697ed9a2e803cde8db12aed98a1b6f0b /django/utils/version.py
parent905bd7fb44a0dbd0be0d455ab428c388714ae700 (diff)
Fixed #18224 -- Changed the dev version number.
Following the move from SVN to git.
Diffstat (limited to 'django/utils/version.py')
-rw-r--r--django/utils/version.py41
1 files changed, 0 insertions, 41 deletions
diff --git a/django/utils/version.py b/django/utils/version.py
deleted file mode 100644
index cb8623b103..0000000000
--- a/django/utils/version.py
+++ /dev/null
@@ -1,41 +0,0 @@
-import django
-import re
-
-def get_svn_revision(path=None):
- """
- Returns the SVN revision in the form SVN-XXXX,
- where XXXX is the revision number.
-
- Returns SVN-unknown if anything goes wrong, such as an unexpected
- format of internal SVN files.
-
- If path is provided, it should be a directory whose SVN info you want to
- inspect. If it's not provided, this will use the root django/ package
- directory.
- """
- rev = None
- if path is None:
- path = django.__path__[0]
- entries_path = '%s/.svn/entries' % path
-
- try:
- entries = open(entries_path, 'r').read()
- except IOError:
- pass
- else:
- # Versions >= 7 of the entries file are flat text. The first line is
- # the version number. The next set of digits after 'dir' is the revision.
- if re.match('(\d+)', entries):
- rev_match = re.search('\d+\s+dir\s+(\d+)', entries)
- if rev_match:
- rev = rev_match.groups()[0]
- # Older XML versions of the file specify revision as an attribute of
- # the first entries node.
- else:
- from xml.dom import minidom
- dom = minidom.parse(entries_path)
- rev = dom.getElementsByTagName('entry')[0].getAttribute('revision')
-
- if rev:
- return u'SVN-%s' % rev
- return u'SVN-unknown'