Is it possible to checkout only those files from a SVN repository that were modified in a revision or range of revisions, without checking out any files that were not modified?
相关问题
- 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
- SVN+SSH checkout over VPN using tortoise SVN, Smar
- Mercurial compared to private branches in SVN
相关文章
- 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查看日志超时
My suggestion is in the same lines as flolo suggests. But, takes a range. You could the following shell function.
Another take at answering your question:
Assuming you have an existing workingcopy you should just use 'svn update' on the root of the directory containing the files you are looking at as that retrieves exactly what changed between your current revision and the HEAD revision with the least data possible.
Older sourcecode management systems like CVS and VSS asked the server for every file has this file changed?, while subversion just sends the changes of a tree as a single action. When you pass a list of files to svn update you don't have this advantage.
Therefore the most efficient way to transfer what has changed is just updating. This only transfers a binary diff of the changes in HEAD compared to the base version of your working copy.
If the problem you are trying to solve is that svn update is to slow, then we are trying to solve that for Subversion 1.7.
This version will introduce a new working copy data storage format that will make simple operations that have to lock an entire working copy (like updating) much faster.
In almost the same lines as most of the folks have suggested, (however only in a system with grep and awk), you can get the list by executing
svn log -v --revision <revision_number> | grep "^ " | awk '{print $2}'
.svn diff -r starting_revision:ending_revision_or_HEAD --summarize
There is afaik now direct way to get just the changed files and not all.
My idea would be: use the verbose output of the list (which shows the last changed version), filter it through awk, and checkout the rest. E.g. to search the files which changed in version 42 I would use this
And later do a
svn update -r $VERSION 'cat files_to_checkout'
(or a co on the url, depending on where you will run the command).EDIT: Additional even shorter: use the svn diff command, and replace with -x and --diff-cmd the diff command with svn co. This requires some argument shifting hacking (which I wont elaborate here), but needs just one line and no intermedate file (which you could save above too, but that would have cost readability)
I'm not completly sure if this is possible but you can also do something like this:
to get a certain revision and
to list all files chaned in a revision