Mercurial > kallithea
comparison rhodecode/model/scm.py @ 3179:cd50d1b5f35b
merged with beta
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Mon, 21 Jan 2013 00:03:44 +0100 |
parents | a5f0bc867edc 46234d2d388f |
children | 56cdbadcca53 |
comparison
equal
deleted
inserted
replaced
3113:a0737406ce26 | 3179:cd50d1b5f35b |
---|---|
228 if REMOVED_REPO_PAT.match(name) or path[0] is None: | 228 if REMOVED_REPO_PAT.match(name) or path[0] is None: |
229 continue | 229 continue |
230 | 230 |
231 # name need to be decomposed and put back together using the / | 231 # name need to be decomposed and put back together using the / |
232 # since this is internal storage separator for rhodecode | 232 # since this is internal storage separator for rhodecode |
233 name = Repository.url_sep().join(name.split(os.sep)) | 233 name = Repository.normalize_repo_name(name) |
234 | 234 |
235 try: | 235 try: |
236 if name in repos: | 236 if name in repos: |
237 raise RepositoryError('Duplicate repository name %s ' | 237 raise RepositoryError('Duplicate repository name %s ' |
238 'found in %s' % (name, path)) | 238 'found in %s' % (name, path)) |
290 further global cache invalidation | 290 further global cache invalidation |
291 | 291 |
292 :param repo_name: this repo that should invalidation take place | 292 :param repo_name: this repo that should invalidation take place |
293 """ | 293 """ |
294 CacheInvalidation.set_invalidate(repo_name=repo_name) | 294 CacheInvalidation.set_invalidate(repo_name=repo_name) |
295 repo = Repository.get_by_repo_name(repo_name) | |
296 if repo: | |
297 repo.update_changeset_cache() | |
295 | 298 |
296 def toggle_following_repo(self, follow_repo_id, user_id): | 299 def toggle_following_repo(self, follow_repo_id, user_id): |
297 | 300 |
298 f = self.sa.query(UserFollowing)\ | 301 f = self.sa.query(UserFollowing)\ |
299 .filter(UserFollowing.follows_repo_id == follow_repo_id)\ | 302 .filter(UserFollowing.follows_repo_id == follow_repo_id)\ |