Is there a way to perform a SVN checkout (or export), which would fetch only the directory structure; that is to say, no files?
相关问题
- How can I set the SVN password with Emacs 23.1 bui
- If statements in .htaccess files, to enable passwo
- SVN+SSH checkout over VPN using tortoise SVN, Smar
- Mercurial compared to private branches in SVN
- Using Subversion and SourceSafe at the same time?
相关文章
- Is there a version control system abstraction for
- Intermittent “SVNException: svn: E175002: Connecti
- IntelliJ Subversion Authentication Required Dialog
- TortoiseHG and hgsubversion (Windows): “no module
- Incompatible JavaHl library loaded
- TFS vs. JIRA/Bamboo/SVN [closed]
- converting svn repo to git using reposurgeon
- SVN查看日志超时
There's no way to do this, and in fact it's a slightly odd thing to want to do, so now I'm curious!
This may not be relevant, but you can prevent the files being comitted in the first place by adding an svn:ignore property on the relevant directories. This is particularly useful to prevent generated artifacts such as documentation or cache files being comitted.
Just wanted to add, if you need to do this server-side (i.e. not checking out the repository first), the equivalent to
svn ls
issvnlook tree --full-paths
. I had to create a copy of a 50GB repo's folder structure and used the hints I found here to do it without having to create a working copy of the whole thing.My code was:
svnlook tree /path/to/repo --full-paths | grep "/$" | grep -v "^/$" | xargs -I {} mkdir -p "{}"
The
grep -v "^/$"
because the output contained a single / (i.e. file system root folder) and I didn't want to mess around with that.This works perfectly
And then if you want to get few of those directories fully checked out, go inside them and use
A use for checking out just the directory structure is a partial workaround for not being able to exclude one or more directories from being checked out. It is assumed that the cost of just checking out the directory tree is negligible in comparison to checking out the full source. With a versioned directory structure checked out I could then use Subversion's update and sparse directories to selectively pick what directory trees should have files.
My DotNet (LINQ) way to do this:
First, run the svn list command. And push the output to an .xml file.
And then run some LINQ code against the .xml file.
I can't see that there is a way to do it from a brief look at
svn help co
. Something I've done before for updating a repository from a new version of a downloaded library (i.e. a vendor branch) is to delete everything which isn't an .svn folder:It's not particularly efficient if you were trying to avoid having to check those files out in the first place, but it should have the same result.