Show More
@@ -136,7 +136,7 b' def action_logger(user, action, repo, ip' | |||||
136 | elif isinstance(user, basestring): |
|
136 | elif isinstance(user, basestring): | |
137 | user_obj = User.get_by_username(user) |
|
137 | user_obj = User.get_by_username(user) | |
138 | else: |
|
138 | else: | |
139 | raise Exception('You have to provide user object or username') |
|
139 | raise Exception('You have to provide a user object or a username') | |
140 |
|
140 | |||
141 | if hasattr(repo, 'repo_id'): |
|
141 | if hasattr(repo, 'repo_id'): | |
142 | repo_obj = Repository.get(repo.repo_id) |
|
142 | repo_obj = Repository.get(repo.repo_id) | |
@@ -255,7 +255,7 b' def is_valid_repos_group(repos_group_nam' | |||||
255 | return False |
|
255 | return False | |
256 |
|
256 | |||
257 |
|
257 | |||
258 |
def ask_ok(prompt, retries=4, complaint='Yes or no |
|
258 | def ask_ok(prompt, retries=4, complaint='Yes or no please!'): | |
259 | while True: |
|
259 | while True: | |
260 | ok = raw_input(prompt) |
|
260 | ok = raw_input(prompt) | |
261 | if ok in ('y', 'ye', 'yes'): |
|
261 | if ok in ('y', 'ye', 'yes'): | |
@@ -299,7 +299,7 b" def make_ui(read_from='file', path=None," | |||||
299 |
|
299 | |||
300 | if read_from == 'file': |
|
300 | if read_from == 'file': | |
301 | if not os.path.isfile(path): |
|
301 | if not os.path.isfile(path): | |
302 | log.debug('hgrc file is not present at %s skipping...' % path) |
|
302 | log.debug('hgrc file is not present at %s, skipping...' % path) | |
303 | return False |
|
303 | return False | |
304 | log.debug('reading hgrc from %s' % path) |
|
304 | log.debug('reading hgrc from %s' % path) | |
305 | cfg = config.config() |
|
305 | cfg = config.config() | |
@@ -410,7 +410,7 b' def repo2db_mapper(initial_repo_list, re' | |||||
410 | rm = RepoModel() |
|
410 | rm = RepoModel() | |
411 | user = sa.query(User).filter(User.admin == True).first() |
|
411 | user = sa.query(User).filter(User.admin == True).first() | |
412 | if user is None: |
|
412 | if user is None: | |
413 |
raise Exception('Missing administrative account |
|
413 | raise Exception('Missing administrative account!') | |
414 | added = [] |
|
414 | added = [] | |
415 |
|
415 | |||
416 | # # clear cache keys |
|
416 | # # clear cache keys | |
@@ -423,7 +423,7 b' def repo2db_mapper(initial_repo_list, re' | |||||
423 | db_repo = rm.get_by_repo_name(name) |
|
423 | db_repo = rm.get_by_repo_name(name) | |
424 | # found repo that is on filesystem not in RhodeCode database |
|
424 | # found repo that is on filesystem not in RhodeCode database | |
425 | if not db_repo: |
|
425 | if not db_repo: | |
426 | log.info('repository %s not found creating now' % name) |
|
426 | log.info('repository %s not found, creating now' % name) | |
427 | added.append(name) |
|
427 | added.append(name) | |
428 | desc = (repo.description |
|
428 | desc = (repo.description | |
429 | if repo.description != 'unknown' |
|
429 | if repo.description != 'unknown' | |
@@ -446,7 +446,7 b' def repo2db_mapper(initial_repo_list, re' | |||||
446 | # during starting install all cache keys for all repositories in the |
|
446 | # during starting install all cache keys for all repositories in the | |
447 | # system, this will register all repos and multiple instances |
|
447 | # system, this will register all repos and multiple instances | |
448 | key, _prefix, _org_key = CacheInvalidation._get_key(name) |
|
448 | key, _prefix, _org_key = CacheInvalidation._get_key(name) | |
449 | log.debug("Creating cache key for %s instance_id:`%s`" % (name, _prefix)) |
|
449 | log.debug("Creating a cache key for %s instance_id:`%s`" % (name, _prefix)) | |
450 | CacheInvalidation._get_or_create_key(key, _prefix, _org_key, commit=False) |
|
450 | CacheInvalidation._get_or_create_key(key, _prefix, _org_key, commit=False) | |
451 | sa.commit() |
|
451 | sa.commit() | |
452 | removed = [] |
|
452 | removed = [] | |
@@ -454,7 +454,7 b' def repo2db_mapper(initial_repo_list, re' | |||||
454 | # remove from database those repositories that are not in the filesystem |
|
454 | # remove from database those repositories that are not in the filesystem | |
455 | for repo in sa.query(Repository).all(): |
|
455 | for repo in sa.query(Repository).all(): | |
456 | if repo.repo_name not in initial_repo_list.keys(): |
|
456 | if repo.repo_name not in initial_repo_list.keys(): | |
457 |
log.debug("Removing non |
|
457 | log.debug("Removing non-existing repository found in db `%s`" % | |
458 | repo.repo_name) |
|
458 | repo.repo_name) | |
459 | try: |
|
459 | try: | |
460 | sa.delete(repo) |
|
460 | sa.delete(repo) | |
@@ -677,7 +677,7 b' class BasePasterCommand(Command):' | |||||
677 | def check_git_version(): |
|
677 | def check_git_version(): | |
678 | """ |
|
678 | """ | |
679 | Checks what version of git is installed in system, and issues a warning |
|
679 | Checks what version of git is installed in system, and issues a warning | |
680 | if it's to old for RhodeCode to properly work. |
|
680 | if it's too old for RhodeCode to properly work. | |
681 | """ |
|
681 | """ | |
682 | import subprocess |
|
682 | import subprocess | |
683 | from distutils.version import StrictVersion |
|
683 | from distutils.version import StrictVersion | |
@@ -703,7 +703,7 b' def check_git_version():' | |||||
703 | if stderr: |
|
703 | if stderr: | |
704 | log.warning('Unable to detect git version org error was:%r' % stderr) |
|
704 | log.warning('Unable to detect git version org error was:%r' % stderr) | |
705 | elif to_old_git: |
|
705 | elif to_old_git: | |
706 | log.warning('RhodeCode detected git version %s, which is to old ' |
|
706 | log.warning('RhodeCode detected git version %s, which is too old ' | |
707 |
'for the system to function properly |
|
707 | 'for the system to function properly. Make sure ' | |
708 | 'it is at least in version %s' % (ver, req_ver)) |
|
708 | 'it is at least in version %s' % (ver, req_ver)) | |
709 | return _ver No newline at end of file |
|
709 | return _ver |
General Comments 0
You need to be logged in to leave comments.
Login now