Huntkil
Huntkil

Reputation: 131

Using Beyond Compare in windows with cmd for svn

I want to use beyond compare to compare the difference between two version of the .doc file under SVN and save the result in a text file. SO far seeing all the guides I was able to successfully integrate BC with "diffViewer" tweaking the externals adding the path and files to compare. But I am unable to replicate the same in command prompt.

For example: svn diff -c 4 test.txt >>log.txt this gives the difference between the current version and 4th version and stores the difference in log.txt. Is it possible to do same with .doc files?

https://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-automation.html#tsvn-automation-basics

Read this link above but again running the modified command : TortoiseProc.exe /command:diff /startrev:4 /endrev:6 /path:"C:\svnroot\test2\trunk\Files\log.docx" opens beyond compare or anyother program specified in the diffViewer.

Upvotes: 1

Views: 1405

Answers (1)

Chris Kennedy
Chris Kennedy

Reputation: 2909

Configure Beyond Compare as a diff tool following the Subversion instructions on Scooter Software's website.

  1. Go into the Beyond Compare installation folder (eg, C:\Program Files\Beyond Compare 4).
  2. Create a batch file named "bc4svn.bat" containing:

    call "%~dp0\bcomp.exe" "%6" /title1=%3 "%7" /title2=%5
    IF %errorlevel%==0 goto ZERO
    EXIT /B 1
    :ZERO
    EXIT /B 0

  3. Go into Subversion's per-user configuration area, typically C:\Users\username\AppData\Roaming\Subversion.

  4. Edit "config" and change the following lines:

    [helpers]

    diff-cmd = "C:\Program Files\Beyond Compare 4\bc4svn.bat"

After you've configured Beyond Compare as a diff tool, you should be able to launch a diff using:

svn diff file.doc

To output comparison results to a printer, HTML, or plain text from the Text Compare, use the Session | Text Compare Report command.

If you use TortoiseSVN instead of command-line tools, follow the TortoiseSVN instructions on Scooter Software's website. TortoiseSVN overrides the default diff tool for DOC and DOCX files, to use Beyond Compare you'll need to click the Advanced button in the Diff Viewer settings and delete the overrides for DOC and DOCX.

Upvotes: 1

Related Questions