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


Python LocalGitClient.fetch_pack方法代码示例

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


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

示例1: test_fetch_empty

# 需要导入模块: from dulwich.client import LocalGitClient [as 别名]
# 或者: from dulwich.client.LocalGitClient import fetch_pack [as 别名]
 def test_fetch_empty(self):
     c = LocalGitClient()
     s = open_repo('a.git')
     out = BytesIO()
     walker = {}
     c.fetch_pack(s.path, lambda heads: [], graph_walker=walker,
         pack_data=out.write)
     self.assertEquals("PACK\x00\x00\x00\x02\x00\x00\x00\x00\x02\x9d\x08"
         "\x82;\xd8\xa8\xea\xb5\x10\xadj\xc7\\\x82<\xfd>\xd3\x1e", out.getvalue())
开发者ID:imclab,项目名称:dulwich,代码行数:11,代码来源:test_client.py

示例2: test_fetch_pack_none

# 需要导入模块: from dulwich.client import LocalGitClient [as 别名]
# 或者: from dulwich.client.LocalGitClient import fetch_pack [as 别名]
 def test_fetch_pack_none(self):
     c = LocalGitClient()
     s = open_repo('a.git')
     out = BytesIO()
     walker = MemoryRepo().get_graph_walker()
     c.fetch_pack(s.path,
         lambda heads: ["a90fa2d900a17e99b433217e988c4eb4a2e9a097"],
         graph_walker=walker, pack_data=out.write)
     # Hardcoding is not ideal, but we'll fix that some other day..
     self.assertTrue(out.getvalue().startswith('PACK\x00\x00\x00\x02\x00\x00\x00\x07'))
开发者ID:imclab,项目名称:dulwich,代码行数:12,代码来源:test_client.py

示例3: test_fetch_pack_none

# 需要导入模块: from dulwich.client import LocalGitClient [as 别名]
# 或者: from dulwich.client.LocalGitClient import fetch_pack [as 别名]
 def test_fetch_pack_none(self):
     c = LocalGitClient()
     s = open_repo('a.git')
     out = StringIO()
     walker = MemoryRepo().get_graph_walker()
     c.fetch_pack(s.path,
         lambda heads: ["a90fa2d900a17e99b433217e988c4eb4a2e9a097"],
         graph_walker=walker, pack_data=out.write)
     # Hardcoding is not ideal, but we'll fix that some other day..
     self.assertEquals(out.getvalue(), 'PACK\x00\x00\x00\x02\x00\x00\x00\x07\x90\x0cx\x9c\xa5\xccM\n\xc20\[email protected]\xe1}N1\xfb\x82$v\xe2$ \xa2[/\xe0z\xd2\x19\xb1\x85\xa4\xd0\x8e\x14o\xef\xcf\x15|\xcbo\xf1lQ\x05\x92\xcc\x9e\x842\xc5\x1c\xf5\x1eB\x8f\x181\x97$>\x85\x9c\x14\xd3\x10b\[email protected]\xc7O{\xcc\x0b\\\xb9\xea\n7]\xad\xbc\xe08m\x9dh\x19\xb9\x9d\xa7\xafo?\xde5\xb5\x13\[email protected]\x14\xfd>C\xe7?\xb9a\xaeu4\xd3\x7f\x1e\xee"\x02\x0c\xdc\x04\x8a{\x03\x1a4:\\\x9a\x0ex\x9c\xa5\xccM\n\xc3 \[email protected]\xe1\xbd\xa7p\x1f(j\x1cG\xa1\x94v\xdb\x0bt=:#M II,\xa1\xb7\xef\xcf\x15\xfa\x96\xdf\xe2\xb5UD\xd7\xca\x1e\xd9C\[email protected]\xb1\x06\xc0\xe0\x93\x15+\x9c\x13J_%P\x04#X\xd5\x83V\x99\x9bv\x84\x8e\x93K!\xb9\xe2-G\x00_\x0c\xd6\xd0\x1b\x8b\x80\x99l\xa4\x00\x9c\xac\xa2g\xbb/\xab\xbe\xd2$\x9b\xbe\xc9\xd6\xf2K\x1f\xc7\xbdc\xc9\x03\xcd\xe7\xf1\xeb\xfb\x8f\x0f\xb3\xb4\x93\xb6\x16="\x18\x8f\xba3\x9fTY\xa6ihM\xfey\xa8\x0b\xb3.\xea\rM\xb6F\x9c\xaa\x03x\x9c340031QHd\xf0\xfb\xcc\xbd\xffQ\x8a\xe1\xb29\x16\n\x97\x975\xdf\x0f\xb9\xd6\xf1\xe9\x8d!D2\x89\xc1_/US\xc1j\xd9\x15\xef\xa8o\x8f5u\x9ak\xde.`\xfe\t\x00\x97P\x18#7x\x9cK\xcb\xccIUH\xe4\x02\x00\n#\x02,7x\x9cK\xcb\xccIUH\xe2\x02\x00\n%\x02-\xa7\x05x\x9c340031QHd\xf0\xfb\xcc\xbd\xffQ\x8a\xe1\xb29\x16\n\x97\x975\xdf\x0f\xb9\xd6\xf1\xe9\x8d!D2\x89\xc1_/US\xc1j\xd9\x15\xef\xa8o\x8f5u\x9ak\xde.`\xfe\t\x95LfX4\xed\xc2\xeeD\xc1\x8eS\xbbU3%?g\x1ff\x14?\xb3\x80\x15\x00\xec0#h7x\x9cK\xcb\xccIUH\xe6\x02\x00\n\'\x02.\x8d7\x98\xae\xef7L\x95\x18\x94\x80X\xf1Q\xfb\xdc\xd9\xcf\xe7\xc3')
