[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: Ryan Schmidt <subversion-2008a_at_ryandesign.com>
Date: Fri, 22 Feb 2008 00:18:27 -0600

On Feb 21, 2008, at 22:57, Luke Mason wrote:

> 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?

I'm not familiar with PVCS but this seems outside the scope of a
reversion control system. Subversion does not run any scripts for
you. It just lets you manage a filesystem with history. In other
words, there's nothing in Subversion to do specifically what you ask.
You could invent a new property "run-once" and set it to true on
those file that you only want to run once. Then write your script-
runner so that it checks that property before running a script.

> 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?

You can get the list of files changed by a revision if that would
help you, for example using "svn diff --summarize $REPO -r $REV"

---------------------------------------------------------------------
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 07:18:57 CET

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

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