tags:

views:

50

answers:

5

For example, I only want 3 records of a certain branch or item.

Thank you very much!

Update: Thanks for you guys' answer. Maybe it is not a good question. I have one framework repo and several projects referencing the framework. I usually keep working on one project and sometimes I need to update the framework. However, I don't want to affect any other projects because of my updates of framework, although I may not have time to update each project agains the framework changes. So the solution I considered was to chech in the framework .dlls in each projects so that every projects can cache a version of dlls and they won't break. However, I don't want my svn to keep a lot of dll checkins, so I come up with the above question..... I just thought I should probably keep a copy of framework source code in each project instead of dlls. Once I decided to use updated framework, I can do a merge to each project's copy of framework. That sounds better.

A: 

What do you mean by "kept"? Revisions in the repo, or the number of log records displayed? Or if you use TortoiseSVN, the number of log records cached client-side?

RedFilter
A: 

SVN doesn't have any inbuilt way to do this, however if you really want to (not sure why you would) you can run the following periodically (in this example I assume your HEAD is at revision 200, thus 3 before is 197):

svnadmin dump /path/to/repo -r196:200 > svn.dump
rm -rf /path/to/repo
svnadmin create /path/to/repo
svnadmin load /path/to/repo < svn.dump

This will do the entire repository, you can't do it on individual items.

Michael Shimmins
+1  A: 

Unfortunately not. SVN is designed to be a fortress of information. You cannot limit it to x amount of revisions.

This is also the reason why you cannot entirely, or with ease delete anything from SVN completely. They are looking to bring out the obliterate command to deal with not having to dump your repository to delete something (as in delete completely from the repo), but it has been in the works for quite some time. Have a look here for more information.

Kyle Rozendo
+1  A: 

Based on your update you should take a look for svn:externals to make a reference to the framework area from every project it will use the framework (dll or may be source code). On the other hand you can store binaries and SVN will use deltas as well. So it should't be a problem of space.

khmarbaise
svn:externals fit my situation very well. I can use it to either let my projects always get latest or keep getting some certain revision. Also I still have the option to make a branch of a framework in some of my projects. Cool!
A: 

You can use svndumpfilter to remove specific items from a repository dump.

webdestroya