Diffmerge won't open if file does not exist

Support for our DiffMerge utility.

Moderator: SourceGear

Post Reply
jmandawg
Posts: 1
Joined: Wed Aug 25, 2010 7:27 am

Diffmerge won't open if file does not exist

Post by jmandawg » Wed Aug 25, 2010 7:36 am

Hi,

I'm using DiffMerge with Git. I'm using it with the following parameters:

DiffMerge --merge --result=\"$MERGED\" \"$LOCAL\" \"$BASE\" \"$REMOTE\"

Sometime $BASE does not exist. If this happens DiffMerge refuses to open and i can't perform the merge.

I know i can fix this by passing it to a script first and checking for the existence of the file. But i think DiffMerge should be smart enough to know that if BASE doesn't exist use LOCAL as the base. Or at least giving the user the option to do so. Refusing to open Diffmerge does not seem like the best solution.

jeffhostetler
Posts: 534
Joined: Tue Jun 05, 2007 11:37 am
Location: SourceGear
Contact:

Re: Diffmerge won't open if file does not exist

Post by jeffhostetler » Thu Aug 26, 2010 11:48 am

I'm not that familiar with some of Git's subtleties.

What does it mean if BASE doesn't exist? (The man
page for mergetool said "it'll be present if available",
but I wasn't sure what that mean in real life.)

How often does this happen?

Is it always correct to assume that one branch or
the other should (silently) supplied?

DiffMerge assumes that BASE contains the common
ancestor version of the file. This lets me highlight
changes in both the LOCAL and REMOTE versions
relative to the ancestor.

Having it assume that BASE=LOCAL when BASE is
missing seems like a recipe for losing some of your
local changes if you're not careful.

1. Anything that you've changed locally relative to the
real BASE won't be highlighted and it will look like the
REMOTE version UNDID the change (and if you use
the auto-merge button, it will do just that).

2. Lines with (what would be a 3-way conflict) will just
appear as a simple change in the REMOTE; you won't
have any of the intra-line character highlight to help.
And again, you may lose some of your changes.

I'm probably being overly paranoid here, but I'd rather
be safe.

I'll log a bug to look into having the dialog (with the
appropriate warnings).


So until then, a shell script wrapper might be in your
future.

jeff

Item:15533

Post Reply