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

Re: Noob question on pre-commit windows script

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Fri, 08 Feb 2008 09:41:20 +0100

Simon Large wrote:

> On another issue, I don't get any output into the command window.
> Using this sample script:
> @echo off
> echo hello Simon
> dir c:\
> pause
>
> I get a blank box flash up and disappear immediately. If I change the
> 3rd line to dir/s the box stays up for as long as the dir takes, but
> there is still no output. Pause doesn't work, but maybe that's to be
> expected as we're not expecting the hook to require user input.

You won't get any output in the dos/cmd box for a simple reason: TSVN
redirects that output to a file. It has to do that because otherwise
your script wouldn't be able to return a message/error to TSVN.

For example, our own hook script which checks the file headers for the
correct copyright year before every commit writes an error message which
is then shown in the progress dialog when the 'commit' fails.

Stefan

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

Received on 2008-02-08 09:41:30 CET

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