Re: can I checkout only a revision files ?
On Wed, Oct 20, 2010 at 09:17, Andrea Antonio Maleci wrote: > Is it possible to checkout only files (not patch, but entire files) from a > specific revision ? Yes, use the --revision option for svn co.
RE: can I checkout only a revision files ?
It retrieves entire repository at specified revision, not only the modified one... -Original Message- From: Andy Levy [mailto:andy.l...@gmail.com] Sent: mercoledì 20 ottobre 2010 15.25 To: Andrea Antonio Maleci Cc: users@subversion.apache.org Subject: Re: can I checkout only a revision files ? On Wed, Oct 20, 2010 at 09:17, Andrea Antonio Maleci wrote: > Is it possible to checkout only files (not patch, but entire files) from a > specific revision ? Yes, use the --revision option for svn co.
Re: can I checkout only a revision files ?
On Wed, Oct 20, 2010 at 09:33, Andrea Antonio Maleci wrote: > It retrieves entire repository at specified revision, not only the modified > one... You cannot check out an individual file. You can update specific files to a particular revision with svn update --revision FILE You can export an individiual file at a particular revision with the same syntax as update (just swap in "export" instead). The output of svn help can be very informative. > -Original Message- > From: Andy Levy [mailto:andy.l...@gmail.com] > Sent: mercoledì 20 ottobre 2010 15.25 > To: Andrea Antonio Maleci > Cc: users@subversion.apache.org > Subject: Re: can I checkout only a revision files ? > > On Wed, Oct 20, 2010 at 09:17, Andrea Antonio Maleci > wrote: >> Is it possible to checkout only files (not patch, but entire files) from a >> specific revision ? > > Yes, use the --revision option for svn co. >
RE: can I checkout only a revision files ?
[Please do not top-post on this list, add / insert your response in line] > -Original Message- > From: Andy Levy [mailto:andy.l...@gmail.com] > Sent: mercoledì 20 ottobre 2010 15.25 > To: Andrea Antonio Maleci > Cc: users@subversion.apache.org > Subject: Re: can I checkout only a revision files ? > > On Wed, Oct 20, 2010 at 09:17, Andrea Antonio Maleci > wrote: > > Is it possible to checkout only files (not patch, but > > entire files) from a specific revision ? > > Yes, use the --revision option for svn co. > > -Original Message- > From: Andrea Antonio Maleci [mailto:a.mal...@iwbank.it] > Sent: 20 October 2010 14:34 > To: 'Andy Levy' > Cc: users@subversion.apache.org > Subject: RE: can I checkout only a revision files ? > > It retrieves entire repository at specified revision, not > only the modified one... > That is the way subversion works. A revision number identifies a state of the complete repository and includes all files / folders / metadata etc. So, are you asking for only the files changed from the previous revision? If so, why would you want that? Subversion only sends diffs between client and server, so that is already efficient. If you want a list of the changes you can use the 'log' command. Remember that metadata can also change in a revision, not just files/folders. I am not aware that you can ask subversion to give you a working copy only containing the files updated by a particular rev but I fail to see how that would be useful... If that does not help, try rephrasing your question and/or providing more background. Cheers, ~ Mark C
Re: can I checkout only a revision files ?
On Wed, Oct 20, 2010 at 9:17 AM, Andrea Antonio Maleci wrote: > Is it possible to checkout only files (not patch, but entire files) from a > specific revision ? You can use the -r parameter on a checkout or update to specify the revision. You cannot checkout a single file, but you can checkout the directory it is in with no files and then update just that one file: $ # Checks out the directory, but with no files $ svn co -r $rev --depth empty http://svn/repos/project/dir localdir $ # Now update the file you want $ cd localdir $ svn update myfile Or, you can checkout just a directory, but without the subdirectories: $svn co -r $rev --depth files http://svn/repos/project/dir localdir -- David Weintraub qazw...@gmail.com
RE: can I checkout only a revision files ?
[Please do not top-post on this list, add / insert your response in line] > -Original Message- > From: Cooke, Mark [mailto:mark.co...@siemens.com] > Sent: mercoledì 20 ottobre 2010 15.43 > To: Andrea Antonio Maleci; Andy Levy > Cc: users@subversion.apache.org > Subject: RE: can I checkout only a revision files ? > > [Please do not top-post on this list, add / insert your response in > line] > > > -Original Message- > > From: Andy Levy [mailto:andy.l...@gmail.com] > > Sent: mercoledì 20 ottobre 2010 15.25 > > To: Andrea Antonio Maleci > > Cc: users@subversion.apache.org > > Subject: Re: can I checkout only a revision files ? > > > > On Wed, Oct 20, 2010 at 09:17, Andrea Antonio Maleci > > wrote: > > > Is it possible to checkout only files (not patch, but > > > entire files) from a specific revision ? > > > > Yes, use the --revision option for svn co. > > > > -Original Message- > > From: Andrea Antonio Maleci [mailto:a.mal...@iwbank.it] > > Sent: 20 October 2010 14:34 > > To: 'Andy Levy' > > Cc: users@subversion.apache.org > > Subject: RE: can I checkout only a revision files ? > > > > It retrieves entire repository at specified revision, not > > only the modified one... > > > That is the way subversion works. A revision number identifies a state > of the complete repository and includes all files / folders / metadata > etc. > > So, are you asking for only the files changed from the previous > revision? Yes, I need only last changes, but entire files, not only diffs. > > If so, why would you want that? Subversion only sends diffs between > client and server, so that is already efficient. It seems, from your answer, that I need to write a script, getting output from svn log e requiring to svn last revision of changed files. > > If you want a list of the changes you can use the 'log' command. > Remember that metadata can also change in a revision, not just > files/folders. > > I am not aware that you can ask subversion to give you a working copy > only containing the files updated by a particular rev but I fail to see > how that would be useful... If you version and commit your classes, you need to get only changed one to patch you application server. That's why I need last committed files. > > If that does not help, try rephrasing your question and/or providing > more background. > > Cheers, > > ~ Mark C Thanks, Andrea
Re: can I checkout only a revision files ?
> On Wed, Oct 20, 2010 at 09:17, Andrea Antonio Maleci > wrote: > Is it possible to checkout only files (not patch, but entire files) > from a specific revision ? > > From: Andy Levy [mailto:andy.l...@gmail.com] > Yes, use the --revision option for svn co. > > "Andrea Antonio Maleci" wrote: > > It retrieves entire repository at specified revision, not only the > modified one... Right, As others have said, you cannot 'svn co' files, you can only checkout directories. The ability to export files exists, but to export only modified files is not built in, either. I've been trying to learn Bash scripting better and wrote the following. If you're on Windows, install Cygwin. It may not be exactly what you want, because it exports the files instead of checking them out. You have to do something like... svn log --verbose -r 2345 | grep M > files.txt ...then something like... (vi svncomod.sh) #!/bin/bash FILE=$1 REPO=$2 while read line do for ARG in $line; do F=${ARG} if [ "$F" != M ] then echo ${REPO}${F} svn export ${REPO}${F} fi done done < ${FILE} ... then... chmod +x svncomod.sh ...and finally... svncomod.sh files.txt http://path-to/repo
RE: can I checkout only a revision files ?
> [Please do not top-post on this list, add / insert your response in > line] > > > -Original Message- > > From: Cooke, Mark [mailto:mark.co...@siemens.com] > > Sent: mercoledì 20 ottobre 2010 15.43 > > To: Andrea Antonio Maleci; Andy Levy > > Cc: users@subversion.apache.org > > Subject: RE: can I checkout only a revision files ? > > > > [Please do not top-post on this list, add / insert your response > in > > line] > > > > > -Original Message- > > > From: Andy Levy [mailto:andy.l...@gmail.com] > > > Sent: mercoledì 20 ottobre 2010 15.25 > > > To: Andrea Antonio Maleci > > > Cc: users@subversion.apache.org > > > Subject: Re: can I checkout only a revision files ? > > > > > > On Wed, Oct 20, 2010 at 09:17, Andrea Antonio Maleci > > > wrote: > > > > Is it possible to checkout only files (not patch, but > > > > entire files) from a specific revision ? > > > > > > Yes, use the --revision option for svn co. > > > > > > -----Original Message- > > > From: Andrea Antonio Maleci [mailto:a.mal...@iwbank.it] > > > Sent: 20 October 2010 14:34 > > > To: 'Andy Levy' > > > Cc: users@subversion.apache.org > > > Subject: RE: can I checkout only a revision files ? > > > > > > It retrieves entire repository at specified revision, not > > > only the modified one... > > > > > That is the way subversion works. A revision number identifies a > state > > of the complete repository and includes all files / folders / > metadata > > etc. > > > > So, are you asking for only the files changed from the previous > > revision? > > Yes, I need only last changes, but entire files, not only diffs. > > > > > If so, why would you want that? Subversion only sends diffs > between > > client and server, so that is already efficient. > > It seems, from your answer, that I need to write a script, getting > output from svn log e requiring to svn last revision of changed > files. > > > > > If you want a list of the changes you can use the 'log' command. > > Remember that metadata can also change in a revision, not just > > files/folders. > > > > I am not aware that you can ask subversion to give you a working > copy > > only containing the files updated by a particular rev but I fail > to see > > how that would be useful... > > If you version and commit your classes, you need to get only > changed one to patch you application server. > That's why I need last committed files. > > > > > If that does not help, try rephrasing your question and/or > providing > > more background. My NAnt build scripts have a task that will create a "delta" of the changed deployables to create a hotfix for example. Just pulling out the changed stuff from svn wouldn't work anyway... since new binaries need to be built most of the time. BOb