I have an existing codebase that I'd like to highlight particular portions of for demonstration purposes. We use Review Board, which allows a user to upload a diff and conveniently compare it against the repository in question.
That given, is there a good way to create a diff manually so it will show the relevant portions as having been added? The only way that comes to mind is by deleting the relevant code and reversing the diff.
Use diff
command manually:
cp yourfile.py yourfile.py.orig
# then edit the file
# and generate the diff
diff -Naur yourfile.py.orig yourfile.py
If you are already using a version control software (like git, svn, hg...), you can directly use them before commit:
hg diff
git diff
svn diff
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With