annotate rhodecode/__init__.py @ 807:e8c9ff1da9ba beta

added revision into version for beta
author Marcin Kuzminski <marcin@python-works.com>
date Sun, 05 Dec 2010 00:52:11 +0100
parents e2f3c8e6939d
children c3480c69fa4e
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 """
e8c9ff1da9ba added revision into version for beta
Marcin Kuzminski <marcin@python-works.com>
parents: 710
diff changeset
3 package.rhodecode.__init__
e8c9ff1da9ba added revision into version for beta
Marcin Kuzminski <marcin@python-works.com>
parents: 710
diff changeset
4 ~~~~~~~~~~~~~~
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
e8c9ff1da9ba added revision into version for beta
Marcin Kuzminski <marcin@python-works.com>
parents: 710
diff changeset
11 :copyright: (C) 2009-2010 Marcin Kuzminski <marcin@python-works.com>
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 """
252
3782a6d698af licensing updates, code cleanups
Marcin Kuzminski <marcin@python-works.com>
parents: 246
diff changeset
14 # This program is free software; you can redistribute it and/or
3782a6d698af licensing updates, code cleanups
Marcin Kuzminski <marcin@python-works.com>
parents: 246
diff changeset
15 # modify it under the terms of the GNU General Public License
3782a6d698af licensing updates, code cleanups
Marcin Kuzminski <marcin@python-works.com>
parents: 246
diff changeset
16 # as published by the Free Software Foundation; version 2
3782a6d698af licensing updates, code cleanups
Marcin Kuzminski <marcin@python-works.com>
parents: 246
diff changeset
17 # of the License or (at your opinion) any later version of the license.
3782a6d698af licensing updates, code cleanups
Marcin Kuzminski <marcin@python-works.com>
parents: 246
diff changeset
18 #
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.
3782a6d698af licensing updates, code cleanups
Marcin Kuzminski <marcin@python-works.com>
parents: 246
diff changeset
23 #
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
3782a6d698af licensing updates, code cleanups
Marcin Kuzminski <marcin@python-works.com>
parents: 246
diff changeset
25 # along with this program; if not, write to the Free Software
3782a6d698af licensing updates, code cleanups
Marcin Kuzminski <marcin@python-works.com>
parents: 246
diff changeset
26 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
3782a6d698af licensing updates, code cleanups
Marcin Kuzminski <marcin@python-works.com>
parents: 246
diff changeset
27 # MA 02110-1301, USA.
807
e8c9ff1da9ba added revision into version for beta
Marcin Kuzminski <marcin@python-works.com>
parents: 710
diff changeset
28
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
29
631
05528ad948c4 Hacking for git support,and new faster repo scan
Marcin Kuzminski <marcin@python-works.com>
parents: 592
diff changeset
30 VERSION = (1, 1, 0, 'beta')
807
e8c9ff1da9ba added revision into version for beta
Marcin Kuzminski <marcin@python-works.com>
parents: 710
diff changeset
31 __version__ = '.'.join((str(each) for each in VERSION[:4]))
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
32
807
e8c9ff1da9ba added revision into version for beta
Marcin Kuzminski <marcin@python-works.com>
parents: 710
diff changeset
33
e8c9ff1da9ba added revision into version for beta
Marcin Kuzminski <marcin@python-works.com>
parents: 710
diff changeset
34 from rhodecode.lib.utils import get_current_revision
e8c9ff1da9ba added revision into version for beta
Marcin Kuzminski <marcin@python-works.com>
parents: 710
diff changeset
35 _rev = get_current_revision()
e8c9ff1da9ba added revision into version for beta
Marcin Kuzminski <marcin@python-works.com>
parents: 710
diff changeset
36 if 'beta' in VERSION and _rev:
e8c9ff1da9ba added revision into version for beta
Marcin Kuzminski <marcin@python-works.com>
parents: 710
diff changeset
37 __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
38
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
39 def get_version():
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
40 """
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
41 Returns shorter version (digit parts only) as string.
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
42 """
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
43 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
44
e2f3c8e6939d Disable git support due to large problems with dulwich.
Marcin Kuzminski <marcin@python-works.com>
parents: 631
diff changeset
45 BACKENDS = {
e2f3c8e6939d Disable git support due to large problems with dulwich.
Marcin Kuzminski <marcin@python-works.com>
parents: 631
diff changeset
46 'hg': 'Mercurial repository',
e2f3c8e6939d Disable git support due to large problems with dulwich.
Marcin Kuzminski <marcin@python-works.com>
parents: 631
diff changeset
47 #'git': 'Git repository',
e2f3c8e6939d Disable git support due to large problems with dulwich.
Marcin Kuzminski <marcin@python-works.com>
parents: 631
diff changeset
48 }