当前位置: 代码迷 >> CVS/SVN >> TortoiseSVN中diff主干与旁支
  详细解决方案

TortoiseSVN中diff主干与旁支

热度:1222   发布时间:2013-02-26 00:00:00.0
TortoiseSVN中diff主干与分支

Just hold down the?Shift?key while you right click on the file. Then selectTortoiseSVN??Diff with URL. In the following dialog, specify the URL in the repository with which you want to compare your local file to.

详见:http://tortoisesvn.net/docs/nightly/TortoiseSVN_en/tsvn-dug-diff

File Differences

Local changes

If you want to see what changes?you?have made in your working copy, just use the explorer context menu and selectTortoiseSVN?→?Diff.

Difference to another branch/tag

If you want to see what has changed on trunk (if you are working on a branch) or on a specific branch (if you are working on trunk), you can use the explorer context menu. Just hold down the?Shift?key while you right click on the file. Then selectTortoiseSVN?→?Diff with URL. In the following dialog, specify the URL in the repository with which you want to compare your local file to.

You can also use the repository browser and select two trees to diff, perhaps two tags, or a branch/tag and trunk. The context menu there allows you to compare them using?Compare revisions. Read more in?the section called “Comparing Folders”.

Difference from a previous revision

If you want to see the difference between a particular revision and your working copy, use the Revision Log dialog, select the revision of interest, then select?Compare with working copy?from the context menu.

If you want to see the difference between the last committed revision and your working copy, assuming that the working copy hasn't been modified, just right click on the file. Then select?TortoiseSVN?→?Diff with previous version. This will perform a diff between the revision before the last-commit-date (as recorded in your working copy) and the working BASE. This shows you the last change made to that file to bring it to the state you now see in your working copy. It will not show changes newer than your working copy.

Difference between two previous revisions

If you want to see the difference between two revisions which are already committed, use the Revision Log dialog and select the two revisions you want to compare (using the usual?Ctrl-modifier). Then select?Compare revisions?from the context menu.

If you did this from the revision log for a folder, a Compare Revisions dialog appears, showing a list of changed files in that folder. Read more in?the section called “Comparing Folders”.

All changes made in a commit

If you want to see the changes made to all files in a particular revision in one view, you can use Unified-Diff output (GNU patch format). This shows only the differences with a few lines of context. It is harder to read than a visual file compare, but will show all the changes together. From the Revision Log dialog select the revision of interest, then select?Show Differences as Unified-Diff?from the context menu.

Difference between files

If you want to see the differences between two different files, you can do that directly in explorer by selecting both files (using the usual?Ctrl-modifier). Then from the explorer context menu select?TortoiseSVN?→?Diff.

Difference between WC file/folder and a URL

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. You can do the same thing for a working copy folder. TortoiseMerge shows these differences in the same way as it shows a patch file - a list of changed files which you can view one at a time.

Difference with blame information

If you want to see not only the differences but also the author, revision and date that changes were made, you can combine the diff and blame reports from within the revision log dialog. Read?the section called “Blame Differences”?for more detail.

Difference between folders

The built-in tools supplied with TortoiseSVN do not support viewing differences between directory hierarchies. But if you have an external tool which does support that feature, you can use that instead. In?the section called “External Diff/Merge Tools”?we tell you about some tools which we have used.

If you have configured a third party diff tool, you can use?Shift?when selecting the Diff command to use the alternate tool. Read?the section called “External Program Settings”?to find out about configuring other diff tools.

  相关解决方案