Shweta Chandrakar
Shweta Chandrakar

Reputation: 353

SVN diff issue on Windows

I have written a batch script to do the diff between two revisions using Windows command-line SVN. The directory name has a space (I am cursing the developer for creating a directory name with a space).

SVN Version: 1.7
OS: Windows XP

For example, /svnrepo/xyz/project/C# Code/files/

The trouble is for the C# code directory name, I am assuming that the space is causing the issue - when I tried to run the diff command, the output is quite unusual:

svn diff -r633:700 /svnrepo/xyz/project/***C# Code***/files/

A /svnrepo/xyz/project/C%23%20Code/files/

How do I correct this issue?

I wish to get the output like:

A /svnrepo/xyz/project/C# Code/files/ So that I can write the output to some text file.

PS: I am a Linux person. And new to batch scripting.

Upvotes: 1

Views: 817

Answers (1)

Ken White
Ken White

Reputation: 125671

There is no "issue". That's standard URL character encoding (%23 means hex 23 or 0x23, which is decimal 35, which is the ASCII code for #, and %20 is hex 20 or 0x20, which is decimal 32, which is the ASCII code for a space character). You see the same thing in the address bar of your web browswer if you try to navigate to a URL that has those characters as part of the site address.

To log the differences to a file, just use command-line redirection:

svn diff -r633:700 /svnrepo/xyz/project/C# Code/files/ > diffs.txt

Upvotes: 2

Related Questions