comparison rhodecode/model/scm.py @ 3360:85f69bf84d95 beta

non-lightweight dashboard mode is now more error proof when it stumbles across bad or damaged repositories
author Marcin Kuzminski <marcin@python-works.com>
date Sun, 10 Feb 2013 21:05:53 +0100
parents 21cccfea18bf
children 9fe4543b6823
comparison
equal deleted inserted replaced
3359:c394a564ab71 3360:85f69bf84d95
104 if not HasRepoPermissionAny( 104 if not HasRepoPermissionAny(
105 *self.perm_set 105 *self.perm_set
106 )(dbr.repo_name, 'get repo check'): 106 )(dbr.repo_name, 'get repo check'):
107 continue 107 continue
108 108
109 if scmr is None: 109 try:
110 last_change = scmr.last_change
111 tip = h.get_changeset_safe(scmr, 'tip')
112 except Exception:
110 log.error( 113 log.error(
111 '%s this repository is present in database but it ' 114 '%s this repository is present in database but it '
112 'cannot be created as an scm instance' % dbr.repo_name 115 'cannot be created as an scm instance, org_exc:%s'
116 % (dbr.repo_name, traceback.format_exc())
113 ) 117 )
114 continue 118 continue
115
116 last_change = scmr.last_change
117 tip = h.get_changeset_safe(scmr, 'tip')
118 119
119 tmp_d = {} 120 tmp_d = {}
120 tmp_d['name'] = dbr.repo_name 121 tmp_d['name'] = dbr.repo_name
121 tmp_d['name_sort'] = tmp_d['name'].lower() 122 tmp_d['name_sort'] = tmp_d['name'].lower()
122 tmp_d['raw_name'] = tmp_d['name'].lower() 123 tmp_d['raw_name'] = tmp_d['name'].lower()