开发者

Any tools to analyze divergent code, get it into sourcecontrol (Subversion)

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 yo开发者_JAVA百科u 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?


It sounds like you want to import material into your repository in such a way as to “simulate” what the history would have looked like if it had been under version control the whole time (e.g., commit version 1 of a file, then version 2, etc.).

I don’t think this exercise would be worth your time; instead, since your priority should be getting everything under version control as soon as possible, I think you should just throw all the old code into one “Archive” folder and import that, along with the current code. That way, at least you’ll have it all in the repository and can start working from there.

Don’t waste your time creating fake revisions — it’s not going to gain you anything in the long run.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