Mercurial > kallithea
changeset 787:4502ceec31be beta
docs update for repo model
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sun, 28 Nov 2010 21:11:52 +0100 |
parents | 2889a4446960 |
children | 873611d6ff71 |
files | rhodecode/model/repo.py |
diffstat | 1 files changed, 17 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/rhodecode/model/repo.py Sun Nov 28 21:06:16 2010 +0100 +++ b/rhodecode/model/repo.py Sun Nov 28 21:11:52 2010 +0100 @@ -218,6 +218,11 @@ def __create_repo(self, repo_name, alias): + """ + makes repository on filesystem + :param repo_name: + :param alias: + """ from rhodecode.lib.utils import check_repo repo_path = os.path.join(g.base_path, repo_name) if check_repo(repo_name, g.base_path): @@ -226,6 +231,11 @@ backend(repo_path, create=True) def __rename_repo(self, old, new): + """ + renames repository on filesystem + :param old: old name + :param new: new name + """ log.info('renaming repo from %s to %s', old, new) old_path = os.path.join(g.base_path, old) @@ -236,6 +246,13 @@ shutil.move(old_path, new_path) def __delete_repo(self, repo): + """ + removes repo from filesystem, the removal is acctually made by + added rm__ prefix into dir, and rename internat .hg/.git dirs so this + repository is no longer valid for rhodecode, can be undeleted later on + by reverting the renames on this repository + :param repo: repo object + """ rm_path = os.path.join(g.base_path, repo.repo_name) log.info("Removing %s", rm_path) #disable hg/git