annotate rhodecode/lib/vcs/conf/settings.py @ 4186:7e5f8c12a3fc kallithea-2.2.5-rebrand

First step in two-part process to rename directories to kallithea. This first step is to change all references in the files where they refer to the old directory name.
author Bradley M. Kuhn <bkuhn@sfconservancy.org>
date Wed, 02 Jul 2014 19:04:28 -0400
parents d7488551578e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2007
324ac367a4da Added VCS into rhodecode core for faster and easier deployments of new versions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
1 import os
324ac367a4da Added VCS into rhodecode core for faster and easier deployments of new versions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
2 import tempfile
4186
7e5f8c12a3fc First step in two-part process to rename directories to kallithea.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 3797
diff changeset
3 from kallithea.lib.vcs.utils import aslist
7e5f8c12a3fc First step in two-part process to rename directories to kallithea.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 3797
diff changeset
4 from kallithea.lib.vcs.utils.paths import get_user_home
2007
324ac367a4da Added VCS into rhodecode core for faster and easier deployments of new versions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
5
324ac367a4da Added VCS into rhodecode core for faster and easier deployments of new versions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
6 abspath = lambda * p: os.path.abspath(os.path.join(*p))
324ac367a4da Added VCS into rhodecode core for faster and easier deployments of new versions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
7
324ac367a4da Added VCS into rhodecode core for faster and easier deployments of new versions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
8 VCSRC_PATH = os.environ.get('VCSRC_PATH')
324ac367a4da Added VCS into rhodecode core for faster and easier deployments of new versions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
9
324ac367a4da Added VCS into rhodecode core for faster and easier deployments of new versions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
10 if not VCSRC_PATH:
324ac367a4da Added VCS into rhodecode core for faster and easier deployments of new versions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
11 HOME_ = get_user_home()
324ac367a4da Added VCS into rhodecode core for faster and easier deployments of new versions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
12 if not HOME_:
324ac367a4da Added VCS into rhodecode core for faster and easier deployments of new versions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
13 HOME_ = tempfile.gettempdir()
324ac367a4da Added VCS into rhodecode core for faster and easier deployments of new versions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
14
324ac367a4da Added VCS into rhodecode core for faster and easier deployments of new versions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
15 VCSRC_PATH = VCSRC_PATH or abspath(HOME_, '.vcsrc')
324ac367a4da Added VCS into rhodecode core for faster and easier deployments of new versions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
16 if os.path.isdir(VCSRC_PATH):
324ac367a4da Added VCS into rhodecode core for faster and easier deployments of new versions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
17 VCSRC_PATH = os.path.join(VCSRC_PATH, '__init__.py')
324ac367a4da Added VCS into rhodecode core for faster and easier deployments of new versions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
18
3797
d7488551578e synced vcs with upstream
Marcin Kuzminski <marcin@python-works.com>
parents: 2007
diff changeset
19 # list of default encoding used in safe_unicode/safe_str methods
d7488551578e synced vcs with upstream
Marcin Kuzminski <marcin@python-works.com>
parents: 2007
diff changeset
20 DEFAULT_ENCODINGS = aslist('utf8')
d7488551578e synced vcs with upstream
Marcin Kuzminski <marcin@python-works.com>
parents: 2007
diff changeset
21
d7488551578e synced vcs with upstream
Marcin Kuzminski <marcin@python-works.com>
parents: 2007
diff changeset
22 # path to git executable runned by run_git_command function
d7488551578e synced vcs with upstream
Marcin Kuzminski <marcin@python-works.com>
parents: 2007
diff changeset
23 GIT_EXECUTABLE_PATH = 'git'
d7488551578e synced vcs with upstream
Marcin Kuzminski <marcin@python-works.com>
parents: 2007
diff changeset
24 # can be also --branches --tags
d7488551578e synced vcs with upstream
Marcin Kuzminski <marcin@python-works.com>
parents: 2007
diff changeset
25 GIT_REV_FILTER = '--all'
d7488551578e synced vcs with upstream
Marcin Kuzminski <marcin@python-works.com>
parents: 2007
diff changeset
26
2007
324ac367a4da Added VCS into rhodecode core for faster and easier deployments of new versions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
27 BACKENDS = {
4186
7e5f8c12a3fc First step in two-part process to rename directories to kallithea.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 3797
diff changeset
28 'hg': 'kallithea.lib.vcs.backends.hg.MercurialRepository',
7e5f8c12a3fc First step in two-part process to rename directories to kallithea.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents: 3797
diff changeset
29 'git': 'kallithea.lib.vcs.backends.git.GitRepository',
2007
324ac367a4da Added VCS into rhodecode core for faster and easier deployments of new versions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
30 }
324ac367a4da Added VCS into rhodecode core for faster and easier deployments of new versions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
31
324ac367a4da Added VCS into rhodecode core for faster and easier deployments of new versions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
32 ARCHIVE_SPECS = {
324ac367a4da Added VCS into rhodecode core for faster and easier deployments of new versions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
33 'tar': ('application/x-tar', '.tar'),
324ac367a4da Added VCS into rhodecode core for faster and easier deployments of new versions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
34 'tbz2': ('application/x-bzip2', '.tar.bz2'),
324ac367a4da Added VCS into rhodecode core for faster and easier deployments of new versions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
35 'tgz': ('application/x-gzip', '.tar.gz'),
324ac367a4da Added VCS into rhodecode core for faster and easier deployments of new versions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
36 'zip': ('application/zip', '.zip'),
324ac367a4da Added VCS into rhodecode core for faster and easier deployments of new versions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
37 }