[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: Hans-Werner Dietz <hans-werner.dietz_at_dbt.de>
Date: 2007-01-24 07:56:01 CET

Richard Schneidt schrieb:
> Hi Folks,
> I'm working on a special tool that tells the user in certain situations
> that he needs to checkin files.
> Reading the tortoise documentation I didn't find a command to ask
> tortoise if a file has been modified and not checked in.
> 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.
> 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.
> Thanks in advance Richard

You can use Subwcrev.exe in combination with a script.
Subwcrev comes with TSVN. If you use placeholders like $WCMODS?1:0$
and $WCMIXED?1:0$ you can figure out if you have a clean working copy or
not (can be mixed and/or modified).

kind regards

Here the help from subwcrev.exe:

SubWCRev reads the Subversion status of all files in a working copy
excluding externals. If SrcVersionFile is specified, it is scanned
for special placeholders of the form "$WCxxx$".
SrcVersionFile is then copied to DstVersionFile but the placeholders
are replaced with information about the working copy as follows:

$WCREV$ Highest committed revision number
$WCDATE$ Date of highest committed revision
$WCRANGE$ Update revision range
$WCURL$ Repository URL of the working copy
$WCNOW$ Current system date & time

Placeholders of the form "$WCxxx?TrueText:FalseText$" are replaced with
TrueText if the tested condition is true, and FalseText if false.

$WCMODS$ True if local modifications found
$WCMIXED$ True if mixed update revisions found

To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Wed Jan 24 08:35:09 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.