##// END OF EJS Templates
docs update for repo model
marcink -
r787:4502ceec beta
parent child Browse files
Show More
@@ -218,6 +218,11 b' class RepoModel(BaseModel):'
218
218
219
219
220 def __create_repo(self, repo_name, alias):
220 def __create_repo(self, repo_name, alias):
221 """
222 makes repository on filesystem
223 :param repo_name:
224 :param alias:
225 """
221 from rhodecode.lib.utils import check_repo
226 from rhodecode.lib.utils import check_repo
222 repo_path = os.path.join(g.base_path, repo_name)
227 repo_path = os.path.join(g.base_path, repo_name)
223 if check_repo(repo_name, g.base_path):
228 if check_repo(repo_name, g.base_path):
@@ -226,6 +231,11 b' class RepoModel(BaseModel):'
226 backend(repo_path, create=True)
231 backend(repo_path, create=True)
227
232
228 def __rename_repo(self, old, new):
233 def __rename_repo(self, old, new):
234 """
235 renames repository on filesystem
236 :param old: old name
237 :param new: new name
238 """
229 log.info('renaming repo from %s to %s', old, new)
239 log.info('renaming repo from %s to %s', old, new)
230
240
231 old_path = os.path.join(g.base_path, old)
241 old_path = os.path.join(g.base_path, old)
@@ -236,6 +246,13 b' class RepoModel(BaseModel):'
236 shutil.move(old_path, new_path)
246 shutil.move(old_path, new_path)
237
247
238 def __delete_repo(self, repo):
248 def __delete_repo(self, repo):
249 """
250 removes repo from filesystem, the removal is acctually made by
251 added rm__ prefix into dir, and rename internat .hg/.git dirs so this
252 repository is no longer valid for rhodecode, can be undeleted later on
253 by reverting the renames on this repository
254 :param repo: repo object
255 """
239 rm_path = os.path.join(g.base_path, repo.repo_name)
256 rm_path = os.path.join(g.base_path, repo.repo_name)
240 log.info("Removing %s", rm_path)
257 log.info("Removing %s", rm_path)
241 #disable hg/git
258 #disable hg/git
General Comments 0
You need to be logged in to leave comments. Login now