You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "Charles M. Gerungan" <ch...@nednieuws.com> on 2005/06/11 15:34:32 UTC

Change repository setup.

A long time ago I started using a directory which holds configuration  
files for different programs. Most of these files are being symlinked  
to from /usr/local/etc/. (At the time, it seemed like a good idea.)  
Now, it seems smarter to me to just keep all files in /usr/local/etc  
and all its sub-directories so I can just ci and ci the whole  
directory, but how can I do that while preserving the history of  
those files?

I looked into 'svn move' and the archive, but I'm not sure that what  
I've read applies to my situation. I'm looking for a pointer to the  
right part of the svnbook to read, keywords to use while searching  
the archive (I'm not a native speaker of English) or if it's quick to  
understand just the solution.

Thanks.

-- 
Regards, Charles.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Change repository setup.

Posted by Max Bowsher <ma...@ukf.net>.
Charles M. Gerungan wrote:
> Op 12-jun-2005, om 12:17 heeft Max Bowsher het volgende geschreven:
>
>> Those svnadmin commands are *totally* broken. svnadmin doesn't
>> operate on URLs!
>
> Ah, yes. But luckily, I can ssh into the box.
>
>> Check out your existing config dir from the repository to /usr/
>> local/etc2
>> Use a series of mkdir and move operations to rearrange the contents
>> to have the correct structure for /usr/local/etc
>> mv /usr/local/etc /usr/local/etcold && mv /usr/local/etc2 /usr/
>> local/etc
>
> But wouldn't this erase the history of the files?

Ok, I should have been more specific:
"Use a series of *svn mkdir* and *svn mv* operations..."

> Would this work:
>
> svnadmin dump /home/charles/configfiles >~/dump
> svnadmin create /home/charles/svnrepo
> mkdir /usr/local/etc2
> cd /usr/local/etc2
> mkdir trunk config branches (so I can keep complete working
> configurations)
> svn import . /home/charles/svnrepo/configfiles
> svadmin load /home/charles/svnrepo/configfiles/trunk <~/dump
> svn co /home/charles/svnrepo/configfiles/trunk /usr/local/etc2
> # copy over missing files from /usr/local/etc
> # add missing files to repository
> # ci missing files
> # done?

No, it would not work. There are several syntax errors in the commands, plus 
you are creating a nasty muddle by using the directory /usr/local/etc2 for 2 
seperate purposes at different points in the recipe.

I don't understand why you seem to think you need to use svnadmin dump/load 
at all. You don't - unless you are *also* trying to insert a 
trunk,tags,branches directory layer into your repository, at the same time 
as refactoring the layout of your config files from an arbitrary layout to 
an etc-like layout? In which case, don't over-complicate things, do one at a 
time!

Max.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Change repository setup.

Posted by "Charles M. Gerungan" <ch...@nednieuws.com>.
Op 12-jun-2005, om 12:17 heeft Max Bowsher het volgende geschreven:

> Those svnadmin commands are *totally* broken. svnadmin doesn't  
> operate on URLs!

Ah, yes. But luckily, I can ssh into the box.

> Check out your existing config dir from the repository to /usr/ 
> local/etc2
> Use a series of mkdir and move operations to rearrange the contents  
> to have the correct structure for /usr/local/etc
> mv /usr/local/etc /usr/local/etcold && mv /usr/local/etc2 /usr/ 
> local/etc

But wouldn't this erase the history of the files? Would this work:

svnadmin dump /home/charles/configfiles >~/dump
svnadmin create /home/charles/svnrepo
mkdir /usr/local/etc2
cd /usr/local/etc2
mkdir trunk config branches (so I can keep complete working  
configurations)
svn import . /home/charles/svnrepo/configfiles
svadmin load /home/charles/svnrepo/configfiles/trunk <~/dump
svn co /home/charles/svnrepo/configfiles/trunk /usr/local/etc2
# copy over missing files from /usr/local/etc
# add missing files to repository
# ci missing files
# done?

-- 
Regards, Charles.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Change repository setup.

Posted by Max Bowsher <ma...@ukf.net>.
Charles M. Gerungan wrote:
> Op 11-jun-2005, om 17:34 heeft Charles M. Gerungan het volgende
> geschreven:
>
>> I looked into 'svn move' and the archive, but I'm not sure that
>> what I've read applies to my situation.
>
> Would this perhaps do what I'm after?
>
> $ cd ~/tmp
> $ svnadmin dump file:///path/to/old_repo dump
> $ svnadmin load file:///usr/local/etc < repos-backup
> $ svn add *
> $ svn ci * -m "New repository setup."

Those svnadmin commands are *totally* broken. svnadmin doesn't operate on 
URLs!

What you should probably do is:

Check out your existing config dir from the repository to /usr/local/etc2
Use a series of mkdir and move operations to rearrange the contents to have 
the correct structure for /usr/local/etc
mv /usr/local/etc /usr/local/etcold && mv /usr/local/etc2 /usr/local/etc

Max.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Change repository setup.

Posted by "Charles M. Gerungan" <ch...@nednieuws.com>.
Op 11-jun-2005, om 17:34 heeft Charles M. Gerungan het volgende  
geschreven:

> I looked into 'svn move' and the archive, but I'm not sure that  
> what I've read applies to my situation.

Would this perhaps do what I'm after?

$ cd ~/tmp
$ svnadmin dump file:///path/to/old_repo dump
$ svnadmin load file:///usr/local/etc < repos-backup
$ svn add *
$ svn ci * -m "New repository setup."

-- 
Regards, Charles.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org