Python 的 Git 开发包,Pygit2 0.22.1 发布

cebp 9年前

Pygit2是libgit2共享库的一组Python绑定,libgit2是Git核心的实现。 Pygit2支持Python 2.7, 3.2, 3.3, 3.4 和 pypy。

Pygit2 0.22.1 发布,Pygit2 是 Python 的 Git 开发包,更新内容如下:

不同接口重构#346(in progress):

  • 新 iter(pygit2.Blame)

  • pygit2.DiffDelta, pygit2.DiffFilepygit.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.cherrypick(...)#436#492

  • New support for submodules#499#514

  • New Repository.merge_file_from_index(...)#503

  • Now Repository.diff supports diffing two blobs#508

  • New optional fetch parameter in Remote.create#526

  • New pygit2.DiffStats#406#525

  • New Repository.get_attr(...)#528

  • New level optional parameter in Index.remove#533

  • New repr(TreeEntry)#543

构建和安装改进:

  • Make pygit work in a frozen environment#453

  • Make pygit2 work with pyinstaller#510

Bugs 修复:

  • Fix memory issues#477#487#520

  • Fix TreeEntry equality testing#458#488

  • Repository.write_archive fix handling of symlinks#480

  • Fix type check in Diff[...]#495

  • Fix error when merging files with unicode content#505

其他:

下载:<a href="/misc/goto?guid=4958961617208051458" _src="https://github.com/libgit2/pygit2/archive/v0.22.1.zip">https://github.com/libgit2/pygit2/archive/v0.22.1.zip</a>。