开发者ID:hloeung,项目名称:dulwich,代码行数:12,代码来源:test_client.py

示例4: test_fetch_empty

# 需要导入模块: from dulwich.client import LocalGitClient [as 别名]
# 或者: from dulwich.client.LocalGitClient import fetch_pack [as 别名]
 def test_fetch_empty(self):
     c = LocalGitClient()
     s = open_repo('a.git')
     self.addCleanup(tear_down_repo, s)
     out = BytesIO()
     walker = {}
     ret = c.fetch_pack(s.path, lambda heads: [], graph_walker=walker,
         pack_data=out.write)
     self.assertEqual({
         b'HEAD': b'a90fa2d900a17e99b433217e988c4eb4a2e9a097',
         b'refs/heads/master': b'a90fa2d900a17e99b433217e988c4eb4a2e9a097',
         b'refs/tags/mytag': b'28237f4dc30d0d462658d6b937b08a0f0b6ef55a',
         b'refs/tags/mytag-packed': b'b0931cadc54336e78a1d980420e3268903b57a50'
         }, ret)
     self.assertEqual(b"PACK\x00\x00\x00\x02\x00\x00\x00\x00\x02\x9d\x08"
         b"\x82;\xd8\xa8\xea\xb5\x10\xadj\xc7\\\x82<\xfd>\xd3\x1e", out.getvalue())
开发者ID:mjmaenpaa,项目名称:dulwich,代码行数:18,代码来源:test_client.py

示例5: test_fetch_pack_none

# 需要导入模块: from dulwich.client import LocalGitClient [as 别名]
# 或者: from dulwich.client.LocalGitClient import fetch_pack [as 别名]
 def test_fetch_pack_none(self):
     c = LocalGitClient()
     s = open_repo('a.git')
     self.addCleanup(tear_down_repo, s)
     out = BytesIO()
     walker = MemoryRepo().get_graph_walker()
     ret = c.fetch_pack(
         s.path,
         lambda heads: [b"a90fa2d900a17e99b433217e988c4eb4a2e9a097"],
         graph_walker=walker, pack_data=out.write)
     self.assertEqual({b'HEAD': b'refs/heads/master'}, ret.symrefs)
     self.assertEqual({
         b'HEAD': b'a90fa2d900a17e99b433217e988c4eb4a2e9a097',
         b'refs/heads/master': b'a90fa2d900a17e99b433217e988c4eb4a2e9a097',
         b'refs/tags/mytag': b'28237f4dc30d0d462658d6b937b08a0f0b6ef55a',
         b'refs/tags/mytag-packed':
         b'b0931cadc54336e78a1d980420e3268903b57a50'
         }, ret.refs)
     # Hardcoding is not ideal, but we'll fix that some other day..
     self.assertTrue(out.getvalue().startswith(
             b'PACK\x00\x00\x00\x02\x00\x00\x00\x07'))
开发者ID:atbradley,项目名称:dulwich,代码行数:23,代码来源:test_client.py


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