当前位置: 首页>>代码示例>>Python>>正文


Python CodeDoubanProject.create_git_repo方法代码示例

本文整理汇总了Python中vilya.models.project.CodeDoubanProject.create_git_repo方法的典型用法代码示例。如果您正苦于以下问题:Python CodeDoubanProject.create_git_repo方法的具体用法?Python CodeDoubanProject.create_git_repo怎么用?Python CodeDoubanProject.create_git_repo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在vilya.models.project.CodeDoubanProject的用法示例。


在下文中一共展示了CodeDoubanProject.create_git_repo方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_create_git_repo

# 需要导入模块: from vilya.models.project import CodeDoubanProject [as 别名]
# 或者: from vilya.models.project.CodeDoubanProject import create_git_repo [as 别名]
 def test_create_git_repo(self):
     git_path = os.path.join(get_repo_root(), "abc.git")
     CodeDoubanProject.create_git_repo(git_path)
     assert os.path.exists(git_path)
     info_file = os.path.join(git_path, "refs")
     assert os.path.exists(info_file)
     shutil.rmtree(git_path)
开发者ID:leeccong,项目名称:code,代码行数:9,代码来源:test_basic.py

示例2: _repo

# 需要导入模块: from vilya.models.project import CodeDoubanProject [as 别名]
# 或者: from vilya.models.project.CodeDoubanProject import create_git_repo [as 别名]
 def _repo(self, name, bare=True):
     git_path = self._path(name)
     if bare:
         work_tree_path = None
     else:
         work_tree_path = self._path_work_tree(name)
         os.mkdir(work_tree_path)
     CodeDoubanProject.create_git_repo(git_path)
     repo = git.GitRepo(git_path, work_tree=work_tree_path)
     return repo
开发者ID:leeccong,项目名称:code,代码行数:12,代码来源:test_git_commit_one_file.py

示例3: test_create

# 需要导入模块: from vilya.models.project import CodeDoubanProject [as 别名]
# 或者: from vilya.models.project.CodeDoubanProject import create_git_repo [as 别名]
 def test_create(self):
     git_path = os.path.join(get_repo_root(), 'test_create.git')
     assert not os.path.exists(
         git_path), "git_path should not exist prior repo creation"
     CodeDoubanProject.create_git_repo(git_path)
     assert os.path.exists(
         git_path), "create_git_repo should create git_path"
     refs_file = os.path.join(git_path, 'refs')
     assert os.path.exists(refs_file), \
         "create_git_repo should create a git repo with refs subdir"
开发者ID:mozillazg,项目名称:code,代码行数:12,代码来源:test_git.py

示例4: _repo

# 需要导入模块: from vilya.models.project import CodeDoubanProject [as 别名]
# 或者: from vilya.models.project.CodeDoubanProject import create_git_repo [as 别名]
 def _repo(self, name, bare=True):
     git_path = self._path(name)
     if bare:
         work_tree_path = None
     else:
         work_tree_path = self._path_work_tree(name)
         if not os.path.exists(work_tree_path):
             os.mkdir(work_tree_path)
     try:
         CodeDoubanProject.create_git_repo(git_path)
     except:
         pass
     repo = git.GitRepo(git_path, work_tree=work_tree_path)
     return repo
开发者ID:sdgdsffdsfff,项目名称:code-1,代码行数:16,代码来源:test_git_commit_one_file.py

示例5: _repo

# 需要导入模块: from vilya.models.project import CodeDoubanProject [as 别名]
# 或者: from vilya.models.project.CodeDoubanProject import create_git_repo [as 别名]
 def _repo(self, name, bare=True):
     git_path = self._path(name)
     if bare:
         work_tree_path = None
     else:
         work_tree_path = self._path_work_tree(name)
         if os.path.exists(git_path):
             shutil.rmtree(git_path, ignore_errors=True)
         try:
             os.mkdir(work_tree_path)
         except OSError:
             pass
     CodeDoubanProject.create_git_repo(git_path)
     repo = git.GitRepo(git_path, work_tree=work_tree_path)
     return repo
开发者ID:000fan000,项目名称:code,代码行数:17,代码来源:test_diff.py

示例6: test_gitrepo_path

# 需要导入模块: from vilya.models.project import CodeDoubanProject [as 别名]
# 或者: from vilya.models.project.CodeDoubanProject import create_git_repo [as 别名]
 def test_gitrepo_path(self):
     git_path = self._path('test_gitrepo_path')
     CodeDoubanProject.create_git_repo(git_path)
     repo = git.GitRepo(git_path)
     assert repo.path == git_path, "repo.path should be equal to git_path"
开发者ID:mozillazg,项目名称:code,代码行数:7,代码来源:test_git.py


注:本文中的vilya.models.project.CodeDoubanProject.create_git_repo方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。