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

Re: Client side hooks PATH argument

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Tue, 20 Aug 2013 20:53:24 +0200

On 20.08.2013 03:12, Peter Koves wrote:
> Perhaps I'm confused, but I expected the file passed as the PATH
> argument to the post-update-hook (and also the post-commit-hook) to
> contain a list of AFFECTED files rather than just the path(s) that
> the command was applied to. So for update, I expected the actually
> updated files to be in the list.

As the docs say:
http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-settings.html#tsvn-dug-settings-hooks

PATH

     A path to a temporary file which contains all the paths for which
the operation was started. Each path is on a separate line in the temp file.

Note the "for which the operation was started".

> Is the only way to find out what was updated or committed to have a
> 'pre-' hook, apply 'svn st -v' to the set of paths supplied, save the
> output in some well known location, then repeat in the 'post-' hook
> and derive the set of changes by comparing revision numbers? And,
> this doesn't even work for commit ... I could fake it with trying to
> do 'svn st -u' ... but the commit may be selectively stopped from the
> dialog. In any case, seems pretty inefficient and complicated when
> you actually have the information on hand ...

Yes, the information is at hand. And in your case it might even work.
But imagine an update that affects thousands of files. Writing that to a
file every time is a very expensive operation and will affect users that
don't need that info.

You could use the log file in %APPDATA%\TortoiseSVN\logfile.txt
to get the info you need.

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest interface to (Sub)version control
    /_/   \_\     http://tortoisesvn.net
------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3063067
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2013-08-20 20:53:33 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.