Mercurial > kallithea
comparison rhodecode/lib/paster_commands/repo_scan.py @ 3915:a42bfe8a9335 beta
moved make-index command to paster_commands module
- optimized imports and code
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Thu, 30 May 2013 00:01:16 +0200 |
parents | f1491bad8339 |
children | b58ed6d608cc |
comparison
equal
deleted
inserted
replaced
3914:424b6c711a7f | 3915:a42bfe8a9335 |
---|---|
27 | 27 |
28 import os | 28 import os |
29 import sys | 29 import sys |
30 import logging | 30 import logging |
31 | 31 |
32 from os.path import dirname as dn, join as jn | |
33 from rhodecode.model.scm import ScmModel | 32 from rhodecode.model.scm import ScmModel |
34 #to get the rhodecode import | 33 from rhodecode.lib.utils import BasePasterCommand, repo2db_mapper |
34 | |
35 # fix rhodecode import | |
36 from os.path import dirname as dn | |
35 rc_path = dn(dn(dn(os.path.realpath(__file__)))) | 37 rc_path = dn(dn(dn(os.path.realpath(__file__)))) |
36 sys.path.append(rc_path) | 38 sys.path.append(rc_path) |
37 from rhodecode.lib.utils import BasePasterCommand, repo2db_mapper | |
38 | |
39 from rhodecode.model.db import Repository | |
40 from rhodecode.model.repo import RepoModel | |
41 from rhodecode.model.meta import Session | |
42 | |
43 | 39 |
44 log = logging.getLogger(__name__) | 40 log = logging.getLogger(__name__) |
45 | 41 |
46 | 42 |
47 class Command(BasePasterCommand): | 43 class Command(BasePasterCommand): |