发布于 2015-07-13 00:19:24 | 235 次阅读 | 评论: 0 | 来源: 网友投递
Pygit2 Python 的 Git 开发包
Pygit2 是一个基于 Python 的 libgit2 绑定。简单来说就是一个Python 的 Git 开发包.
Pygit2 0.22.1 发布,Pygit2 是一个基于 Python 的 libgit2 绑定。简单来说就是一个Python 的 Git 开发包. 更新内容如下:
不同接口重构#346(in progress):
新 iter(pygit2.Blame)
新 pygit2.DiffDelta
, pygit2.DiffFile
和 pygit.DiffLine
API 改进和翻译提供:
Hunk => DiffHunk Patch.old_file_path => Patch.delta.old_file.path Patch.new_file_path => Patch.delta.new_file.path Patch.old_id => Patch.delta.old_file.id Patch.new_id => Patch.delta.new_file.id Patch.status => Patch.delta.status Patch.similarity => Patch.delta.similarity Patch.is_binary => Patch.delta.is_binary Patch.additions => Patch.line_stats[1] Patch.deletions => Patch.line_stats[2]
DiffHunk.lines
是列表 DiffLine
的对象,而不是元组
新特性
New Repository.expand_id(...)
and Repository.ahead_behind(...)
#448
New prefix
parameter in Repository.write_archive
#481
New Repository.merge_trees(...)
#489
New Repository.merge_file_from_index(...)
#503
Now Repository.diff
supports diffing two blobs#508
New optional fetch
parameter in Remote.create
#526
New Repository.get_attr(...)
#528
New level
optional parameter in Index.remove
#533
New repr(TreeEntry)
#543
构建和安装改进:
Bugs 修复:
Repository.write_archive
fix handling of symlinks#480
Fix type check in Diff[...]
#495
Fix error when merging files with unicode content#505
其他:
Documentation 改进和修复 #448#491#497#507#517#518#519#521#523#527#536
Expose the pygit2.GIT_REPOSITORY_INIT_*
constants#483
下载:https://github.com/libgit2/pygit2/archive/v0.22.1.zip。