Using with Tortoise Hg

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cskardon
    Visitor
    • Mar 2014
    • 4

    Using with Tortoise Hg

    Hi,

    I've followed the instructions here: http://www.scootersoftware.com/support.php?zz=kb_vcs for Tortoise Hg - configuring manually as it doesn't find BC4... When I do a diff BC4 opens, but doesn't show an actual diff, just the start page...

    Errm am I missing something?

    Thanks

    Chris

    Ini file looks like:


    # Generated by TortoiseHg settings dialog


    [tortoisehg]
    ui.language = en_GB
    vdiff = bcomp
    closeci = True

    [extdiff]
    cmd.bcomp = C:\Program Files (x86)\Beyond Compare 4\BComp.exe
    opts.bcomp = /ro

    [merge-tools]
    bcomp.executable = C:\Program Files (x86)\Beyond Compare 4\BComp.exe
    bcomp.args = $local $other $base $output
    bcomp.priority = 1
    bcomp.premerge = True
    bcomp.gui = True

    [ui]
    username = C S
    merge = bcomp

    ignore=D:\Users\C\Documents\hgignore_global.txt
    [extensions]
    hgext.convert=
    eol=
    mercurial_keyring=
    extdiff =
  • Aaron
    Team Scooter
    • Oct 2007
    • 16000

    #2
    Hello,

    We've seen some issues when using a 'reserved' name when defining the source control manually. Tortoise may be expecting "bcomp" to be used specifically for BC3.

    If you rename to "bcomp4" (bcomp4.executable = C:\Program Files (x86)\Beyond Compare 4\BComp.exe, merge = bcomp4, etc) and reboot, does this help?

    Also, which version or TortoiseHG are you currently using? And on which OS?
    Last edited by Aaron; 07-Mar-2014, 11:32 AM. Reason: OS
    Aaron P Scooter Software

    Comment

    • cskardon
      Visitor
      • Mar 2014
      • 4

      #3
      Renamed to bcomp4 and still get the same issue - it loads BC4, but doesn't show a diff... are the parameters wrong???

      I'm using Tortoise Hg 2.11.1 on Windows 8.1 x64

      All up to date as far as I can see...

      Comment

      • Aaron
        Team Scooter
        • Oct 2007
        • 16000

        #4
        Hello,

        I made a couple of edits, and was able to get BC4 working as the vdiff tool for TortoiseHG 2.11.1:
        Code:
        [tortoisehg]
        vdiff = bcomp4
        
        [extdiff]
        cmd.bcomp4 = C:\Program Files (x86)\Beyond Compare 4\BComp.exe
        opts.bcomp4 = /ro
        Does this config get the diff working for you? I did need to make sure to restart TortoiseHG after making the edits to the mercurial.ini file in my User directory.
        Aaron P Scooter Software

        Comment

        • cskardon
          Visitor
          • Mar 2014
          • 4

          #5
          Right, that change didn't work - I have now got it to work:

          1. Open up (to edit) C:\Program Files\TortoiseHg\hgrc.d\MergeTools.rc
          2. Add the following: (in effect a copy of the BC3 settings)

          Code:
          ; Windows version of BeyondCompare 4
          beyondcompare4.priority=-1
          beyondcompare4.args=$local $other $base /mergeoutput=$output /ro /lefttitle=parent1 /centertitle=base /righttitle=parent2 /outputtitle=merged /automerge /reviewconflicts /solo
          beyondcompare4.premerge=False
          beyondcompare4.regkey=Software\Scooter Software\Beyond Compare 4
          beyondcompare4.regkeyalt=Software\Wow6432Node\Scooter Software\Beyond Compare 4
          beyondcompare4.regname=ExePath
          beyondcompare4.gui=True
          beyondcompare4.diffargs=/lro /lefttitle='$plabel1' /righttitle='$clabel' /solo /expandall $parent $child
          beyondcompare4.diff3args=$parent1 $parent2 $child /lefttitle='$plabel1' /centertitle='$clabel' /righttitle='$plabel2' /solo /ro
          beyondcompare4.dirdiff=True
          3. Save the file (if you can't save it directly - as I couldn't) you'll need to save as something like MergeTools.rc1 then rename the file in the folder manually

          4. Restart Tortoise HG
          5. Select beyondcompare4 for both diff and merge (when I just had diff selected it didn't work - but that may have been a restart issue)

          One thing I noticed in the MergeTools.rc file - is that it uses the registry key to get the executable, which is bcompare.exe not bcomp.exe

          Comment

          • Aaron
            Team Scooter
            • Oct 2007
            • 16000

            #6
            Thanks for the info. Interesting; this looks like parts that would allow bcompare4 to then be used with the internal tool selection (or, where the TortoiseHG guys would edit to add this).
            Aaron P Scooter Software

            Comment

            • Aaron
              Team Scooter
              • Oct 2007
              • 16000

              #7
              Also of note: The use of /solo is what allows bcompare.exe to work normally, as this then launches a new bcompare process for each call.
              Aaron P Scooter Software

              Comment

              • cskardon
                Visitor
                • Mar 2014
                • 4

                #8
                Cool, well - I'm happy as I can now use BC4 day-to-day a lot easier

                Thanks!

                Comment

                • behofmann
                  New User
                  • May 2014
                  • 2

                  #9
                  TortoiseHg Workbench 2.11.2 on Windows 7 Professional

                  Is there a way to configure mercurial.ini to use Beyond Compare 3 and eventually 4 for the Compare File Revisions option as shown in the attached screenshot? I want to use Beyond Compare 3 instead of the Hg File Log Viewer.

                  I'm using a portable version of Beyond Compare 3 on my USB hard drive so there are no registry entries. I've seen so many versions of mercurial.ini that I don't know which settings are required for my installation.

                  The following is my mercurial.ini:


                  [tortoisehg]
                  vdiff = beyondcompare3
                  UI.Language = en_US

                  [merge-tools]
                  ; Windows version of Beyond Compare
                  beyondcompare3.executable = E:\MyApps\PortableApps\Beyond Compare 3\BCompare.exe
                  beyondcompare3.args=$local $other $base $output /ro /lefttitle=local /centertitle=base /righttitle=other /automerge /reviewconflicts /solo
                  beyondcompare3.regkey=Software\Scooter Software\Beyond Compare 3
                  beyondcompare3.regname=ExePath
                  beyondcompare3.gui=True
                  beyondcompare3.priority=1
                  beyondcompare3.diffargs=/lro /lefttitle='$plabel1' /righttitle='$clabel' /solo /expandall $parent $child

                  [ui]
                  username = Brandon Hofmann
                  merge = beyondcompare3

                  [web]
                  cacerts=${PAL:AppDir}\TortoiseHg\HgRc.d\CACert.pem


                  Using the above, Beyond Compare 3 launches for the Diff to Parent and Diff to Local options, but NOT for the Compare File Revisions.

                  Any help would be greatly appreciated.

                  Thanks,

                  Brandon

                  Comment

                  • Aaron
                    Team Scooter
                    • Oct 2007
                    • 16000

                    #10
                    The TortoiseHG command Compare File Revisions requires use of their specific Hg File Log Viewer. The tree view at the top of this window allows the selection of the specific revisions while the files are then displayed below. BC3 does not support this tree view selection of different files; our command line requires the pair of files to already be picked and passed in.

                    It appears similar to this File Log Viewer, correct?
                    http://stackoverflow.com/questions/5...rtoisehg-2-0-3
                    Aaron P Scooter Software

                    Comment

                    • behofmann
                      New User
                      • May 2014
                      • 2

                      #11
                      Hi Aaron,

                      Thanks for the fast reply. Yes, the Stack Overflow screenshot you reference is similar to what I'm trying to get Beyond Compare 3 to replace. So the only way to choose different revisions from a tree for Beyond Compare is to Control Click two files and choose Visual Diff? Isn't choosing files from a tree a feature request for a new version of Beyond Compare?

                      Also does my mercurial.ini look correct since I've seen so many variations? Here is my latest version:

                      [tortoisehg]
                      vdiff=bc3
                      ui.language=en_US

                      [ui]
                      username=Brandon Hofmann
                      merge=bc3

                      [merge-tools]
                      ; Windows version of Beyond Compare
                      bc3.priority=-1
                      bc3.executable=E:\MyApps\PortableApps\Beyond Compare 3\BCompare.exe
                      bc3.args=$local $other $base /mergeoutput=$output /ro /lefttitle=parent1 /centertitle=base /righttitle=parent2 /outputtitle=merged /automerge /reviewconflicts /solo
                      bc3.premerge=False
                      bc3.regkey=Software\Scooter Software\Beyond Compare 3
                      bc3.regkeyalt=Software\Wow6432Node\Scooter Software\Beyond Compare 3
                      bc3.regname=ExePath
                      bc3.gui=True
                      bc3.diffargs=/lro /lefttitle='$plabel1' /righttitle='$clabel' /solo /expandall $parent $child
                      bc3.diff3args=$parent1 $parent2 $child /lefttitle='$plabel1' /centertitle='$clabel' /righttitle='$plabel2' /solo /ro
                      bc3.dirdiff=True

                      [web]
                      cacerts=${PAL:AppDir}\TortoiseHg\HgRc.d\CACert.pem

                      Thanks for your help,

                      Brandon

                      Comment

                      • Aaron
                        Team Scooter
                        • Oct 2007
                        • 16000

                        #12
                        Our supported Mercurial configuration is here:
                        http://www.scootersoftware.com/suppo..._vcs#mercurial

                        I suspect we do not support the dirdiff command unless Mercurial outputs the dir to the file system, like Git does.

                        As for overriding the Compare File Revisions command, that is out of our hands. TortoiseHG would need to add a button to call an external tool based on the selection, or otherwise expose the information or configure an external tool. It would be a feature request with them to expose this information, at which point we might be able to be used as the external tool.
                        Aaron P Scooter Software

                        Comment

                        • Aradayn
                          Visitor
                          • Jan 2013
                          • 4

                          #13
                          As far as I can tell, TortoiseHG supports BC4 natively since version 2.11.2:

                          https://bitbucket.org/tortoisehg/thg...ortoisehg-2112

                          I'd recommend updating your how-to to reflect the change.

                          Comment

                          • Aaron
                            Team Scooter
                            • Oct 2007
                            • 16000

                            #14
                            Thanks for the report. We'll get them updated.
                            Aaron P Scooter Software

                            Comment

                            Working...