Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an SVN command to find the difference between two local files?

Tags:

diff

svn

What is the SVN command to find the difference between two files on the hard disk (neither of which are in the repository)?

What is the command to find if one of the file is in a particular revision of SVN?

What are some of the cool things you do using SVN commands?

like image 641
lprsd Avatar asked May 06 '09 19:05

lprsd


People also ask

What is the use of svn diff command?

The svn diff command reveals the differences between your working copy and the copy in the master SVN repository.

How do I compare changes in svn?

If you want to compare two revisions in an item's history, for example revisions 100 and 200 of the same file, just use TortoiseSVN → Show Log to list the revision history for that file. Pick the two revisions you want to compare then use Context Menu → Compare Revisions.

How does svn find local changes?

That's where the command TortoiseSVN → Check For Modifications... comes in handy. This dialog will show you every file that has changed in any way in your working copy, as well as any unversioned files you may have. If you click on the Check Repository then you can also look for changes in the repository.

What is svn co command?

The Checkout command is used to copy the files from the SVN repository to the working copy. If we want to access files from the SVN server, then we have to check out it first. The checkout operation creates a working copy of the repository where we can edit, delete, or add contents.


2 Answers

You don't use SVN to diff files that aren't in the repository. If you are using linux then use the command:

diff file1 file2

If you are using Windows then try a tool like win merge for example

To find information about a file in the repository then use the command:

svn info file

If you want to find out more about SVN, have a look at the official tutorial.

like image 124
Nadia Alramli Avatar answered Sep 22 '22 18:09

Nadia Alramli


svn diff --old foo.c --new bar.c

like image 29
Richard Kirby Avatar answered Sep 18 '22 18:09

Richard Kirby