Apply basic colorization to diff

Review Request #11829 — Created Oct. 3, 2021 and updated — Latest diff uploaded

Information

RBTools
master

Reviewers

Add an option to the rbt diff command to
apply basic colorization to the output.
The rbt diff --color-diff command highlights
removed lines in red and added lines in green.

This review request includes the following:

  • Utilizing pygments library, format the diff displayed
    on terminal with basic colorization.
  • Add --color-diff option to rbt diff command.

Project documentation and notes

  • Created test_diff.py that contains test cases for rbt diff command
  • Tested command arguments and formating the diff using pygments library.

Diff Revision 3

This is not the most recent revision of the diff. The latest diff is revision 20. See what's changed.

orig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

Commits

First Last Summary ID Author
Apply basic colorization to diff
622bd97c692a5d19caae495823376b8cd233c6c5 Sandy Saji
clean up
b77a7aec6879e99921707ca3539374b6175e34d6 Sandy Saji
Update code to meet PEP8 coding standards
c0515acf1111028bfc17ee798e843acf18ded18c Sandy Saji
Update code to meet PEP8 coding standards
5bcb68b609c9a7eb1dce1c6c1a9015579fb117d6 Sandy Saji
rbtools/commands/diff.py
Loading...