views:

54

answers:

2

Say you take over some code that exists in different versions, no sourcecontrol (possibly some backups). Are there some tools that let you analyze relationships (more than diffs), or let you reconstruct history in sourcecontrol?

If you load it into Subversion, can you do better that to designate the best version as base-version, and the others as branches?

Would you have to get it right from the beginning? Like loading backups before latest versions?

What if you discover later that one file in one branch is a renamed version of a file in another branch?

The purpose is of course to merge code the codebase over time, or use functionality from different branches when appropriate, While not having to spend a lot of time upfront before I can start working.

(Added 13NOV) Are there any version control systems that are better than Subversion for this? I.e. finding relationships, creating them after the files are in the system and general merging support?

A: 

You could try out a DVCS like Bazaar or Mercurial or Git.

Initialize a repo in each version of your code, add all code to the first commit, then merge the different versions together into one branch. In DVCS every branch can be merged with any other branch.

The result can be importet into subversion, if you would like to keep the differences in history, otherwise you can just delete the DVCS information and check the merged result into your SVN.

BeowulfOF
Where is the benefit over Subversion? I don't have any particular reason to use distributed sourcecontrol.In VSS, which I know best, I think it would be difficult to merge something that hasn't been branched before. Though the main issue for me is getting the information into source-control.
Olav
Exactly because in dvcs you can merge trees, that were not branched before. This flexibility makes it possible to suit the needs here. He does not need to change entirely, but for this task he could additionally use a dvcs, remove the dvcs-metadata afterwards. Job-done, source in SVN, ready.
BeowulfOF
But this does not have anything to do with the dvcs concept, does it?Also I sould like not to have to do this work upfront.
Olav
Sure it does, since it is the dvcs concept, that allows you to merge everything with everything - therefore it allows you to handle to seperate directorys as different branches, that can be merged. You do not need to change from svn do dvcs, but use dvcs as a tool to help you get your task done.
BeowulfOF
+1  A: 
Michael Hackner
The important thing is relationships - branching/merging history.(Not file/revision history).And yes, i would like not to do a lot of manual work up front
Olav