Page 1 of 2
SVN icon overlay alternative
Posted: 17 Nov 2005 17:09
by cycletronic
Instead of using the icon overlays, you could get the file status information from subversion and create a new details column that says the status. Then, anyone could setup visual filters on that column to highlight files based on status.
Below is the regular windows property dialog that comes up when I get properties on a subversioned file. Note that there is a "text status" field and a "property status" field. I'm not sure how, but it should be possible to get this information from subversion.

Re: SVN icon overlay alternative
Posted: 17 Nov 2005 17:42
by admin
Why don't you write to TortoiseSVN support and ask them for the necessary VB code snippet. They should have an interest in TV3 supporting them...
Posted: 01 Dec 2005 00:18
by diarrhio
I know that SVN has an API that you can directly call to get status information about file(s) and directory(ies). You can find them here:
http://subversion.tigris.org/servlets/P ... olderID=91
I haven't worked in VB much so I don't know what is involved in linking with a C library, or if it's even possible.
I don't think anybody here is expecting you to duplicate tortoise svn's functionality. But a simple status column as cycle suggests is plenty. That way we can use XY's (very cool) visual filters to filter on the status reported in that column. I browsed through the API and retrieving file/directory status seems like a simple function call.
This really is the only thing keeping me from using XY full time. Because I code for a living I am forced to use Explorer, but I keep finding myself returning to XY because it's just so cool. I'd be willing to help as much as I can to get this feature in there.
I don't know if you are planning any type of plugin framework for XY, but if you do, then I could easily see this being implemented as a plugin that somebody else could develop.
Posted: 01 Dec 2005 10:05
by admin
Well, see my previous post. I should only need a couple of lines of code. They should tell me, how to do it, and you should tell them to tell me.
Posted: 01 Dec 2005 19:21
by diarrhio
Well, what I am saying is that you don't need to interact with Tortoise at all (the program or the developers) . You will just link with the regular SVN library (Tortoise SVN is just a windows shell extension which allows you to interact with SVN through Explorer). This is so you can give us status information for each file/directory. Status can be things like "current", "modified", "conflicted", etc. Only folders that have a ".svn" subfolder in them will have status info.
That is all we (at least I) need. Tortoise will completely be removed from the picture, at least on the XY side. I'm sure we'll still need to use Explorer for other SVN interactions, or switch to another front end for dealing with SVN, of which there are many.
The libray is on that link. In browsing through the headers, it looked like there was just one function call you needed to make to get status information.
The header file I am looking in is svn_client.h. In there are a few methods you will likely interact with: svn_client_create_context, svn_client_propget2, and possibly svn_client_proplist2. Like I said, I don't know what is involved in linking VB to a C library, so I can't say how much work that is. But once that is set up, I am fairly confident that the rest will be fairly easy.
This is the only thing keeping me from purchasing this product!

Posted: 01 Dec 2005 21:59
by admin
diarrhio wrote:Well, what I am saying is that you don't need to interact with Tortoise at all (the program or the developers) . You will just link with the regular SVN library (Tortoise SVN is just a windows shell extension which allows you to interact with SVN through Explorer). ...
I just cannot believe that this is the way. I mean, Explorer obviously can do the overlays alright, and I don't think that MS needed any SVN library to accomplish that. I think icon overlays is a standard built-in OS function, and I'm just too dumb to get it to work.
Posted: 02 Dec 2005 00:34
by diarrhio
True, but Windows maybe be able to do overlays using functionality not exposed in the Windows API. There are many hidden functions that Windows doesn't expose to the outside world and I wouldn't be the least bit surprised if the functionality we are trying to reach is in one of them.
Or, it could just be an issue with VB and how it is wrapping the Windows call you are trying to make. I'm not sure exactly how thin of a wrapper the VB call is, whether it is doing any type of translation or just thinly calling the API routine (I forget what it's called now).
D
Posted: 02 Dec 2005 10:35
by admin
diarrhio wrote:True, but Windows maybe be able to do overlays using functionality not exposed in the Windows API...
Could be. I should find out before going a more complicated way. Unfortunately information on this is very scarce.
For the meantime I could give you a shortcut to open Explorer

Posted: 02 Dec 2005 18:04
by diarrhio
admin wrote:Could be. I should find out before going a more complicated way. Unfortunately information on this is very scarce.
For the meantime I could give you a shortcut to open Explorer

Haha. Maybe that will hold me over for the time being.
I can't emphasize enough how much I'd like work exclusively in XY. It's just so awesome, and is continuing to become more awesome. Let me know if there is anything I can do to help speed this process along.
BTW, do you konw what is involved in having VB link up with a C library? Is it much work, or even possible?
Posted: 02 Dec 2005 18:34
by admin
diarrhio wrote:BTW, do you konw what is involved in having VB link up with a C library? Is it much work, or even possible?
You write a typelib through which VB does communicate with the C lib.
See e.g.:
http://www.vbaccelerator.com/typelib.htm
Posted: 03 Dec 2005 11:18
by admin
diarrhio wrote:I can't emphasize enough how much I'd like work exclusively in XY. It's just so awesome, and is continuing to become more awesome. Let me know if there is anything I can do to help speed this process along.
OK, I will give it another try. I'm sure I can come up at least with a text column. Remember: my only problem was to find the overlay icons index in the system image list! I do know how to draw the overlays, and I succeeded in retrieving the files' overlay information -- it just did not map consistently to the system image list.
To do this I have to install TortoiseSVN-1.2.0-svn-1.2.0.msi
I remember last time I had some trouble to actually create files having overlay icons. Can give me a crash course...?
Posted: 03 Dec 2005 17:59
by diarrhio
Download this
http://diarrhio.homeip.net:8080/tortoise_examples.zip and extract anywhere. If you open up explorer, you should w/in a few seconds, see the overlays on the folders and files.
Let me know if you can get it to work.
D
Posted: 04 Dec 2005 19:51
by admin
diarrhio wrote:Let me know if you can get it to work.
Yep, it worked. I see red and green icons. How do I get some of the other icons?
Who can do this apart from Explorer? I did some research and it appears that only Total Commander can. True?
Posted: 05 Dec 2005 09:25
by diarrhio
Some of the other icons are a little harder to get to show up, since you have to make some changes to the files that result in them changing their overlays. However, I think you can copy a random file to one of the folders, right click on it, and say "Tortoise SVN/Add...", and it should have a little blue + on it, indicating it was added to your local copy, but not committed to the server/repository.
I haven't tried out any other Explorer replacements, at least not to test this out. Yours was the only one I looked at that I even bothered to download and test

Posted: 05 Dec 2005 11:08
by admin
It works!!!
