erzulie
erzulie

Reputation: 350

Creating SVN Diff on the Command Line with Relative Paths

When I create a diff using TortoiseSVN it does so using relative paths for all the files it references.

However, when I use the SVN binaries that get installed with TortoiseSVN and I create a diff on the commandline all the paths are absolute.

To call SVN.exe I am using this:

svn diff "C:\Source\Trunk1" > "C:\Users\me\Backup\Trunk1_Modifications_%date:/=-%_%time::=.%.diff"

I'm hoping I just need to add a commandline switch to do this - but I have had no luck in finding one.

How can I get SVN.exe to specify relative paths when called form the commandline?

Upvotes: 2

Views: 536

Answers (1)

bahrep
bahrep

Reputation: 30662

You need to provide svn diff with relative path (or no path at all), too, in a working copy. Here are two examples that I hope will explain this behavior:

svn diff C:\WCs\abc                                 
Index: C:/WCs/abc/MyFile.txt
===================================================================
[snip]

svn diff
Index: /MyFile.txt
===================================================================
[snip]

Upvotes: 2

Related Questions