I noticed that on my Mac, Beyond Compare wasn’t able to edit diffed files when it had been started from SourceTree. This struck me as odd since on Windows this worked fine. So I did a bit of digging and found out both SourceTee and I screwed up:
- SourceTree because at version 2.1 it still doesn’t recognise that Beyond Compare is installed.
- Me because I had posted wrong instructions at Mac OS X: integrating Beyond Compare 4 into SourceTree 2.x.
Editing Disabled
Luckily [WayBack] Zoë Peterson (lead developer on Beyond Compare and formerly Turbo Power Abbrevia project admin) had answered this before, and all these show “Editing disabled” in the user-interface:
Beyond Compare will disable editing of a file any of the following reasons:
- It’s one of the input files in a 3-way merge
- The comparison was cancelled
- The comparison encountered an error (corrupt file, invalid character encoding, out of memory, gamma rays, etc)
- The file format’s conversion settings don’t support converting back to the original format (MS Word, PDF)
- The file is on a read-only “filesystem” (7zip/RAR/CHM archives, CD/DVD-ROMs)
- A file or parent folder had editing explicitly disabled by the user in the session settings or using the
/ro
command line switches- The viewer itself doesn’t support editing (eg, Hex Compare)
Source: [WayBack] version control – Beyond Compare 3 editing disabled – Stack Overflow
So the last instruction should be:
Set both
Visual Diff Tool
andMerge Tool
toOther
, then set both theDiff Command
andMerge Command
to the value you obtained above (in my case/usr/local/bin/bcomp
) and these arguments:
Diff Command Arguments
"$LOCAL" "$REMOTE"
Merge Command Arguments
"$LOCAL" "$REMOTE" "$BASE" "$MERGED"
Note that somewhere during 2.2, SourceTree has added Beyond Compare integration and fixed some of the issues, but there are still issues left:
- [WayBack] Atlassian Jira: SourceTree Mac, Beyond Compare
- [WayBack] Brian Ganninger
on Twitter: “@jpluimers We added Beyond Compare in @sourcetree 2.2, bugfixed in couple releases after. Please file a ticket if still fails: https://https://jira.atlassian.com/browse/SRCTREE “
No Editing Disabled
There is only one occasion where the UI does not show “Editing Disabled”, but where you cannot edit the file itself (you can only edit the current line in the line diff view at the bottom of the UI). Zoë mentioned that too:
…
Also, the Full Edit (F2) toggle in the Text Compare View menu switches between inline editing and line-based mode. If it’s disabled you can copy/delete whole lines and type in the line details edits at the bottom of the window, but the main windows won’t have a cursor, typing is disabled, and it will always select whole lines. Unlike the above items, this doesn’t show “Editing Disabled” in the status bar.
Source: [WayBack] version control – Beyond Compare 3 editing disabled – Stack Overflow
By default this setting is bound to the F2 key on Windows, so if you accidentally press that when Beyond Compare is active, you might be in for a surprise.
Screen shots:
In the first case, no “Editing disabled” is shown:
–jeroen