<div dir="ltr">I basically don't have much to add to what Manuel said. Just additional thoughts why merge-tools won't be a generic solution:<div style>1. You can't apply overlapping edits. With mergetools the lines can't overlap. If you know the refactoring more precisely, you can get away with the byte-ranges not overlapping. I don't consider this a must-have, but it is definitely a disadvantage of merge-tools. However, the important fact stands: You cannot apply overlapping edits either way.</div>
<div style>2. A single refactoring step (e.g. turning a normal for-loop into a range-based for loop) touches code at multiple places.</div><div style>3. The conclusion of #1 and #2 together is that you need to guarantee that a refactoring step is done atomically (either completely or not at all) and I don't see a way to do that with merge tools.</div>
<div style><br></div><div style>Cheers,</div><div style>Daniel</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Jul 6, 2013 at 9:13 AM, Manuel Klimek <span dir="ltr"><<a href="mailto:klimek@google.com" target="_blank">klimek@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">+djasper, who has been doing some work in that area<div><br></div><div>we definitely do not use any merge tools; they're imo mainly useful if you have unknown other changes, but in our case everything is known. Simply applying everything on a single Rewriter should do exactly what you want - the main problem is:</div>
<div>- find a good on-disk representation</div><div>- have a small program to slurp it in and apply the changes, if possible with multi-threading</div><div><br></div><div>The reason we haven't contributed any of that upstream yet is:</div>
<div>- need to learn how to do multi-threading with LLVM libs</div><div>- need a good way to store the intermediate representation (probably should be YAML)</div><div><br></div><div>Cheers,</div><div>
/Manuel</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jul 5, 2013 at 10:40 PM, Sean Silva <span dir="ltr"><<a href="mailto:silvas@purdue.edu" target="_blank">silvas@purdue.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Manuel, didn't you guys at google deal with this issue with protobuf + mapreduce? Do you guys have a simple way of merging the changes?<span><font color="#888888"><div>
<br></div><div>-- Sean Silva</div></font></span></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>