Announcement

Collapse
No announcement yet.

Using bcompare with svn on the Mac

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using bcompare with svn on the Mac

    Hi,

    I would like to use bcompare 4.X on the Mac as my diff tool for my svn client.

    I followed the step detailed in the online documentation for Linux :
    http://www.scootersoftware.com/suppo...?zz=kb_vcs#svn

    Beyound compare launches correctly, but does not open the files passed by SVN.

    Are the arguments to use not the same on the Mac ?
    Or is there another issue ?

    Thanks very much,
    Nicolas Castagné

  • #2
    Hello,

    You'll want to follow the instructions we've gathered for OSX here:
    http://www.scootersoftware.com/vbull...ad.php?t=11677

    The first, and most important, step is to use the Beyond Compare menu -> Install Command Line Tools to get "bcompare" and "bcomp" installed on your system.
    Aaron P Scooter Software

    Comment


    • #3
      Hello, and thanks for your answer Aaron.

      I had browsed the two pages, but they did not match.

      Indeed, seems that on the Mac I need to point to the "bcomp" command line, and not the "bcompare" command line (bcompare returns immediately).

      I ll update the thread "Using BC4 OSX with Version Control Systems" accordingly :
      http://www.scootersoftware.com/vbull...ad.php?t=11677

      Thanks,
      Nicolas

      Comment


      • #4
        Oh, the thread is closed. I propose you update it with the following :


        ----
        Subversion (command line) on OS X

        Step 1/
        Install the command line tools, as explained at the top of the thread

        Step 2/
        Follow the explanation for "Linux" on :
        http://www.scootersoftware.com/suppo...?zz=kb_vcs#svn

        However, do not use the "bcompare" command line in the scripts you create.
        Use instead the "bcomp" command line (which seems to be the blocking command line for beyound compare on the Mac).

        ---

        Nicolas

        Comment


        • #5
          Thanks for testing that. Yes, in most cases bcomp is used/expected as it is designed to wait. It is actually an outlier to need bcompare for the Linux Subversion instructions. I've updated the thread with the instructions you recommend.
          Aaron P Scooter Software

          Comment


          • #6
            I also got BC4 working with Subversion on my Mac OS X.

            I did make one minor change though:
            /usr/bin/bcompare "$6" "$7" -title1="$3" -title2="$5" -readonly

            was changed to the following as I like having the ability to make changes to the actual code in a diff tool (and this way it makes the SVN pane only readonly):
            /usr/bin/bcompare "$6" "$7" -title1="$3" -title2="$5" -leftreadonly

            Comment


            • #7
              Hello,

              That's great, but be careful if you diff two older revisions (rather than a revision to local), as any edits would be to the temp file that SVN is currently showing.
              Aaron P Scooter Software

              Comment


              • #8
                Good point however the ability to edit content in the right pane far exceeds IMHO making edits in the right pane that are not saved b/c one does not know about the tool they are using

                Comment


                • #9
                  Has the support for -leftreadonly in bcomp gone away? I had been following nikolaosinlight's suggestion from 23-Mar-2016, 02:59 PM (but with bcomp, not bcompare) for the same reasons he listed. However, now I see that changes to the temp file are allowed, but are never saved to the working copy file. Is there are new way to do that, or is it now impossible?

                  Comment


                  • #10
                    Hello,

                    Sorry, could you clarify your setup and behavior specifically? The expected behavior is if -leftreadonly is used, the BC4 Text Compare interface itself will prevent typing, and "Editing disabled" would show in the bottom status bar, so you wouldn't be able to type and the Save button for that side is disabled. There shouldn't be any changes allowed to the left file.

                    Which OS version are you running, and are you using the latest BC 4.3.3 release?
                    Aaron P Scooter Software

                    Comment


                    • #11
                      I am running MacOS 10.13.6, High Sierra with BC 4.3.3.

                      Here's what I'd like to happen: When I ask to compare the working copy to the committed svn revision, I'd like BC to extract the svn revision to a temp file, show that on the left and the working copy on the right. The left side should be marked "read-only", but the right side should not.

                      What actually happens is close to that, except that it appears the working copy is *also* copied to a temp file. The left side is read-only, the right side is not. However, when I save the right side, it saves to the temp file, and doesn't update the working copy.

                      Sorry my original question was misleading. The problem isn't with -leftreadonly, it's with the creation of a temp file to hold the working copy.

                      Comment


                      • #12
                        Hello,

                        BC4 isn't creating the temp files that SVN diff is passing into BC4; svn is performing that step then passing temp files on the command line. I followed this setup guide to setup a quick test environment:
                        http://www.scootersoftware.com/suppo...kb_vcs_osx#svn

                        From my own testing, I have a newer version of SVN 1.10.4 on MacOS 10.15.3. This version of svn isn't creating a temp version of the local file, but our default instructions mark both sides as read-only, since the diff command can call with revisions or a working copy. I tested setting to leftreadonly, and was able to update the working copy directly, but I'm not sure I would recommend this override since the command line svn could also pass in two revisions, where the right shouldn't be editable.
                        Aaron P Scooter Software

                        Comment


                        • #13
                          Thanks! I just found this explanation: https://stackoverflow.com/a/396278/2554330. If you use "svn:keywords" on a file, it substitutes things like revision number etc. for the keyword when you do a checkout. For the diff, it makes a temp file without those substitutions. I had the keywords defined, hence the temp file. I don't really need the keywords, so I'll remove them!

                          Comment

                          Working...
                          X