Add additional information to the Windows Explorer Title Bar - SVN

144 views
Skip to first unread message

Arath Burgos Hernandez

unread,
Oct 16, 2023, 7:19:47 PM10/16/23
to TortoiseSVN-dev
Hi Everyone,

I saw this interesting feature in TortoiseGit (attached as currentBranchInTittle.png).
Which can be enabled as follow (attached as currentBranchInTittle_TGit_Setting.png).
The feature basically integrates the current branch in Windows Explorer Title when it is a Git repo.

I saw that it was developed in this commit:
https://github.com/TortoiseGit/TortoiseGit/commit/2871c9646ef0931c955ef1617a6e7db00e0e43ad

However, this feature is not available for TortoiseSvn. I know that Git is better than Svn. Unfortunately, I have to continue using SVN yet. It would be great to have this feature.

I tried to download an re-compile the project but I had some issues. Do you know if is it too complicated integrate that change on TortoiseSvn?

Regards.

currentBranchInTittle_TGit_Setting.png
currentBranchInTittle.png

Arath Burgos Hernandez

unread,
Oct 16, 2023, 7:25:04 PM10/16/23
to TortoiseSVN-dev
I found this info in the documentation:
https://tortoisegit.org/docs/tortoisegit/tgit-dug-settings.html

ModifyExplorerTitle

When using the status cache, the title bar of explorer windows are modified to include the branch name, stash count and if an upstream is set also the outgoing and incoming commits. Set this to false if you don't want this or if you have other tools which already do that. The default is true.

Best regards.

Daniel Sahlberg

unread,
Oct 17, 2023, 2:20:38 AM10/17/23
to TortoiseSVN-dev
A difference between Git and SVN is that a branch in Git is something that applies to a whole repository. In SVN, a branch is only a certain directory within the tree, copied from some other directory. By convention, branches live in /branches but there is nothing in the SVN design enforcing this. A repository can also contain multiple projects where each project has its own directory (with "branches" below). Finally, the equivalent of the Git Master/Main branch is the directory /trunk, which doesn't live beneath /branches at all.

So the problem to solve is how to figure out the branch name. The only way is to have some heuristics that look at the path name, but that is bound to fail sooner or later depending on the repository layout.

What was the problem compiling? Can we help with that?

Kind regards,
Daniel 

Arath Burgos Hernandez

unread,
Oct 17, 2023, 3:40:32 AM10/17/23
to TortoiseSVN-dev
Thanks for you quick response.

I'll retake the modification later because I have too much work right now. Maybe yes, I'll need help. I have been following the steps from the txt but it's my first time with some tools. I read in some place that it needs Visual Studio but I prefer Visual Studio Code. Is it possible to work the project in VSCode? (I mean, I know that at the end it is just code but idk if the project is configured to work with VS Code or there is any workspace already created).

I cosiderate me expert in Git but new in Svn. I realized about you mentioned. But, for example, when I do right click on a folder and click on properties I see a URL indicating me that it is the current pointer to cloud. That's that I would like to see in the Windows Title Bar. Just to have present in which I'm working on.

Or do you know of there is a workaround to see that is the current URL? (i remember that on the past I could organize files by "commit", "URL", etc in the file explorer but I think that Win10 blocked this feature). Basically that I would like to see is the current URL in the repo folder. That I'm doing right now is TortoiseSvn > Switch and then I realize what is my current brach/URL.

Do you think that it would be difficult to implement it for myself? I haven't checked the code yet. My strong language is C and C++.

P.S.: A possible solution if we would like to see "branches" in title bar is basically following tha same filter when we do a Switch Branch, because I remember that in that section there is no all URL, just a small part of the full URL. Or instead of that we can use a substring whose start point can be selected by the user from experimental features (this only will left the branch name because usually branches are in specific path). And obviously Trunk wil be an exception because it always will exist.

Regards :)

--
You received this message because you are subscribed to the Google Groups "TortoiseSVN-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tortoisesvn-d...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tortoisesvn-dev/ebb28d0b-ca83-41f0-9cdf-c5fecbd2aab1n%40googlegroups.com.

Arath Burgos Hernandez

unread,
Oct 18, 2023, 5:45:15 PM10/18/23
to TortoiseSVN-dev
I found something interesting related to the problem that you mentioned @Daniel Sahlberg: https://github.com/JohnstonCode/svn-scm#settings
The possibility to include regex for tags, branches and trunk:
image.png

Regards.

Stefan

unread,
Oct 20, 2023, 10:30:14 AM10/20/23
to TortoiseSVN-dev
just FYI: the feature in TGit was implemented by me ;)

And of course I first thought of implementing this in TSVN first, but there are too many problems.
As Daniel already pointed out the branch/trunk naming is only a convention. And yes, TSVN has "classification patterns" in the settings dialog under "Revision Graph" for exactly that.
However, even with the classification done properly, showing a branch name in svn would still not be fully defined. Since you can have files within a folder point to another branch. 

Also, in Win11 the whole feature is obsolete, because there the explorer does not have a title bar anymore, doesn't show any text.

Arath Burgos Hernandez

unread,
Nov 28, 2023, 12:08:13 PM11/28/23
to TortoiseSVN-dev
Oh I understand. Ok, thank you for the explanation :)

Fortunately, my team is migrating to Git so that means I won't need SVN anymore (thanks God).

Have a nice day.

Reply all
Reply to author
Forward
0 new messages