metomi / fcm

:hammer: FCM: a modern Fortran build system + wrappers to Subversion for scientific software development
http://metomi.github.io/fcm/doc/
GNU General Public License v3.0
40 stars 17 forks source link

Support more diff/merge tools #29

Open matthewrmshin opened 11 years ago

matthewrmshin commented 11 years ago

FCM uses xxdiff for interactive diff and merge. Perhaps we should move to something like vimdiff, meld or diffuse?

mkjpryor commented 10 years ago

I have investigated the potential of meld and diffuse, since they look like nice tools (I particularly liked the look of meld). However, they both have the same problems that prevent them being used (easily at least) with the way FCM currently works:

r-sharp commented 10 years ago

It's not clear what mkjpryor means for no merge target in meld.

meld has the "-o" option for the merge target, which it assignes as the filename of the middle pane. However it populates the middle pane with the 2nd filename specified (and also has issues if the merge target filename doesn't already exist). Thus meld -a -o $base $mine $older $yours will start by displaying the older common ancestor, but then requires all the changes to be merged into it manually before saving to $base. My experience would suggest this could be very tiresome in some cases. There is an --auto-merge option, but in my brief tests this can go very wrong and it means you never actually see the ancestor version. This in turn makes figuring out some of the changes difficult, particularly after a 'bad' merge.

mkjpryor commented 10 years ago

I missed the -o option in meld - my bad. As Roddy says though, the issue still remains that the automatic merges done by meld are a problem. As I said in my previous comment, the way git solves this is by doing meld -a -o $base $mine $base $yours. This means that diff3 will do what it can for automatic merges into $base during an fcm merge, then meld is used to resolve the conflicted bits. It does mean exposing users to the diff3 conflict syntax, since $base is displayed in the middle pane, plus you do loose some context of the common ancestor (although in my experience this is the least useful file).

mkjpryor commented 10 years ago

P.S. I shouldn't have left the -a in the meld command - we don't want meld to do anything automatically (that is the point of using $base in the middle pane...).