[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: Stefan Küng <tortoisesvn_at_gmail.com>
Date: 2007-01-23 21:52:18 CET

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.

> 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 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.

> 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).


   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Tue Jan 23 21:52:33 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.