[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: How to find out if file inside a directory was modified

From: Richard Schneidt <webmaster_at_desipro.de>
Date: 2007-01-23 23:33:56 CET

Stefan Küng schrieb:
> Richard Schneidt wrote:
>
>> I'm working on a special tool that tells the user in certain situations
>> that he needs to checkin files.
>
> What kind of tool is that? Will it be available for free? Open Source?
> Strictly speaking: since you're going through the TSVN code which is
> GPL, you'd have to make your tool GPL too.
I can of course make this code available , but I doubt it will be
useful to a lot of people since it is very specific to my task.
Here is a little explanation what my tool does.

In the centralized repository we store configurations for "machines",
on the machine we mirror a specific config via svk and checkout with
tortoise, then the machine goes offline.
You can now modify the configuration on the machine test your stuff, you
are not allowed to change the configs from a client connected to the
main repository, wouldn't make sense anyways.

Now one of my tool's task is to checks in the background if the machine
is connected to the network and if the configuration on the machine was
changed, that is why I need to know if a file was modified.
Now the users is presented with a dialog telling him, that he is back
online and that he has to checkin files to the local mirror, after that
I merged the mirrored svk with the centralized repository.
After that is done he can upload recording data etc.
>
>> Reading the tortoise documentation I didn't find a command to ask
>> tortoise if a file has been modified and not checked in.
>
> TSVN is a Subversion client. You might be better off to read the
> Subversion docs. The Subversion API for this would be
> svn_client_status().
I didn't see a svk option that tells me if the a file has been changed
in a dir, guess I should ask them how to do it.
>
>> I saw that in each of the subdirs, there is a .svn dir which contains
>> the file "entries", inside filenames+timestamps.
>> I guess this is what tortoise shell extension uses to find out if there
>> is a modification.
>
> Indirectly, yes. But: you must *never, ever* mess around in those
> directories yourself. Only the Subversion library must be allowed to
> read and write those files. Because the format of those files in there
> changes quite frequently, and you don't want to rewrite your tool
> every time that happens.
I don't need to do write, so I can't break anything.
>
>> Now my question: is there an easy way to find out if a file inside a
>> checked out project was modified?
>> If not, which part of the tortoise code parses this file to determine if
>> it should display the modified icon for a file or dir?
>> My requirement is that I only need to know if some file was modified, I
>> don't even have to know which one was modified.
>
> You could open a pipe to the TSVNCache.exe process and ask it for the
> status of a file. But the format of that pipe communication can also
> change without notice (after all, it's internal to TSVN).
>
> Stefan
That sounds okay to me. It is no problem if the format changes. These
machines have a fixed installation and apps won't be upgraded unless I
give my consent, as these machines operate only in a closed network
there is no need for security updates.

Where can I find information about that communication?

Thanks a lot , Richard

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Tue Jan 23 23:34:17 2007

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.