Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

removed svn stuff (this is github after all), and increased version n…

…umber
  • Loading branch information...
commit abafaa463810a3df59d2760f0e24aad06baa49db 1 parent 839f4c4
Mark IJbema authored May 11, 2011

Showing 1 changed file with 2 additions and 44 deletions. Show diff stats Hide diff stats

  1. 46  colors/__init__.py
46  colors/__init__.py
... ...
@@ -1,50 +1,11 @@
1  
-VERSION = (0, 0, 2, 'alpha', 0)
  1
+VERSION = (0, 0, 3, 'alpha', 0)
2 2
 
3 3
 # Most of this code is taken form from the Django project
4 4
 
5 5
 import os.path, re, colors
6 6
 
7  
-def get_svn_revision(path=None):
8  
-    """
9  
-    Returns the SVN revision in the form SVN-XXXX,
10  
-    where XXXX is the revision number.
11  
-
12  
-    Returns SVN-unknown if anything goes wrong, such as an unexpected
13  
-    format of internal SVN files.
14  
-
15  
-    If path is provided, it should be a directory whose SVN info you want to
16  
-    inspect. If it's not provided, this will use the root colors/ package
17  
-    directory.
18  
-    """
19  
-    rev = None
20  
-    if path is None:
21  
-        path = colors.__path__[0]
22  
-    entries_path = '%s/.svn/entries' % path
23  
-
24  
-    try:
25  
-        entries = open(entries_path, 'r').read()
26  
-    except IOError:
27  
-        pass
28  
-    else:
29  
-        # Versions >= 7 of the entries file are flat text.  The first line is
30  
-        # the version number. The next set of digits after 'dir' is the revision.
31  
-        if re.match('(\d+)', entries):
32  
-            rev_match = re.search('\d+\s+dir\s+(\d+)', entries)
33  
-            if rev_match:
34  
-                rev = rev_match.groups()[0]
35  
-        # Older XML versions of the file specify revision as an attribute of
36  
-        # the first entries node.
37  
-        else:
38  
-            from xml.dom import minidom
39  
-            dom = minidom.parse(entries_path)
40  
-            rev = dom.getElementsByTagName('entry')[0].getAttribute('revision')
41  
-
42  
-    if rev:
43  
-        return u'SVN-%s' % rev
44  
-    return u'SVN-unknown'
45  
-
46  
-
47 7
 def get_version():
  8
+    return '0.0.3'
48 9
     version = '%s.%s' % (VERSION[0], VERSION[1])
49 10
     if VERSION[2]:
50 11
         version = '%s.%s' % (version, VERSION[2])
@@ -53,7 +14,4 @@ def get_version():
53 14
     else:
54 15
         if VERSION[3] != 'final':
55 16
             version = '%s %s %s' % (version, VERSION[3], VERSION[4])
56  
-    svn_rev = get_svn_revision()
57  
-    if svn_rev != u'SVN-unknown':
58  
-        version = "%s %s" % (version, svn_rev)
59 17
     return version

0 notes on commit abafaa4

Please sign in to comment.
Something went wrong with that request. Please try again.