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

Re: Creating a new working copy in an existing directory (/etc)

From: Jani Averbach <jaa_at_cc.jyu.fi>
Date: 2003-03-29 16:02:42 CET

On 29 Mar 2003, Nicolas Bonnefon wrote:

> I wonder if it's possible to update a directory (not under svn control)
> with the repository.

> Let me explain: I happily use svn to keep track of changes in my /etc
> directory. /etc is actually a working copy of a svn repository and I can
> use diff, make tags, etc... Now I want to share my /etc with another
> box, this second box has a freshly installed system with it's own /etc
> and I want to synchronize this /etc with the repository WITHOUT
> overwriting the files (don't want to do "rm -Rf /etc; svn co
> file:///repos/etc /etc" !!!!), I just want the new /etc to be under svn
> control (a working copy) and then doing a merge by hand.

> Is there a clean solution to do that? Is someone else managing is system
> configuration with svn?
>

I don't know how well merging will work, but this how I put my etc to
under subversion.

1: svnadmin create <repopath>
2: svn mkdir file://<repopath>/data
3: svn mkdir file://<repopath>/data/trunk
4: svn mkdir file://<repopath>/data/tags

5: cp -a datadir datadir-import-me
6: cd datadir-import-me

7: rm <all files that will not be under version control>

8: svn import file://<repopath>/data/trunk .

9: cd ..

10: svn checkout file://<repopath>/data/trunk data-svn

11: cd data-svn
12: find -name .svn -exec cp -a {} ../datadir/{} \;

13: cd ../datadir

14: svn st
15+n: #set a pleasant value for svn:ignore

This concept worked extremely well when I made my initial import for etc.
So, I think that you would be intrested about #12. My wild guess is that
you could checkout your current copy of etc to etc-svn, and after that
copy .svn directories to etc and to do merge by this way. But do this at
your own risk, this is only a guess. Please tell afterward what
happened. =)

In my setup, there is also a file where is pretty printed my etc's
symlinks layout, and that file is also under version control.

BR, Jani

-- 
Jani Averbach
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Mar 29 16:03:29 2003

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

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