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

Re: Update/Switch without creating files

From: David Ripton <dripton_at_ripton.net>
Date: 2005-02-28 19:34:39 CET

On 2005.02.28 10:51:57 +0000, Andrew Bell wrote:
> In CVS, the default of "update" didn't create files in the local
> workspace if they weren't already there. You had to ask specifically
> for files that weren't in your workspace.

I believe this is incorrect. "cvs update" creates new plain files by
default. (It doesn't create new directories, unless you use -d.)

> Is there a way to get the
> same behaviour with update or switch in svn?

If you want to ignore subdirectories, you can use -N. But -N doesn't do
the right things to the metadata inside .svn/, so it breaks your working
copy, so I strongly recommend against using it unless you know exactly
what you're doing.

I think the trick you want is to "svn update" each versioned plain file
in your working copy, but not their directories. Maybe run "svn status
-v", extract the last column, then remove the entries that are
directories, then build either one big "svn update" command (if you have
a sufficiently beefy OS and shell or a small enough tree) or chunk the
files into multiple "svn update" commands to work around their limits.
Maybe 20 lines of Perl?

Of course, this is a hack, and not really the way svn is designed to be
used. Why do you need to ignore new files? Maybe there's a better way
to accomplish your goal.

David Ripton    dripton@ripton.net
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Feb 28 19:37:03 2005

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.