epilys / patchviewer.py

Rudimentary helper tool to see a PR's diffs when rebasing a big PR

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

patchviewer.py License No Maintenance Intended

Should be used with a pager with syntax highlighting for diff patches like bat: cargo install bat

Usage

Download current PR state as a patch series (Format is mbox file containing all the commits as email/patches):

If PR url is https://github.com/org/repo/pull/37, download:

https://github.com/repo/pull/37.patch

as a text file.

% ./patchviewer.py 37.patch
0 [PATCH 1/4] aaaaaaaa
1 [PATCH 2/4] adkfjslkdfjsdklfj
2 [PATCH 3/4] my hands are typing words
3 [PATCH 4/4] haaaaaaaaands
patches: list
>>> patches[2].view() # launches diff in pager
>>> 

About

Rudimentary helper tool to see a PR's diffs when rebasing a big PR

License:European Union Public License 1.2


Languages

Language:Python 100.0%