4.29. Integration with Web-based Repository Viewers
There are several web-based repository viewers available for use with
Subversion such as
ViewVC
and
WebSVN
.
TortoiseSVN provides a means to link with these viewers.
You can integrate a repo viewer of your choice in TortoiseSVN.
To do this, you have to define some properties which define the linkage.
They must be set on Folders: (Section 4.17, “Project Settings”)
- webviewer:revision
Set this property to the URL of your repo viewer to view all
changes in a specific revision.
It must be properly URI encoded and it has to contain
%REVISION%
.
%REVISION%
is replaced with the revision
number in question.
This allows TortoiseSVN to display a context menu entry in the
log dialog
→ .
- webviewer:pathrevision
Set this property to the URL of your repo viewer to view
changes to a specific file in a specific revision.
It must be properly URI encoded and it has to contain
%REVISION%
and %PATH%
.
%PATH%
is replaced with the path relative
to the repository root.
This allows TortoiseSVN to display a context menu entry in the
log dialog
→
For example, if you right click in the log dialog bottom pane
on a file entry /trunk/src/file
then the
%PATH%
in the URL will be replaced with
/trunk/src/file
.
You can also use relative URLs instead of absolute ones. This is useful
in case your web viewer is on the same domain/server as your source
repository. In case the domain name ever changes, you don't have to adjust
the webviewer:revision
and webviewer:pathrevision
property. The format is the same as for the bugtraq:url
property.
See Section 4.28, “Integration with Bug Tracking Systems / Issue Trackers”.
| Set the Properties on Folders |
---|
These properties must be set on folders for the system to work.
When you commit a file or folder the properties are read from that folder.
If the properties are not found there, TortoiseSVN will search upwards
through the folder tree to find them until it comes to an unversioned
folder, or the tree root (e.g. C:\ ) is found.
If you can be sure that each user checks out only from e.g
trunk/ and not some sub-folder, then it's enough if
you set the properties on trunk/ .
If you can't be sure, you should set the properties recursively
on each sub-folder.
A property setting deeper in the project hierarchy overrides settings on
higher levels (closer to trunk/ ).
For project properties only,
i.e. tsvn: , bugtraq:
and webviewer:
you can use the Recursive checkbox to set
the property to all sub-folders in the hierarchy, without also
setting it on all files.
|
When you add new sub-folders to a working copy using TortoiseSVN, any
project properties present in the parent folder
will automatically be added to the new child folder too.
| Limitations Using the Repository Browser |
---|
Because the repo viewer integration depends upon accessing subversion
properties, you will only see the results when using a checked
out working copy. Fetching properties remotely is a slow operation,
so you will not see this feature in action from the repo browser
unless you started the repo browser from your working copy. If you
started the repo browser by entering the URL of the repository
you won't see this feature.
For the same reason, project properties will not be propagated
automatically when a child folder is added using the repo browser.
|