annotate rhodecode/__init__.py @ 1228:73434499fa72

merges for stable
author Marcin Kuzminski <marcin@python-works.com>
date Sat, 09 Apr 2011 11:22:32 +0200
parents 45fed9a435b7
children bf263968da47
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
807
e8c9ff1da9ba added revision into version for beta
Marcin Kuzminski <marcin@python-works.com>
parents: 710
diff changeset
1 # -*- coding: utf-8 -*-
e8c9ff1da9ba added revision into version for beta
Marcin Kuzminski <marcin@python-works.com>
parents: 710
diff changeset
2 """
827
c3480c69fa4e small fixes to get_version
Marcin Kuzminski <marcin@python-works.com>
parents: 807
diff changeset
3 rhodecode.__init__
c3480c69fa4e small fixes to get_version
Marcin Kuzminski <marcin@python-works.com>
parents: 807
diff changeset
4 ~~~~~~~~~~~~~~~~~~
807
e8c9ff1da9ba added revision into version for beta
Marcin Kuzminski <marcin@python-works.com>
parents: 710
diff changeset
5
e8c9ff1da9ba added revision into version for beta
Marcin Kuzminski <marcin@python-works.com>
parents: 710
diff changeset
6 RhodeCode, a web based repository management based on pylons
e8c9ff1da9ba added revision into version for beta
Marcin Kuzminski <marcin@python-works.com>
parents: 710
diff changeset
7 versioning implementation: http://semver.org/
e8c9ff1da9ba added revision into version for beta
Marcin Kuzminski <marcin@python-works.com>
parents: 710
diff changeset
8
e8c9ff1da9ba added revision into version for beta
Marcin Kuzminski <marcin@python-works.com>
parents: 710
diff changeset
9 :created_on: Apr 9, 2010
e8c9ff1da9ba added revision into version for beta
Marcin Kuzminski <marcin@python-works.com>
parents: 710
diff changeset
10 :author: marcink
1209
45fed9a435b7 merges for upcoming release
Marcin Kuzminski <marcin@python-works.com>
parents: 1172
diff changeset
11 :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>
807
e8c9ff1da9ba added revision into version for beta
Marcin Kuzminski <marcin@python-works.com>
parents: 710
diff changeset
12 :license: GPLv3, see COPYING for more details.
e8c9ff1da9ba added revision into version for beta
Marcin Kuzminski <marcin@python-works.com>
parents: 710
diff changeset
13 """
1209
45fed9a435b7 merges for upcoming release
Marcin Kuzminski <marcin@python-works.com>
parents: 1172
diff changeset
14 # This program is free software: you can redistribute it and/or modify
45fed9a435b7 merges for upcoming release
Marcin Kuzminski <marcin@python-works.com>
parents: 1172
diff changeset
15 # it under the terms of the GNU General Public License as published by
45fed9a435b7 merges for upcoming release
Marcin Kuzminski <marcin@python-works.com>
parents: 1172
diff changeset
16 # the Free Software Foundation, either version 3 of the License, or
45fed9a435b7 merges for upcoming release
Marcin Kuzminski <marcin@python-works.com>
parents: 1172
diff changeset
17 # (at your option) any later version.
45fed9a435b7 merges for upcoming release
Marcin Kuzminski <marcin@python-works.com>
parents: 1172
diff changeset
18 #
252
3782a6d698af licensing updates, code cleanups
Marcin Kuzminski <marcin@python-works.com>
parents: 246
diff changeset
19 # This program is distributed in the hope that it will be useful,
3782a6d698af licensing updates, code cleanups
Marcin Kuzminski <marcin@python-works.com>
parents: 246
diff changeset
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
3782a6d698af licensing updates, code cleanups
Marcin Kuzminski <marcin@python-works.com>
parents: 246
diff changeset
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3782a6d698af licensing updates, code cleanups
Marcin Kuzminski <marcin@python-works.com>
parents: 246
diff changeset
22 # GNU General Public License for more details.
1209
45fed9a435b7 merges for upcoming release
Marcin Kuzminski <marcin@python-works.com>
parents: 1172
diff changeset
23 #
252
3782a6d698af licensing updates, code cleanups
Marcin Kuzminski <marcin@python-works.com>
parents: 246
diff changeset
24 # You should have received a copy of the GNU General Public License
1209
45fed9a435b7 merges for upcoming release
Marcin Kuzminski <marcin@python-works.com>
parents: 1172
diff changeset
25 # along with this program. If not, see <http://www.gnu.org/licenses/>.
1136
93b980ebee55 changes for release 1.1.5
Marcin Kuzminski <marcin@python-works.com>
parents: 1071
diff changeset
26 import platform
185
3380ca40cdba added version generation to pylons_app and showed it into template. Propagated baseController with some data for acces into each controller. Fixed simplehg middleware to get proper name of application
Marcin Kuzminski <marcin@python-works.com>
parents: 0
diff changeset
27
1209
45fed9a435b7 merges for upcoming release
Marcin Kuzminski <marcin@python-works.com>
parents: 1172
diff changeset
28 VERSION = (1, 1, 8)
807
e8c9ff1da9ba added revision into version for beta
Marcin Kuzminski <marcin@python-works.com>
parents: 710
diff changeset
29 __version__ = '.'.join((str(each) for each in VERSION[:4]))
1209
45fed9a435b7 merges for upcoming release
Marcin Kuzminski <marcin@python-works.com>
parents: 1172
diff changeset
30 __dbversion__ = 2 # defines current db version for migrations
1136
93b980ebee55 changes for release 1.1.5
Marcin Kuzminski <marcin@python-works.com>
parents: 1071
diff changeset
31 __platform__ = platform.system()
1209
45fed9a435b7 merges for upcoming release
Marcin Kuzminski <marcin@python-works.com>
parents: 1172
diff changeset
32 __license__ = 'GPLv3'
185
3380ca40cdba added version generation to pylons_app and showed it into template. Propagated baseController with some data for acces into each controller. Fixed simplehg middleware to get proper name of application
Marcin Kuzminski <marcin@python-works.com>
parents: 0
diff changeset
33
1228
73434499fa72 merges for stable
Marcin Kuzminski <marcin@python-works.com>
parents: 1209
diff changeset
34 PLATFORM_WIN = ('Windows')
73434499fa72 merges for stable
Marcin Kuzminski <marcin@python-works.com>
parents: 1209
diff changeset
35 PLATFORM_OTHERS = ('Linux', 'Darwin', 'FreeBSD', 'OpenBSD')
1165
c5af1d3c861f changes for rhodecode release 1.1.6
Marcin Kuzminski <marcin@python-works.com>
parents: 1136
diff changeset
36
852
b76da6f22e0f fixed some problems with python setup.py operations due to import problems
Marcin Kuzminski <marcin@python-works.com>
parents: 836
diff changeset
37 try:
b76da6f22e0f fixed some problems with python setup.py operations due to import problems
Marcin Kuzminski <marcin@python-works.com>
parents: 836
diff changeset
38 from rhodecode.lib.utils import get_current_revision
b76da6f22e0f fixed some problems with python setup.py operations due to import problems
Marcin Kuzminski <marcin@python-works.com>
parents: 836
diff changeset
39 _rev = get_current_revision()
b76da6f22e0f fixed some problems with python setup.py operations due to import problems
Marcin Kuzminski <marcin@python-works.com>
parents: 836
diff changeset
40 except ImportError:
b76da6f22e0f fixed some problems with python setup.py operations due to import problems
Marcin Kuzminski <marcin@python-works.com>
parents: 836
diff changeset
41 #this is needed when doing some setup.py operations
b76da6f22e0f fixed some problems with python setup.py operations due to import problems
Marcin Kuzminski <marcin@python-works.com>
parents: 836
diff changeset
42 _rev = False
827
c3480c69fa4e small fixes to get_version
Marcin Kuzminski <marcin@python-works.com>
parents: 807
diff changeset
43
c3480c69fa4e small fixes to get_version
Marcin Kuzminski <marcin@python-works.com>
parents: 807
diff changeset
44 if len(VERSION) > 3 and _rev:
807
e8c9ff1da9ba added revision into version for beta
Marcin Kuzminski <marcin@python-works.com>
parents: 710
diff changeset
45 __version__ += ' [rev:%s]' % _rev[0]
185
3380ca40cdba added version generation to pylons_app and showed it into template. Propagated baseController with some data for acces into each controller. Fixed simplehg middleware to get proper name of application
Marcin Kuzminski <marcin@python-works.com>
parents: 0
diff changeset
46
1209
45fed9a435b7 merges for upcoming release
Marcin Kuzminski <marcin@python-works.com>
parents: 1172
diff changeset
47
185
3380ca40cdba added version generation to pylons_app and showed it into template. Propagated baseController with some data for acces into each controller. Fixed simplehg middleware to get proper name of application
Marcin Kuzminski <marcin@python-works.com>
parents: 0
diff changeset
48 def get_version():
827
c3480c69fa4e small fixes to get_version
Marcin Kuzminski <marcin@python-works.com>
parents: 807
diff changeset
49 """Returns shorter version (digit parts only) as string."""
c3480c69fa4e small fixes to get_version
Marcin Kuzminski <marcin@python-works.com>
parents: 807
diff changeset
50
185
3380ca40cdba added version generation to pylons_app and showed it into template. Propagated baseController with some data for acces into each controller. Fixed simplehg middleware to get proper name of application
Marcin Kuzminski <marcin@python-works.com>
parents: 0
diff changeset
51 return '.'.join((str(each) for each in VERSION[:3]))
710
e2f3c8e6939d Disable git support due to large problems with dulwich.
Marcin Kuzminski <marcin@python-works.com>
parents: 631
diff changeset
52
e2f3c8e6939d Disable git support due to large problems with dulwich.
Marcin Kuzminski <marcin@python-works.com>
parents: 631
diff changeset
53 BACKENDS = {
e2f3c8e6939d Disable git support due to large problems with dulwich.
Marcin Kuzminski <marcin@python-works.com>
parents: 631
diff changeset
54 'hg': 'Mercurial repository',
1228
73434499fa72 merges for stable
Marcin Kuzminski <marcin@python-works.com>
parents: 1209
diff changeset
55 #'git': 'Git repository',
710
e2f3c8e6939d Disable git support due to large problems with dulwich.
Marcin Kuzminski <marcin@python-works.com>
parents: 631
diff changeset
56 }