Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

james (1129)

james
  (email not shown publicly)
http://whoot.org/

...

Journal of james (1129)

Thursday July 31, 2003
08:24 AM

The results of thinking about merging

[ #13806 ]

Right, so last time I said I was thinking about merging. So here are my thoughts.

If you detect a conflict (ie, the last local revision is older than the the last commited revision) you need to figure out if you can patch it.

To do this step, you find the greatest shared revision of both files and get a diff against them. Then you compare the hunks of the two diffs. If you have hunks that overlap then you have a conflict, and you need to throw that hunk away, or at least think about it very carefully before you attempt to apply it. Hunks that don't overlap are applied to the local copy.

If you don't have any overlapping hunks then the merge is flawless and easy -- its just a patch. I've not figured out how to do more granular merging but at least I can detect it and deal with it at some level, and this is a step in the right direction.

Now of course I need to implement it...

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.