TFS 2010 how to limit number of changesets

362 views Asked by At

Is it possible to limit the number of changesets keeping only the last Nth versions ? To avoid infinite growth of the database it could be useful to set "keep only the last X version and discard the older" (I have some projects that the changesets of 2 years ago are completely useless!)

2

There are 2 answers

0
James Reed On

I wouldn't recommend that approach, you never know when having the old version of a file is going to be useful. Code lives for a lot longer than you think and I look after numerous systems where code from over a decade ago is still maintained.

TFS is pretty efficient at storing code (a mixture of deltas and compression) for more information read Bill Heys's blog on the subject.

0
pantelif On

You can use tf destroy with /stopat:X, where X represends the changeset ID it 'll stop deleting.
The ref to TF Destroy is here.

Ensure you know what you 're doing, preferably with tests: tf destroy is a one-way ticket, any action can't be undone.