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

Re: newbie question: import and co to the same directory?

From: Jack Repenning <jrepenning_at_collab.net>
Date: 2003-07-17 22:33:08 CEST

At 3:13 PM -0500 7/17/03, Jens B. Jorgensen wrote:
>svn co file://<somepath>/etc-svn /foo
>mv /foo /etc
>
>before you do this though you'd better thing about file owner/group
>and permissions. Since I'm just a user (and a primarily Windoze one
>at that) I've no idea if svn co restores owner/group and permissions
>and this would be also very important naturally.

No it does not. You would need a fairly smart script, to set all
those up just right.

I routinely do a simpler case, maintaining my home directory in SVN.
As with /etc, there are lots of files there I don't want to put in to
the repo, and all the files are expected to be "in the way" normally.
But it's OK if all the files belong to me (as will be true for the
SVN co); for /etc, you'd need other means to manage this.

FWIW, I use this script to migrate my home stuff to a new computer:

cd "$HOME"

rm -fr home

svn co $SVNHOME home

(cd home; find . -print | cpio -pdlmu ..) && rm -fr home

[The args to cpio are platform-dependent, a bit, but the main point
is the "l", which (usually) means "use hard links instead of copying
the file, if possible." Since this "home" directory is created as a
subdirectory of $HOME, where the files end up, linking is always
possible. Saves an extra copy operation.]

Once that's been done once, I can "svn add" new files, "svn commit"
new and modified files, and "svn up" to refresh.

-- 
-==-
Jack Repenning
CollabNet, Inc.
8000 Marina Boulevard, Suite 600
Brisbane, California 94005
o: 650.228.2562
c: 408.835-8090
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Aug 27 15:55:13 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.