mayerwin / vs-customize-window-title

Customize Visual Studio Window Title - Visual Studio Extension
https://marketplace.visualstudio.com/items?itemName=mayerwin.RenameVisualStudioWindowTitle
MIT License
108 stars 30 forks source link

Get BranchName out of svnDirectoryName #57

Closed JayDalton closed 10 months ago

JayDalton commented 4 years ago

Hi! [VS2019] I am using svnDirectoryName to address SVN specific values, fine. I can use svnDirectoryName:0 to get the current SVN directory path I can use svnDirectoryName:1 to get the relative URL like abc/branches/xyz And nothing more, because higer numbers results in empty string, right?

Is there a way to get the substring of svnDirectoryName:1 to address the last part BranchName, like svnDirectoryName:1:-1?

mayerwin commented 4 years ago

This should be supported already: [svnDirectoryName:X:Y] SVN directory segment over the specified range (e.g. for /Branches/Developer/UserName/MySolutionFolder/MySolution.sln, [svnDirectoryName:0:2] = /Branches/Developer, [svnDirectoryName:2:0] = Developer/Branches);

JayDalton commented 4 years ago

Yes, it should, but it does not do the job. Or, am i wrong? My Example: grafik With svnDirectoryName:0 I get: C:\Program Files\SilkSvn\bin\ With svnDirectoryName:1 I get: /ems_v7_2/branches/tg_statusflags With svnDirectoryName:-1 I get: /ems_v7_2/branches/tg_statusflags

So, it tells me there are only two entries. A Range from 1 to 2. And i can not address the last substring of the second part?!

What I really want: is only tg_statusflags How to solve this? Thanks in advance

mayerwin commented 4 years ago

What is the result of [svnDirectoryName]?

JayDalton commented 4 years ago

Sorry for delay! The result of [svnDirectoryName] is /ems_v7_2beta/branches/tg_statusflags, so the same as [svnDirectoryName:1]

mayerwin commented 4 years ago

Is this the expected svnDirectoryName? Can you confirm that the Svn director separator in the extension settings is: /

mayerwin commented 4 years ago

What puzzles me is how you could get /ems_v7_2beta/branches/tg_statusflags For: [svnDirectoryName]

And: C:\Program Files\SilkSvn\bin For: svnDirectoryName:0

If you look at the source code, [svnDirectoryName] cannot contain less characters than a subset of it.

mayerwin commented 4 years ago

When you're in the SVN directory, what is the result of command svn info (this is what is used as input here)?