+19
Completed

Conflict Solver: show base file [SG-7715]

Marc Strapetz 4 years ago updated by cppLord 3 years ago 28

In addition to the left - merge - right view, have a left - base - right view which shows the "base" file (as it's part of Git's index). This helps to understand the actual independent changes in the left and the right fork.

Git
GOOD, I'M SATISFIED
Satisfaction mark by Marc Strapetz 4 years ago

I <3 this feature request!

That would be invaluable for anyone who ever solved conflicts!

Please do it! :-) vote vote vote!

+1

By the way for anyone interested I've setup p4merge as conflict solver in SmartGit with the following arguments and it does the job:

${baseFile} ${leftFile} ${rightFile} ${mergedFile}

Woot woot! I'll check it out.

Hi, I tried using this feature but couldn't find it. I'm on build #9045, is it there?

It's the first menu item in the left most menu of the Conflict Solver. Where did you search?

Ah, I see it now. I expected it to be on the toolbar because there are already different setups of conflict-solving there. I also looked in the menu but definitely not "File", didn't see any logic in it being there.

Checked out the feature now, looks good!

It looks good indeed. If I may suggest something minor: I wish I could see the 4 views at the same time: left (ours), base, and right (theirs) on the first line of the window and the working tree below.


n.b: sorry if it's not the place for that but it took me some time to get the JRE 1.8 running on my Debian 7 (wheezy) as the GLIBC 2.14 required by .smartgit/8.1/swt.tmp/libswt-pi-gtk-4712.so. I was thinking to post an howto about that. Should I post that to the smartgit google groups, mailing list or somewhere else ?

Please post the JRE issue to the smartgit google groups.

+1

I'm looking for something more like this:

We've decided against this because it would be hard to show changes between left-base and left-result (right-base and right-result) in an easy-to-understand way.

And I'd echo what others said... ideally a button on the toolbar to toggle this vs other n-way views

I think once you find yourself in a 3-way merge conflict "easy-to-understand" may not be the best filter :) Also, an option for this does not mean everyone has to use it... but when you really need to look at the base-vs-left-right *and* edit the merge result (which is often in my experience) this view is unbeatable. imho etc :)


I'll stick with p4merge then since it has almost exactly the mock up view I posted there, but I thanks for the reply. Overall, I love the product btw keep up the good work!

We've decided for 2 separate windows because it is possible to arrange them the way you like (assuming a large enough screen). For my last conflicts it has proven to improve the situation fairly well.

Indeed they can be arranged and it seems to remember that arrangement so +1 there... but it is now a more cluttered (imho) 6-way merge view instead of just 4... As top-level windows it is quite hard to adjust their relative arrangement on-the-fly... say to give more or less room to the working tree. In my mock up there would be an implied splitter to easily adjust the top/bottom half.


Like all UI/UX ... everyone has different preferences / sensibilities. One size does not fit all.. etc :) In this case, I certainly didn't originate the 4-way view there... so plenty of other people and products have found it useful. If you haven't tried p4merge it is a free tool (and a bit clunky) that provides that same 4-way merge view and I would love to stop using it :)


Just my $2e-02


Hello Don,


I agree with you buit if SmartGit team prefers to have the base and the working tree in two distinct windows, then I say "fair enough" :-). I guess it's not such a big deal.

I'm actually using p4merge in Smartgit at present. But there's a drawback that I've not searched to fix yet: when I click on "Conflict Solver" in Smartgit, it does open p4merge but SmartGit instantly asks me if I want to stage the file instead of waiting for me to close p4merge. It's probably because p4merge command release back the shell prompt immediatly actually.

+1

@Seb - I agree that aspect of p4merge integration is less then ideal, but for real-world (complex) conflicts it really is the only sane answer ... imho of course :). Maybe one day they'll reconsider, who knows... UI is one of those "different strokes for different folks" equations after all.


@Thomas - thanks for taking the time explain your POV and (as I mentioned) I love the product overall.

Hey guys,


I would like to use SmartGit with BeyondCompare because the 4files view is the best IMHO:

https://www.scootersoftware.com/v4help/index.html?command_line_reference.html


I tried to configure an external conflict solver in SmartGit by putting the following into the "Arguments:" field:

${leftFile} ${rightFile} ${baseFile} ${mergedFile}


But it doesn't work. So is my understanding of this thread correct that SmartGit only accepts 3 files, i.e. ${leftFile} ${rightFile} ${mergedFile}? That would be a bummer!


Thanks


As stated in one of my previous comment I did manage to make this works with p4merge using ${leftFile} ${rightFile} ${baseFile} ${mergedFile}


I think it should work with bcompare too. Are you sure that you use the latest smartgit version? because baseFile has been introduced at some point and wasn't existing in the first smartgit versions 

I use 17.1 and have configured it as in the screen shot above. Please let me know if I did something wrong. I am using Beyond Compare 4 Pro Edition Version 4.2.3 (build 22587). Thanks

This is mine for p4merge. Apparently your config is fine except that the argument order is not the same for p4merge. 

Actually the bcompare doc sounds weird to me:

3 files = BCompare.exe C:\Left.ext C:\Right.ext C:\Center.ext

4 files = BCompare.exe C:\Left.ext C:\Right.ext C:\Center.ext C:\Output.ext


So in "3 files" context I assume that Center.ext=${mergedFile}

In your Smartgit config you assumed Output.ext=${mergedFile} which seems fair as it's called "Ouput.ext" but may be you could try this argument order:

 ${leftFile} ${rightFile} ${mergedFile} ${baseFile}

I got your point and I remember I also tried swapping baseFile and mergedFile but without luck.


Btw some guy configured it on Windows in git config and also followed the order mentioned in the doc:

https://www.chadly.net/git-bcompare/


[mergetool "bc4"]
	cmd = \"C:\\Program Files\\Beyond Compare 4\\BComp.exe\" \"$REMOTE\" \"$LOCAL\" \"$BASE\" \"$MERGED\"


I am really out of ideas why it does not work with SmartGit.

Since two weeks my reply is "on moderation"... maybe the mods are on vacation? ;)


This was my reply (now without the link as it seems to be the reason for the pending moderation):






Btw some guy configured it on Windows in git config and also followed the order mentioned in the doc:


[mergetool "bc4"]
    cmd = \"C:\\Program Files\\Beyond Compare 4\\BComp.exe\" \"$REMOTE\" \"$LOCAL\" \"$BASE\" \"$MERGED\"

I am really out of ideas why it does not work with SmartGit.