TortoiseSVN : Good 'patch file' viewer?

后端 未结 6 1347
一个人的身影
一个人的身影 2021-02-18 16:06

The default patch file viewer is messy (ie. no side by side diff view etc). I tried setting the path of beyondCompare exe in \"Settings->Unified Diff Viewer->custom\", but beyon

相关标签:
6条回答
  • 2021-02-18 16:42

    Beyond Compare 4 allows you to view patch files created by SVN. The top window in Beyond Compare is a tree structure, allowing you to navigate folders and files by name. Revision numbers are present in the left and right diff windows.

    Create the patch

    svn diff -r 5922:6116 > CodeReview.patch
    

    Open the patch in Beyond Compare 4

    0 讨论(0)
  • 2021-02-18 16:43

    SVN 1.7 I think was released since this answer was posted, and I landed here because I wanted to show my newly created patch file with syntax coloring, a la view unified diff in TortoiseSvn.

    It turns out that Notepad++ automatically syntax colors my file correctly if I give it the filetype of "patch"!

    Patches have been around a long time but SVN is now supporting them more fully. See for example the documentation; http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-patch.html

    For how to create a patch file, see this nice document that describes various methods including mine, WinMerge; http://docs.moodle.org/dev/How_to_create_a_patch#Creating_a_patch_using_WinMerge

    0 讨论(0)
  • 2021-02-18 16:45

    If you have access to a Mac OS X machine, PatchViewer sounds like it might do what you're looking for: http://appledeveloper.com.au/products/patchviewer/

    (Disclaimer: I am the author of PatchViewer.)

    0 讨论(0)
  • 2021-02-18 16:49

    I've never found any, but the solution that I usually use is to simply apply the patch file to a pristine checkout of the tree, and then do a "regular" diff (my preferred tool is diffuse) to review the changes in context.

    The problem with "raw" patch files is that they only provide a few lines of context before and after the change, which often isn't enough.

    If you don't like the patch, simply revert the changes and don't commit!

    0 讨论(0)
  • 2021-02-18 16:50

    You can view a diff file (a patch generated by diff tool) using Kompare from KDE environment. I used it before on Linux, but today I found how to install it on Windows. Here is an installation instruction from a blog "Kompare - the only valuable diff for M$Windows":

    1. Go to gnuwin32 diffutils, download and install.
    2. Download kdewin installer and launch it.
    3. After installing kde4win - start kompare and in "Diff" section show him where your diff.exe (from gnuwin32 diffutils) is located.
    4. Restart Kompare and it's ready to use!

    You can also add an association with .diff file format and now you can view any diff files. For me it works great.

    0 讨论(0)
  • 2021-02-18 17:03

    I like to use KDiff3, it's packed with functions, very user friendly and available for all popular platforms. It can also integrate with TortoiseSVN.

    0 讨论(0)
提交回复
热议问题