Mercurial > kallithea
comparison rhodecode/model/repo.py @ 1976:a76e9bacbedc beta
garden
- unified logging formatting to use only %
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Thu, 02 Feb 2012 00:31:00 +0200 |
parents | 0a46e8f1b7aa |
children | 87f0800abc7b |
comparison
equal
deleted
inserted
replaced
1975:9c5b33c4de4d | 1976:a76e9bacbedc |
---|---|
399 renames repository on filesystem | 399 renames repository on filesystem |
400 | 400 |
401 :param old: old name | 401 :param old: old name |
402 :param new: new name | 402 :param new: new name |
403 """ | 403 """ |
404 log.info('renaming repo from %s to %s', old, new) | 404 log.info('renaming repo from %s to %s' % (old, new)) |
405 | 405 |
406 old_path = os.path.join(self.repos_path, old) | 406 old_path = os.path.join(self.repos_path, old) |
407 new_path = os.path.join(self.repos_path, new) | 407 new_path = os.path.join(self.repos_path, new) |
408 if os.path.isdir(new_path): | 408 if os.path.isdir(new_path): |
409 raise Exception('Was trying to rename to already existing dir %s' \ | 409 raise Exception('Was trying to rename to already existing dir %s' \ |
418 by reverting the renames on this repository | 418 by reverting the renames on this repository |
419 | 419 |
420 :param repo: repo object | 420 :param repo: repo object |
421 """ | 421 """ |
422 rm_path = os.path.join(self.repos_path, repo.repo_name) | 422 rm_path = os.path.join(self.repos_path, repo.repo_name) |
423 log.info("Removing %s", rm_path) | 423 log.info("Removing %s" % (rm_path)) |
424 # disable hg/git | 424 # disable hg/git |
425 alias = repo.repo_type | 425 alias = repo.repo_type |
426 shutil.move(os.path.join(rm_path, '.%s' % alias), | 426 shutil.move(os.path.join(rm_path, '.%s' % alias), |
427 os.path.join(rm_path, 'rm__.%s' % alias)) | 427 os.path.join(rm_path, 'rm__.%s' % alias)) |
428 # disable repo | 428 # disable repo |