跳转到主要内容

PyHistory维护您项目的历史记录。

项目描述

https://badge.fury.io/py/pyhistory.png https://travis-ci.org/beregond/pyhistory.png?branch=master https://img.shields.io/pypi/dm/pyhistory.svg https://coveralls.io/repos/beregond/pyhistory/badge.png

用于维护项目历史文件的软件。

PyHistory

PyHistory在分布式工作环境中维护历史记录,允许许多开发者在不冲突的情况下添加/删除发布之间的历史记录。

安装

pip install pyhistory

功能

(所有命令都可以用pyhistory或快捷键-pyhi开始。)

  • 添加历史记录

    $ pyhi add 'New feature'
    $ pyhi add Something
  • 列出历史记录

    $ pyhi list
    
    * New feature
    * Something
  • 使用给定版本的条目更新您的历史文件

    $ cat HISTORY.rst
    my project
    ==========
    
    0.4.1 (2015-08-04)
    ++++++++++++++++++
    
    * Added PyHistory to project.
    * Improved codebase.
    * Other features.
    
    $ pyhi update 0.4.2
    $ cat HISTORY.rst
    my project
    ==========
    
    0.4.2 (2015-08-05)
    ++++++++++++++++++
    
    * Bug fixes
    * Change in API
    * Removed old features
    
    0.4.1 (2015-08-04)
    ++++++++++++++++++
    
    * Added PyHistory to project
    * Improved codebase
    * Other features
  • 删除选定的条目

    $ pyhi delete
    
    1. New feature
    2. Something
    3. Another one
    4. Wrong one
    
    (Delete by choosing entries numbers.)
    
    $ pyhi delete 2 4
    $ pyhi list
    
    * New feature
    * Another one
  • 清除所有历史记录

    $ pyhi clear
    Do you really want to remove all entries? [y/N]: y

    或无提示

    $ pyhi clear --yes

配置文件

您可以通过setup.cfg文件调整Pyhistory的行为以满足您的需求。只需将pyhistory部分放入其中即可

[pyhistory]
history_dir = some_dir  # 'history' by default
history_file = myhistory.rst  # 'HISTORY.rst' by default
at_line = 42  # by default history will be injected after first headline

历史

2.2.0 (2022-04-04)

  • 添加了对Python 3.7、3.8、3.9和3.10的支持。

  • 移除了对Python 2.7、3.3、3.4、3.5、3.6和pypy的支持。

2.1 (2017-09-29)

  • 修复了空文件错误。

  • 取消了包的严格依赖。

  • 添加了对py35和py36的支持。

2.0 (2015-08-07)

  • 添加了行分割。

  • 将CLI界面移动到Click库。

  • 为清除命令添加了“-yes”标志。

  • 删除了“squash”子命令。

  • 为生成的文件添加了微秒。

  • 0作为no-line选项不再有效。

1.3 (2014-10-17)

  • 时间戳现在以毫秒为单位(再次)。

  • 添加了从文件加载配置的功能。

1.2.1 (2014-08-06)

  • 生成的哈希格式已改进(现在没有毫秒数)。

1.2 (2014-07-22)

  • 添加了删除命令。

1.1 (2014-07-15)

  • 添加了时间戳到生成的文件中,现在条目按正确顺序排列。

  • Pyhistory遍历目录树以找到合适的history目录位置。

1.0.3 (2014-06-23)

  • 添加了squash命令(update的别名)。

1.0.2 (2014-06-22)

  • 进一步修复了启动检测的bug。

1.0.1 (2014-06-20)

  • 修复了当历史目录不存在时由clear引发的错误。

  • 修复了update - 命令现在将尝试找到文件起始位置。

1.0 (2014-06-20)

  • 首次发布于PyPI。

项目详情


下载文件

下载适用于您平台的文件。如果您不确定要选择哪个,请了解更多关于安装包的信息。

源代码分发

pyhistory-2.2.0.tar.gz (20.2 kB 查看哈希值)

源代码