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

Re: TortoiseSVN do not accept xcopy within Hook Skripts

From: Ulrich Eckhardt <eckhardt_at_satorlaser.com>
Date: Wed, 16 Sep 2009 15:58:50 +0200

On Wednesday 16 September 2009, Marc Biebl wrote:
> I'd like to make a copy of my working directory after a repository commit
> (TortoiseSVN Commit).
> So I created a batch file named "post_commit.bat" and added it to
> TortoiseSVN as Hook Script (Type: Post-Commit).
> The batch file just contains the following line:
> xcopy C:\svn_working_copy \* C:\test /S /Y
> This line causes that all files and subfolders from the "svn_working_copy"
> directory will be copied in the "test" directory (without asking).

One thing up front:
WCs are throw-away, temporary space for development. Things like "the working
copy" hint that you only ever create a single one. That isn't bad
necessarily, but you are loosing options due to that self-imposed
restriction. I often have multiple WCs of the same project, for developing
multiple things in parallel.

You seem to have a testing and a development area. Both of them are actually
working copies if you copied the development area to it (a copy of a WC is
itself a WC). If your goal is to test independently of the development, I
have two suggestions to you:

1. Since it is a working copy itself, you can run 'svn update' in it. All
changes that were committed to the repository are then merged into the
testing area.

2. If you want to check if the committed changes are okay, you should not use
the working copy you committed from. Imagine that you forgot to register a
new file with Subversion. If you copy the WC, you will thing everything is
fine, while actually you can't reproduce the current state from the
repository. For that, delete the existing tree and check out or export anew.

Note that both work regardless of the location of the working copy where you
committed from, which is what allows you to have more than one of them.



ML: http://tortoisesvn.tigris.org/list_etiquette.html
FAQ: http://tortoisesvn.net/faq
Sator Laser GmbH
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932
Sator Laser GmbH, Fangdieckstraße 75a, 22547 Hamburg, Deutschland
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932
           Visit our website at <http://www.satorlaser.de/>
Diese E-Mail einschließlich sämtlicher Anhänge ist nur für den Adressaten bestimmt und kann vertrauliche Informationen enthalten. Bitte benachrichtigen Sie den Absender umgehend, falls Sie nicht der beabsichtigte Empfänger sein sollten. Die E-Mail ist in diesem Fall zu löschen und darf weder gelesen, weitergeleitet, veröffentlicht oder anderweitig benutzt werden.
E-Mails können durch Dritte gelesen werden und Viren sowie nichtautorisierte Änderungen enthalten. Sator Laser GmbH ist für diese Folgen nicht verantwortlich.
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2009-09-16 15:59:58 CEST

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