How to find the best matching revision in a version control system?

I downloaded one file from the subversion repository (subversion) a long time ago. Therefore, this is not an extract from this repository. I changed this file, but I do not remember the version when I downloaded this file.

The project has evolved, and now I want to merge them into files (in two years). This file is a huge script.

So my main attempt is to find the best matching version from the repository, to see what I changed, and then finally merge the two files. To do this, I would check every revision, from which I think it could be this revision so far, to make diff and count lines. I think the smallest diff will give me the best matching version.

Any other idea?

+6
source share
1 answer

This is an interesting question, but in the end you should merge with the latest version of the file (if it currently exists, if not, you have another problem). Therefore, I do not think that the best matching version gives you a better starting point than the current version.

So, try to make the difference with the current version, and if you do not understand how it evolved, read (with a good tool, best graphically) how the file has changed to understand where the lines of code come from.

+3
source

Source: https://habr.com/ru/post/903356/


All Articles