suppose that I have made some changes since last update (revert) to my a.b file. this a.b file is also changed in the repository. Now I want to compare the changes I made with the repos changes.
If I svn revert the file, I can see the changes between new and previous download (previous download doesn't have my changes). How can I see differences between the repository changes and mine?
thanks
Pick the two revisions you want to compare then use Context Menu → Compare Revisions. If you want to compare the same item in two different trees, for example the trunk and a branch, you can use the repository browser to open up both trees, select the file in both places, then use Context Menu → Compare Revisions.
A Subversion working copy is your own private working area, which looks like any other ordinary directory on your system. It contains a COPY of those files which you will have been editing on the website. You can edit these files however you wish, in the usual way.
The diff command is used to compare different revisions of files. The default action is to compare your working files with the revisions they were based on, and report any differences that are found. If any file names are given, only those files are compared.
If the alternate syntax is used, the server compares URL1 and URL2 at revisions N and M , respectively. If either N or M is omitted, a value of HEAD is assumed. By default, svn diff ignores the ancestry of files and merely compares the contents of the two files being compared.
svn diff -r HEAD a.b
I think you have to specify the HEAD revision if something changes in the repository.
But now that I re-read your question, it looks like you:
made a change
committed the change
now want to view those changes
In that case, you can get your current revision number with
svn info a.b
subtract 1 from it, and use it in the svn diff.
for example, if your current revision is 100
svn diff -r 99:100
If you are using Subclipse in Eclipse it will mark the file as conflict and when you double click on the conflicting file, it will show you on the one side your local file and on the right side the repositiry file.
The conflicts are marked red, and you can easily assume the changes or mark as merged.
For more information : http://subclipse.tigris.org/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With