For the past several months, I've been working on a massive upgrade project on an 11-year old application that consists of well over 3,500 individual files. At one point in time, the files were copied (they were being managed by SVN, then ...), and conversion work began, in parallel to continuing work in support of the customer.
Within the conversion repository (which is entirely unrelated to the "other" git repository which supplanted SVN), about 314 commits have been done, and some of these are gigantic. (Conversion of <?
to <?php
, replacement of mysql_
calls with calls to an interface library, and so on.)
Now, the task at hand is to bring the about-120 files that have changed in the "other" repo (which eventually is to be abandoned ...) into this one. My approach so far has been to create a branch, copy the files into that new branch, and to re-apply "basic" changes such as the foregoing, using automatic code-analysis tools which I have developed for that purpose.
And here is where I am uncertain what to do next. I want to re-make the changes that I made to those files, as reflected in the 300-odd commits now on the main branch of my conversion repo, and to do so as automatically as possible. I have a file which contains a list of all the files in question. My thought is to cherry-pick
some of the older commits out of the main branch, and to apply these to the files in the new branch (which might never be merged into the master). To my way of thinking, only those commits which touch any of those files need to be reapplied. (But, some of those commits touched thousands of files, including but not limited to the ones in play here.)
At this point, I'm standing on the cusp of a decision, having not yet done anything, and not quite certain how best to proceed.
Remember: there are two separate git
repos, but they are entirely unrelated to another. (The one used for production maintenance didn't even exist at that time.) So, I can use it ... and, did use it ... only to obtain a list of the files that have been touched, and to obtain their most-recent version. When the conversion project is finished, the conversion-repo will be discarded, and the present production-repo will be frozen. An entirely new repo will be created with which to move forward.
Advice earnestly sought . . .
EDIT: I have since considered a completely different approach, which would abandon the course that I started-on, throw away that branch entirely, and pursue a different strategy of going through the old repo, grabbing selected commits as patches, and trying to apply those patches to the existing (albeit, possibly very-changed) modules. Or, if need be, doing the same thing by hand. Only about 100, give-or-take, commits to do... Comments are cordially (and, earnestly) requested about either strategy.