troy
troy

Reputation: 1

svn checkout most recent date and prune empty directories

In CVS i can be specific with the type of checkout i need to acquire... For expample:

cvs -q checkout -d CMS -P CMS

Which means, checkout somewhat quite and create a directory called CMS and Prune empty directories and place it in CMS folder.

I need to create the same directory structure using SVN checkout... Here is what i have so far.

svn checkout http://svn/project/CMS/trunk CMS -q 

There are some empty folders that i have in my repository that i need to keep but not checkout during a checkout. I know SVN uses --depth and --empty but i don't think that will take care of my request.

Basically i need to checkout my repository but exclude empty folders during checkout... Any one know what the command would be for that? To bad i couldn't use the -P like i can in CVS.

Thanks for you help.

Upvotes: 0

Views: 671

Answers (1)

David W.
David W.

Reputation: 107090

I think you misunderstand how CVS works with empty folders.

In CVS, only files are versioned and not directories (we'll use that term instead of folders). When you do a checkout in CVS, CVS will create directories as needed. However, since directories weren't versioned, directories that contained no files are never created. It's why you'll see files like .keep in otherwise empty directories. It's the only way you could get CVS to create a required empty directory.

Things are different if you do a cvs update. In that case, a directory might become empty. Passing a -P to the cvs update command would remove those folders.

Unlike CVS, Subversion versions directories as well as files. If you create an empty directory in Subversion, it will be checked out as an empty directory. If there's a directory you no longer want, you should remove it like you would remove a file that's no longer needed via the svn delete command.

Therefore, there's no equivalent to the CVS -P command line parameter.

Upvotes: 1

Related Questions