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


Python DiskObjectStore.init方法代码示例

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


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

示例1: _init_maybe_bare

# 需要导入模块: from dulwich.object_store import DiskObjectStore [as 别名]
# 或者: from dulwich.object_store.DiskObjectStore import init [as 别名]
 def _init_maybe_bare(cls, path, bare):
     for d in BASE_DIRECTORIES:
         os.mkdir(os.path.join(path, *d))
     DiskObjectStore.init(os.path.join(path, OBJECTDIR))
     ret = cls(path)
     ret.refs.set_symbolic_ref(b"HEAD", b"refs/heads/master")
     ret._init_files(bare)
     return ret
开发者ID:TDC-bob,项目名称:dulwich-py3k,代码行数:10,代码来源:repo.py

示例2: _init_maybe_bare

# 需要导入模块: from dulwich.object_store import DiskObjectStore [as 别名]
# 或者: from dulwich.object_store.DiskObjectStore import init [as 别名]
 def _init_maybe_bare(cls, path, bare):
     for d in BASE_DIRECTORIES:
         os.mkdir(os.path.join(path, *d))
     DiskObjectStore.init(os.path.join(path, OBJECTDIR))
     ret = cls(path)
     ret.refs.set_symbolic_ref(b'HEAD', DEFAULT_REF)
     ret._init_files(bare)
     return ret
开发者ID:akbargumbira,项目名称:qgis_resources_sharing,代码行数:10,代码来源:repo.py

示例3: create

# 需要导入模块: from dulwich.object_store import DiskObjectStore [as 别名]
# 或者: from dulwich.object_store.DiskObjectStore import init [as 别名]
 def create(worktree: Path, store: Path):
     List.wrap(BASE_DIRECTORIES)\
         .smap(store.joinpath) %\
         __.mkdir(parents=True, exist_ok=True)
     DiskObjectStore.init(str(store / OBJECTDIR))
     repo = DulwichRepo(store, worktree)
     repo.refs.set_symbolic_ref(b'HEAD', _master_ref.encode())
     return repo
开发者ID:tek,项目名称:proteome,代码行数:10,代码来源:repo.py

示例4: _init_maybe_bare

# 需要导入模块: from dulwich.object_store import DiskObjectStore [as 别名]
# 或者: from dulwich.object_store.DiskObjectStore import init [as 别名]
 def _init_maybe_bare(cls, path, bare):
     if not isinstance(path, bytes):
         path_bytes = path.encode(sys.getfilesystemencoding())
     else:
         path_bytes = path
     for d in BASE_DIRECTORIES:
         os.mkdir(os.path.join(path_bytes, *d))
     DiskObjectStore.init(os.path.join(path_bytes, OBJECTDIR))
     ret = cls(path)
     ret.refs.set_symbolic_ref(b'HEAD', b"refs/heads/master")
     ret._init_files(bare)
     return ret
开发者ID:mmonaco,项目名称:dulwich,代码行数:14,代码来源:repo.py

示例5: init_bare

# 需要导入模块: from dulwich.object_store import DiskObjectStore [as 别名]
# 或者: from dulwich.object_store.DiskObjectStore import init [as 别名]
    def init_bare(cls, path, mkdir=True):
        for d in BASE_DIRECTORIES:
            os.mkdir(os.path.join(path, *d))
        DiskObjectStore.init(os.path.join(path, OBJECTDIR))
        ret = cls(path)
        ret.refs.set_symbolic_ref("HEAD", "refs/heads/master")
        ret._put_named_file('description', "Unnamed repository")
        ret._put_named_file('config', """[core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
""")
        ret._put_named_file(os.path.join('info', 'excludes'), '')
        return ret
开发者ID:whilp,项目名称:dulwich,代码行数:17,代码来源:repo.py

示例6: setUp

# 需要导入模块: from dulwich.object_store import DiskObjectStore [as 别名]
# 或者: from dulwich.object_store.DiskObjectStore import init [as 别名]
 def setUp(self):
     TestCase.setUp(self)
     self.store_dir = tempfile.mkdtemp()
     if not isinstance(self.store_dir, bytes):
         self.store_dir = self.store_dir.encode(sys.getfilesystemencoding())
     self.addCleanup(shutil.rmtree, self.store_dir)
     self.store = DiskObjectStore.init(self.store_dir)
开发者ID:mmahmedgithub,项目名称:dulwich,代码行数:9,代码来源:test_object_store.py

示例7: setUp

# 需要导入模块: from dulwich.object_store import DiskObjectStore [as 别名]
# 或者: from dulwich.object_store.DiskObjectStore import init [as 别名]
 def setUp(self):
     TestCase.setUp(self)
     self.store_dir = tempfile.mkdtemp()
     self.addCleanup(shutil.rmtree, self.store_dir)
     self.store = DiskObjectStore.init(self.store_dir)
开发者ID:Mistobaan,项目名称:dulwich,代码行数:7,代码来源:test_object_store.py

示例8: setUp

# 需要导入模块: from dulwich.object_store import DiskObjectStore [as 别名]
# 或者: from dulwich.object_store.DiskObjectStore import init [as 别名]
 def setUp(self):
     TestCase.setUp(self)
     self.store_dir = tempfile.mkdtemp()
     self.store = DiskObjectStore.init(self.store_dir)
开发者ID:tmc,项目名称:dulwich,代码行数:6,代码来源:test_object_store.py


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