Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SVN diff across 2 different repositories

Tags:

I have 2 repositories. As the trunk code was in one repository, which was protected, I did a checkout and then checked in to the other repository (as users did not have permission to the first protected one).

Now the issue is that both the repositories have been worked on and we wish to finally merge the code/branch in the second unprotected one with the protected one. But, there will be conflicts in these.

Is there a way to find out the diff for the 2 repository branches? Also, if there are whitespace changes, how do I ignore those?

like image 257
gagneet Avatar asked Aug 03 '09 08:08

gagneet


People also ask

How can I find the difference between two files in SVN?

If you want to see the differences between a file in your working copy, and a file in any Subversion repository, you can do that directly in explorer by selecting the file then holding down the Shift key whilst right clicking to obtain the context menu. Select TortoiseSVN → Diff with URL.

What is repository in SVN?

A Subversion repository — abbreviated SVN repository — is a database filled with your code, files, and other project assets. A SVN repository maintains a complete history of every change ever made.


1 Answers

svn diff --old=URL1@rev1 --new=URL2@rev2 

Example:

svn diff --old=http://svn.whatever.com/trunk/myfile.txt@1234 --new=http://svn.whatever.com/branch/myfile.txt@5678 

This allows you to specify both the branches and the revision numbers for both files. I know it works because I just executed it.

like image 50
Lyle Ziegelmiller Avatar answered Oct 02 '22 11:10

Lyle Ziegelmiller