用于分析和应用统一差异的库

patch的Python项目详细描述


功能

  • Python 2 and 3 compatible
  • Automatic correction of * Linefeeds according to patched file * Diffs broken by stripping trailing whitespace * a/ and b/ prefixes
  • Single file, which is a command line tool and a library
  • No dependencies outside Python stdlib
  • Patch format detection (SVN, HG, GIT)
  • Nice diffstat histogram
  • Linux / Windows / OS X
  • Test coverage

开箱即用的东西:

  • File renaming, creation and removal
  • Directory tree operations
  • Version control specific properties
  • Non-unified diff formats

用法

下载patch.py并用Python运行它它是一个独立的 没有外部依赖关系的模块:

patch.py diff.patch

您还可以运行.zip文件:

python patch-1.16.zip diff.patch

安装

patch.py是自给自足的。您可以将其复制到存储库中 从这里开始使用。此设置将始终可重复但是如果 您需要添加补丁程序模块作为依赖项,请确保使用strict 在版本2发布时避免命中API中断的说明符:

pip install "patch==1.*"

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何使用Ibatis在插入时返回ID(使用返回关键字)   java(org.hibernate.TransactionException)org。冬眠TransactionException:事务未成功启动   java小程序jwindow始终位于JNLP顶部   在Java中重新解析JSON对象?   java单击后将ListView数据移动到新屏幕   Mule ESB中的java WSA寻址特性   Java,对象编程:获取返回0值的方法   hibernate的Java通用问题,如何处理T get(K id)   java在使用超级CSV读取CSV时忽略引用   ssh使用Java远程运行命令   java如何向具体用户发送websocket消息?   在JAVA中,我可以在不指定的情况下使用条件运算符吗?