How to Merge 2 Subversion Repositories to the same paths
A few years ago we moved off of PVCS Version Manager and started using Subversion. At that time we did not import the revision history from Version Manager into Subversion. Now years later we were able开发者_StackOverflow中文版 to import the Version Manager revisions into a Subversion repository. I cannot simply dump one repository and load it into the other repository as the paths are the same.
Is it possible to merge these two repositories together such that we could have a continuous history of our code?
Any help would be greatly appreciated.
Thanks in advance.
Dean
Dump the PVCS Version Manager into a new repository, up to the date you pulled the original subversion dump.
Then checkout each revision in subversion (one at a time) that conceptually was "after" the initial migration. Check-in each revision, one-by-one, in the same order as was saved by subversion.
Subversion works by differencing file systems, while I imagine it could be theoretically possible to merge in a history, I can't imagine a "fast", "easy", or "quick" way of doing so (taking into account it's revision numbering scheme) without doing a lot of "experimental" work. In the end, a quick simulation (doing everything manually) is a far more likely to work scenario than any "patch the repo" solution.
Now to do this effectively, I would script it. I would also take a close look at capturing check-in dates and times from the original subversion repository and seeing if they can be overridden in the new "complete history" repository.
Understand that you have no chance to preserve revision numbers, and changing the revision numbers of your existing repository might just be worse than keeping the history. How many "other" documents will now refer to the wrong revision number? Might want to tag the new checkings with a property describing the old rev number, but even that might not be enough to prevent confusion.
精彩评论