comparison rhodecode/lib/paster_commands/cleanup.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 4839bc1d89fa
children 5293d4bbb1ea
comparison
equal deleted inserted replaced
3914:424b6c711a7f 3915:a42bfe8a9335
30 import re 30 import re
31 import shutil 31 import shutil
32 import logging 32 import logging
33 import datetime 33 import datetime
34 34
35 from os.path import dirname as dn, join as jn
36 #to get the rhodecode import
37 rc_path = dn(dn(dn(os.path.realpath(__file__))))
38 sys.path.append(rc_path)
39 from rhodecode.lib.utils import BasePasterCommand, ask_ok, REMOVED_REPO_PAT 35 from rhodecode.lib.utils import BasePasterCommand, ask_ok, REMOVED_REPO_PAT
40
41 from rhodecode.lib.utils2 import safe_str 36 from rhodecode.lib.utils2 import safe_str
42 from rhodecode.model.db import RhodeCodeUi 37 from rhodecode.model.db import RhodeCodeUi
43 38
39 # fix rhodecode import
40 from os.path import dirname as dn
41 rc_path = dn(dn(dn(os.path.realpath(__file__))))
42 sys.path.append(rc_path)
44 43
45 log = logging.getLogger(__name__) 44 log = logging.getLogger(__name__)
46 45
47 46
48 class Command(BasePasterCommand): 47 class Command(BasePasterCommand):