简体   繁体   中英

How do I revert to the most revision in SVN for all files in a folder?

Let's say a month ago I checked in 100 files to SVN which were at revision 100. Today I checked in all the 100 files to SVN, say at revision 200. However in between then about 50 files were individually updated and checked in to various revision no.s. I want to revert from the current revision (200) to the most recent revision for each file which will vary between revision 100 and 199 depending on the file. Is this possible? I know how to revert all to revision 100, but not to the most recent.

Just check out to revision 199.

The revision number is not for single files but for the complete repository. So checking out to 199 will update all files to their most current version before revision 200.

The version of a file that you get when you check out revision N is the last version of that file which was checked in up to that revision. So, for example, if file A was submitted as part of revisions 5 and 10, when you check out revision 8 of the framework you get the version of file A submitted with revision 5.

So in your case, just update to revision 199; ie svn up -r 199

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM