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

Re: How do I mark a file as run once?

From: Les Mikesell <lesmikesell_at_gmail.com>
Date: Fri, 22 Feb 2008 08:08:46 -0600

Luke Mason wrote:
> Hi All,
>
> We have certain files that can only be applied once to an environment.
> Mostly database table scripts like create table, alter table, some
> inserts that fill with default data, etc. Using PVCS, we use promotion
> groups to manage this. If/when we move to subversion, how would we
> manage this?
>
> Also, we manually list all the files required for a change in a
> tracking system. This allows us to set an apply order - you want to
> create the table before you attempt to insert data into it, or maybe
> alter it before you update it. If SVN doesn't require us to keep the
> list of files, because the atomic commits are an intrinisic changeset,
> (something we're looking forward to) how do we maintain this apply
> order? DO we have to keep the manual list of files, but just the
> database changes, not every file in the change?

In general you should move the knowledge of what to do for an install or
update into scripts that you run after checkout/update with the script
itself doing the check for the existing database contents and then
executing the appropriate create/alter/insert commands to make it
current. That way the same procedure will work even if you export the
files and copy them elsewhere to run instead of using a working copy,
and running it more than once is non-destructive. But you might want to
have an option in the script to blow the old database contents away so
you can start over easily after you are done testing.

-- 
   Les Mikesell
    lesmikesell_at_gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-02-22 15:09:14 CET

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