automatic link generation for revisions in log dialog

65 views
Skip to first unread message

cle...@feinke.de

unread,
Aug 13, 2019, 2:06:03 PM8/13/19
to TortoiseSVN
Hello

Since version 1.7 Tortoise-SVN the log dialog automatically creates links to revision numbers. For example "r1234" or "revision 1234" turns into a link to that revision. Basically I like this feature. But can I influence it?

I would like to suppress those auto-links in certain cases. Sometimes the log message contains references to revisions of another SVN repository. In those case links to local revisions are not desired.

Can I influence the regex which does the matching of revision numbers?

Thanks
Clemens

https://tortoisesvn.net/tsvn_1.7_releasenotes.html#logdlg

Stefan

unread,
Aug 13, 2019, 2:14:35 PM8/13/19
to torto...@googlegroups.com
you can set a project property named tsvn:logrevregex and specify your own matching regex.
The default is
L"\\b(r\\d+)|\\b(revisions?(\\(s\\))?\\s#?\\d+([, ]+(and\\s?)?\\d+)*)|\\b(revs?\\.?\\s?\\d+([, ]+(and\\s?)?\\d+)*)"


cle...@feinke.de

unread,
Aug 13, 2019, 3:06:16 PM8/13/19
to TortoiseSVN
Hello Stefan

Great! That helped much!

I created a rather simple regex "tsvn:logrevregex=\b(r\d+)".
This is enough because in our team we only use the form r1234 to explicitly refer to a revision.

Thanks
Clemens

P.S.
For other readers it should be noted that Stefan quoted from the source code. So L"\\b(r\\d+)... actually is \b(r\d+)...

cle...@feinke.de

unread,
Aug 14, 2019, 12:32:37 PM8/14/19
to TortoiseSVN
Am Dienstag, 13. August 2019 20:14:35 UTC+2 schrieb Stefan:
> you can set a project property named tsvn:logrevregex and specify your own matching regex.

Just one more note ...
Looks like the tsvn:logrevregex property is not considered by the "TortoiseSVN Project Monitor" tool.

Stefan

unread,
Aug 14, 2019, 1:16:53 PM8/14/19
to TortoiseSVN
It should. But you have to restart the tool.

cle...@feinke.de

unread,
Aug 14, 2019, 3:02:18 PM8/14/19
to TortoiseSVN
>> Looks like the tsvn:logrevregex property is not considered by the "TortoiseSVN Project Monitor" tool.
>
>
> It should. But you have to restart the tool.

Hello Stefan

Yes of course.
I restarted the monitor-tool, I deleted and re-inserted the project in the monitor list, I deleted everything in "AppData\Roaming\TortoiseSVN\logcache\", I turned off log-caching, I even restarted Windows.
Still the monitor does not consider my regex (while SVN-Tortoise does). I can live with that, but would be willing to provide more information in case you want to dig into that.

Thanks
Clemens

P.S.
Tortoise-SVN is GREAT! Thanks!

P.P.S.
I have Tortoise-SVN 1.12.0.

Stefan

unread,
Aug 14, 2019, 3:29:53 PM8/14/19
to TortoiseSVN
Sorry, of course you're right.

The reason that the project properties are not used is because the project monitor usually monitors multiple repositories, and also monitors urls, not working copies (well, you can specify a working copy but that's just a convenience).
And reading project properties directly from a repository is too time expensive. That's why the project properties are not read.
Reply all
Reply to author
Forward
0 new messages