Skip to content

Commit d4dd2a8

Browse files
DavidHopkinsFbrdregad
authored andcommitted
SVN: update documentation
1 parent 2c4c88f commit d4dd2a8

File tree

2 files changed

+59
-5
lines changed

2 files changed

+59
-5
lines changed

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,16 @@ MantisBT version | Tags | Branch | Notes
143143

144144
This will import new changesets for all configured repositories.
145145

146-
11. Add additional repositories as needed.
146+
11. You can also configure event-driven import of new changesets. Many source control
147+
systems support configurable hooks or triggers which can be used to notify the
148+
**Source** plugin that new commits or revisions are available for import. This
149+
improves user experience by eliminating delays between source control commits and
150+
MantisBT state updates.
151+
152+
Refer to the configuration documentation for the relevant plugin extension(s) for more
153+
information.
154+
155+
12. Add additional repositories as needed.
147156

148157
## Support
149158

docs/CONFIGURING.SourceSVN.md

Lines changed: 49 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ with regard to installing SourceIntegration plugins.
3434
| SVN: Path to binary | This should be the directory which contains the `svn` (or `svn.exe` on Windows) executable |
3535
| SVN: Command arguments | List any command arguments which always need to be supplied when calling the SVN binary. If you are hosting on IIS, it's likely that the worker process will have no home directory, which will cause SVN to throw an error. You can avoid this by creating an empty directory & entering `--config-dir c:\path\to\empty\dir` within this option field |
3636
| SVN: Trust All SSL Certs | Enable this if your SVN repository is hosted on a service that uses a self-signed certificate |
37-
| SVN: Use Windows 'start' | |
37+
| SVN: Use Windows 'start' | When enabled on Windows, SVN is invoked with the command `start /B /D "path\to\binary\executable" svn.exe [args]` rather than `path\to\binary\executable\svn.exe [args]`. This is useful for avoiding problems with spaces in the SVN executable path, e.g. `C:\Program Files\` |
3838

3939
5. Click *Update Configuration* when you're done.
4040

@@ -59,19 +59,64 @@ with regard to installing SourceIntegration plugins.
5959
enter appropriate credentials that have read access to the repo.
6060
- If you use a "standard" repository layout, where the top-level of the
6161
repository contains `/trunk`, `/branches` and `/tags`, then enable the
62-
*Standard Repository option
62+
*Standard Repository* option
63+
- If your SVN repository contains multiple projects, as long as each project contains
64+
the standard `/trunk`, `/branches` and `/tags` directories, the entire repository
65+
can be configured as a single instance using the *Standard Repository* option.
66+
Configure the root directory of the repository in the *URL* field.
67+
When processing changesets, any path that contains `/trunk/` will be treated as a
68+
trunk commit. Paths that do not contain `/trunk/` and do contain `/tags/TAG_NAME_HERE/`
69+
or `/branches/BRANCH_NAME_HERE/` will be recognised as a tag or branch, and the name
70+
will be extracted and applied to the changeset. Commits that include files from
71+
multiple SVN *trunk/tags/branches* directories will be tagged with a branch based
72+
on the first *trunk/tags/branches* directory encountered in the commit. Commits
73+
where no path includes any of the standard directories will be ignored.
6374
- If you use a non-standard repository layout, enter the path to the *trunk*,
6475
*branches* and *tags* directories into the following 3 option fields, e.g.
6576
`/my_new_product/trunk`, `/my_new_product/branches`, `/my_new_product/tags`.
66-
See the [SVN book](http://svnbook.red-bean.com/en/1.5/svn.branchmerge.maint.html)
77+
See the [SVN book](http://svnbook.red-bean.com/en/1.7/svn.branchmerge.maint.html)
6778
for more details of repository layouts
6879
- If you use a non-standard repository layout and you want to ignore commits
6980
to the repository that are not changing files within the *Trunk Path*,
70-
*Branch Path* or *Tag Path* directories (which is the most likely case),
81+
*Branch Path* or *Tag Path* directories (which is the most likely case),
7182
then enable the *Ignore Other Paths* option.
7283
- Click the *Update Repository* button.
7384

7485
4. Click the *Import Everything* button to test connectivity and perform an
7586
initial import of the repository changesets.
7687

7788
**Note:** This may take a long time or even fail for large repositories.
89+
90+
5. Set up SVN repository hooks.
91+
92+
- [Repository hooks](http://svnbook.red-bean.com/en/1.7/svn.reposadmin.create.html#svn.reposadmin.create.hooks)
93+
allow the SVN server to trigger MantisBT to process new commits on demand, rather
94+
than based on a polling schedule. Refer to your SVN server's documentation for more
95+
information on how to implement the hooks.
96+
- Use the [post-commit](http://svnbook.red-bean.com/en/1.7/svn.ref.reposhooks.post-commit.html)
97+
hook to process new commits
98+
- Use the [post-revprop-change](http://svnbook.red-bean.com/en/1.7/svn.ref.reposhooks.post-revprop-change.html)
99+
hook to process retroactive log message edits.
100+
- The [SourceSVN folder](../SourceSVN)
101+
contains sample code for triggering the MantisBT updates.
102+
- For Unix-compatible SVN server hosts:
103+
- `post-commit.tmpl` and `post-revprop-change.tmpl` are sample shell scripts for
104+
triggering the appropriate source-integration APIs.
105+
- For Windows SVN server hosts:
106+
- `post-commit.ps1` and `post-revprop-change.ps1` are PowerShell scripts which implement
107+
similar functionality to the Unix sample shell scripts.
108+
- `post-commit.bat` and `post-revprop-change.bat` are simple batch files which pass the
109+
hook parameters through to the corresponding PowerShell scripts.
110+
111+
## Windows integrated authentication
112+
113+
If you are using VisualSVN Server or another product which supports NTLM/Kerberos-based
114+
authentication over HTTPS, and you are running MantisBT on a Windows server, you may
115+
find that the *SVN Username* and *SVN Password* configuration settings are ignored.
116+
If the SVN client is able to establish Windows authentication while setting up the SSL
117+
connection, the "basic" credentials supplied by these parameters are not used.
118+
This occurs automatically at the SSL layer and the SVN client cannot override it.
119+
120+
In this situation, it is recommended to ensure that the web server running MantisBT is
121+
configured to run as a Windows domain user or managed service account, and grant that
122+
domain user read access to any SVN repositories that require MantisBT integration.

0 commit comments

Comments
 (0)