In Subversion, I created a branch from a trunk using svn copy
. According to the the SVN 1.5 manual, "This is the easiest way to “tag” a revision in your repository—just svn copy that revision (usually HEAD) into your tags directory."
svn copy file:////svn/projectX/trunk file:///svn/projectX/branches/stefanl
Then, I make my modifications to the stefanl
branch. I want to commit my changes to the trunk, but before I do that I would like to see a diff of the changes.
How can I diff the 'stefanl' branch against the 'trunk' branch? I tried svn diff
, but it didn't provide much information:
% svn diff file:////svn/projectX/trunk file:///svn/projectX/branches/stefanl Property changes on: . ___________________________________________________________________ Modified: svn:mergeinfo Reverse-merged /trunk:r1699-1870
Go to the repository browser (<right click>/TortoiseSVN/Repo-browser/<enter URL>). Open right click menu on branch B, select 'Mark for comparison'. Then open right click menu on branch A, select 'Compare URLs' or 'Show differences as unified diff'.
Just hold down the Shift key while you right click on the file. Then select TortoiseSVN → Diff with URL. In the following dialog, specify the URL in the repository with which you want to compare your local file to.
A tag is just a marker. Trunk would be the main body of development, originating from the start of the project until the present. Branch will be a copy of code derived from a certain point in the trunk that is used for applying major changes to the code while preserving the integrity of the code in the trunk.
The trunk is the main line of development in a SVN repository. A branch is a side-line of development created to make larger, experimental or disrupting work without annoying users of the trunk version.
Adding to the previous answers (if using Tortoise SVN on Windows):
You can Unix diff to compare directories.
To find missing files:
diff -r svn/projectX/trunk svn/projectX/branches/stefanl | grep -i only
To find what the differences between files:
diff -ru svn/projectX/trunk svn/projectX/branches/stefanl
I had the same question and found the suggestion in a mail thread: http://svn.haxx.se/users/archive-2003-08/0538.shtml
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