"Ryan Schmidt" <email@example.com> wrote in message
> On Nov 12, 2006, at 23:40, Mark wrote:
> > On 11/12/06, Mark Clements wrote:
> >> I would like to be able to make my repo creation script install
> >> the current
> >> 'default repository' as revision 1 of any new repository it
> >> creates. Can
> >> anyone think of a way to do this?
> > I haven't tried this out, but can't you just do an export of the
> > golden, setit aside. Then have your repos creation script create a
> > repository, do a checkout, copy the golden into the working copy, svn
> > add everything, do all the prop setting you want, svn commit.
> > Am I missing something?
> Yes -- the properties.
> The only way I can think of to do that would be:
> $ svnadmin create newrepo
> $ svn co $NEWREPO wc
> $ svn export $OLDREPO wc
> $ cd wc
> $ svn add .
> Then run "svn proplist -R -v $OLDREPO", and then create a script to
> parse that output and set those properties again on the items in the
> in-progress working copy. Then you can commit everything as the first
> revision. Then you can "svnadmin dump" the new repo to create a
> dumpfile that anyone can use to "svnadmin load" into a new repository.
> Note that you should be distributing a dumpfile of this template
> repository, and not copies of the repository itself, as the
> repository contains a unique ID, which no two repositories should
> share. True, that ID gets written to the dumpfile too, but it can
> (and should be) ignored when loading: "svnadmin load --ignore-uuid".
> I'm not sure though how you would go about enforcing that the --
> ignore-uuid option always be used.
OK - I see how this works, but it's quite a bit of work to redo whenever the
default setup changes. Not sure how often that will happen but it could be
an issue. Is there maybe some way of doing this by playing with the
relocate/switch statement? The currently proposed solutions are not
currently simple enough for my purpose - I want to be able to have a
'default_repo' that gets tweaked and modified as required, and for my
createrepo script to seed a new repository with revision 1 that matches the
head of default_repo, with no user intervention required.
If that is not possible, then I will probably get my script to manually
construct the first revision in a temporary working copy, commit that and
delete it. This would mean that any modifications would need to be made
directly in my setup script rather than in a versioned repository, but this
is probably the simplest solution if I can't automate the above.
- Mark Clements
To unsubscribe, e-mail: firstname.lastname@example.org
For additional commands, e-mail: email@example.com
Received on Thu Nov 16 19:00:07 2006