When a new project begins, source codes are checked into mainline first.
Then the mainline is branched when/before the product is released to allow parallel development, etc.
Let's say I branched into v1.0.
And let's say the upcoming new features are so vastly different than v1.0 that a lot of 'new' files are to be checked into mainline, as well as a lot of pre-existing files are no longer relevant.
What is the correct way to handle the mainline regarding these non-relevant files ?
1) Remove (delete) them from mainline. Of course it leaves the deletion history so that we can go back to them, but as far as the HEAD revision goes, they will no longer be visible. With each releases (v2.0, v3.0), the mainline is kept clean. But there are a lot of deletions going on in mainline with each release. And we won't be able to mix old (deleted) files with latest files when a need arises in the future in order to produce a certain feature.
2) Just leave the non-relevant files. When it's time to branch again (v2.0), select only those relevant files to branch, so that this branch will not be polluted with irrelevant files. Let's say the next set of features are (again) so vastly different that a lot of files become irrelevant, then the irrelevant files will keep growing through each releases (v2.0, v3.0), but at least with each release we take care to branch right set of files and we are not deleting files from mainline. So, latest files can work with old files to produce a new feature as needed.
This situation (vastly different features) may sound unrealistic, but imagine that a product starts with client/server, and then later decides to replace a thick client with HTML. Another example is replacing flat file database with relational database. With 1), we can't mix deleted files with latest development code. In other words, if I am developing a new feature and it needs a thick client (which is now deleted), the mainline can only check out old revision or new, not both at the same time. With 2), a lot of files in mainline will become irrelevant over time, while allowing reuse of old-revision files when needed.
What would you choose - 1), 2)? Any other ideas?