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

Re: how to detect file update with post-update-hook??

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Thu, 07 Aug 2008 17:48:28 +0200

Jens-André Koch wrote:
> hello,
>
> is there a way to check, if a certain file was updated by setting up
> an post-update-hook?
> i'd like to setup a check on "database.sql" and if it was updated,
> insert it into DB.
>
> as far as i could figure things out, the PATH information contains a
> temporary file path: but inside the temp-file it's just another path,
> which is the working dir of the post-update-hook, nothing more. i'd
> expected a list with paths or files which have been updated or
> something.
>
> is there any trick to achive this?

That's not implemented. But you could check the 'last-commit-rev' in a
pre-update hook, then compare it with the 'last-commit-rev' in your post
commit hook script: if they differ, you know that the file has been updated.
You can use SubWCRev (or the SubWCRevCom object) to find that revision.

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net

Received on 2008-08-07 17:48:51 CEST

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

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