用于浏览文件git历史记录的ncurses应用程序

bblame的Python项目详细描述


bblame是一个交互式的ncurses git责备查看器。允许您探索文件的git历史记录。

功能

  • 一次向前和向后浏览一个提交的文件历史记录
  • 选择一行并钻取最近更改该行的提交之后的历史记录
  • 全代码语法突出显示支持
  • 显示gitshow以提交任何选定行
  • 跨文件重命名浏览文件历史记录

用法

bblame是一个curses应用程序。当调用时没有参数或-h--help

usage: __main__.py [-h] [--revision {revision}] [--debug] [--version]
                                   filename [+{line_num} or +/{search_pattern}]

positional arguments:
  filename              Name or path to file to blame
  +{line_num} or +/{search_pattern}
                                                The line number or search pattern the cursor will be positioned on (this arg will put bblame in visual mode)

optional arguments:
  -h, --help            show this help message and exit
  --revision {revision}, -r {revision}
                                                The revision to initialize the blame file to
  --debug               Increase logging and show tracebacks
  --version             show program's version number and exit

要在运行bblame时显示可用的命令,请使用h键,该键将显示操作绑定的键,示例如下:

KEYS: ACTION - DESCRIPTION
--------------------------
 q:   Quit
    Quit the application

 /:   Search
    Search downward through the current blame or commit

 n:   Next Search Match
    Jump to the next search match (in the downward direction)

 N:   Prev Search Match
    Jump to the prev search match (in the upward direction)

 v:   Visual Select Mode
    Enter visual select mode (only from normal mode)

 o:   Show/View Commit
    Show a commit selected by the visual mode cursor

 O:   Show/View file Commit
    Show the current revision commit

 ESC:   Normal Mode
    Return to Normal mode

 ENTER, d:   Drill Down
    Drill down past the commit highlighted in visual mode. Opens a new git blame

 <, ,:   Parent blame
    Move to git blame of the parent of current commit
    (i.e. traverse backwards through history, one commit at a time)

 >, .:   Ancestor blame
    Move to git blame of the ancestor of current commit
    (i.e. traverse forwards through history, one commit at a time)

 BACKSPACE, DC, f:   Pop Back
    Pop back to previous git object

 g, HOME:   Jump to Top
    Jump to the top of the screen

 G, END:   Jump to Bottom
    Jump to the bottom of the screen

 h:   Help
    Display the help message

 s:   Toggle Syntax Highlight
    Toggle syntax highlighting on or off. Showing or hiding syntax
    highlighting ONLY IF IT IS ENABLED.

 H:   Jump to HEAD
    Jump to a blame of the most recent commit for the file

 T:   Jump to TAIL
    Jump to a blame of the first commit for the file

安装

sudo -H pip install bblame

python setup.py install

问题

可以找到问题跟踪程序here

插件:

如果克隆git repo(或在bitbucket上浏览到它),您将找到一个plugins dir。 我是一个vim人,这意味着到目前为止只有一个vim插件;) 不过,我鼓励拉请求或链接到包含其他编辑器/软件插件的repo!

开发:

欢迎拉取请求

可以找到git repo here

您将需要与用于开发和测试的包管理器一起安装的依赖项:

  • pip/pip3(bblame同时支持2.7.x和3+版本的python)
  • tmux(curses单元测试库hecate的依赖项)
  • make

其余依赖项可以使用以下命令安装:

  • make py_env

有用的开发注释:

  • 运行make check以执行静态分析和单元测试
  • betterblame.git的根目录中运行python -m betterblame <args>以运行 bblame的实例及其更改
  • 您可以使用tests/testfiles/中的测试文件进行手动测试。

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

推荐PyPI第三方库


热门话题
使用节点的基于Java的web应用程序。js?   如何使用java在正则表达式中转义星号   java 404未找到:访问部署在Tomcat上的servlet时出错   java如何获取库的所有依赖项?   java如何从其他类控制器使用FXML类的节点?   java如何修复Grails2.3.8中编写的应用程序中的表达式注入?   java如何在对象中创建toString方法?   泛型Java如何将类型类<A<B>>传递给方法   postgresql在pgadmin中运行良好,但在java代码中不起作用   java将字符串更改为Int以便更好地排序合法吗?   关于可见性的多线程Java并发问题   java JHipster错误:无法找到或加载主类org。阿帕奇。专家包装纸。MavenWrapperMain   java Kafka配置最大字节数仍受500条消息的限制   void方法之后的Java变量更新   java Spring引导Jpa映射   java如何优化DynamoDb的索引   JAVA伊奥。使用Jsoup时FileNotFoundException