Evan Martin (evan) wrote in evan_tech,
Evan Martin

smarter merges

I often use meld to handle file merges, but I'm not too happy with it. Aside from the obvious bug of it seeming to get confused at the end of files (I've gotta believe this is some local misconfiguration, because it breaks all the time for me), there's also many cases where it could have provided a more informative diff had it only had "tried harder". I write "harder" in scare quotes because it's fuzzy concept in my head, but you could imagine that (especially since I am willing to give it a second to grind away on the file if necessary) you could examine blocks where lines differ and, for example, infer variable renames. Or it could detect when code has both moved and changed slightly and indicate as something more than a delete and an add.

Here's an odd parallel: Patch files effectively leave you with the state of the file before and the state of the file afterwards. This is just what git does at the tree level, and though it's often rightfully blamed for its weak handling of renames, guessing at renames is certainly better than not trying to handle them at all. Yet in the world of patches, we don't expect anyone to annotate their patches with which variables have been renamed (what you typically do with files in most VCSes) while simultaneously accepting that tools can't handle them at all.

This makes me think I'm just ignorant of what cleverer people use. Am I just using the wrong tool? What should I be using instead?

  • your vcs sucks

    I've been hacking on some Haskell stuff lately that's all managed in darcs and it's reminded me of an observation I made over two years ago now (see…

  • perl people, explain your language to me

    Every time I use perl I feel mildly positive about it right up until I encounter CPAN. I've never managed to make CPAN work, despite the multitude of…

  • dns attack of doom

    If I've learned anything from the new Kaminsky DNS attack, it's that if you want to keep something a secret while disclosing to a trusted subset of…

  • Post a new comment


    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.