sageserpent-open / kineticMerge

Merge a heavily refactored codebase and stay sane.
MIT License
9 stars 1 forks source link

Support other Version Control Systems. #45

Open sageserpent-open opened 4 weeks ago

sageserpent-open commented 4 weeks ago

Kinetic Merge was intended to be an adjunct to Git, but the codebase as of version 1.2.1 (Git SHA: 58e598d7ef165e9686f735c8e249201a0aeb9d95) has completely abstracted away the interactions with Git in the core logic.

It's all done with Sources as the raw material, and the end product is a map containing MergeResult, paired up with a MoveDestinationsReport. The code in Main talks to Git to build up the instances of Sources, and it unpicks the MergeResults to get the final content to build the Git index.

NOTE: this is abstraction by translating content into a separate model, not by layering the model directly over Git and the OS filesystem.

Anyway, it seems like it should be possible to generalise what's in Main to support other version control systems that support pan-codebase commits - Mercurial comes to mind, as does Plastic SCM (and Bazaar, if anyone still uses it).

I imagine the outcome would be to have several alternative Main implementations, taking more or less the same command line options, and all using the same code from the com.sageserpent.kineticmerge.core package to do the merge proper.

sageserpent-open commented 4 weeks ago

I'm personally not that fussed about this - I use Git 100% of the time these days, but if anyone out there wants a crack at it, it would be a nice focussed job to spin out an alternate command line tool for their own favourite version control system.