vss配置beyond compare

    技术2022-05-20  44

    Using Beyond Compare with Version Control Systems

    Beyond Compare can be configured as the external difference utility in many popular VCS applications.  The following are configuration instructions for specific products.  Let us know if you have one to add to the list.

     Beyond Compare v3:  These examples are based on Beyond Compare 3

     Beyond Compare v2:  To use Beyond Compare 2 replace BComp.exe with BC2.exe and change the path to Beyond Compare 2's install folder.

     Linux users should prefix command line switches with "-" instead of "/".


    ACCUREV

    Windows Select Preferences from the Tools menu.Switch to the Diff/Merge tab.Diff: overwrite the preset with:  "C:/Program Files/Beyond Compare 3/bcomp.exe" %1% %2% /lefttitle="%3%" /righttitle="%4%"Merge (v3 Pro): overwrite the preset with:  "C:/Program Files/Beyond Compare 3/bcomp.exe" %1% %2% %a% /mergeoutput=%o% /lefttitle="%4%" /righttitle="%5%" /centertitle="%3%" Linux Select Preferences from the Tools menu.Switch to the Diff/Merge tab.Diff: overwrite the preset with:  /usr/bin/bcompare %1% %2% -lefttitle="%3%" -righttitle="%4%"Merge (v3 Pro): overwrite the preset with:  /usr/bin/bcompare %1% %2% %a% -mergeoutput=%o% -lefttitle="%4%" -righttitle="%5%" -centertitle="%3%"

    ANKHSVN

    Open Visual Studio.Select Options from the Tools menu.Select Source Control | Subversion User Tools.For the Diff and Merge entries, select Beyond Compare from the dropdown.

    CA HARVEST CHANGE MANAGER

    Open the Workbench.Select Options from the Tools menu.Switch to the Merge Tool tab in the Options dialog.Select "Beyond Compare" in the ToolName drop-down.Enter the complete path to your BComp.exe in the Compare, 2-way Merge, and 3-way Mergefields.

    Compare  BComp.exe /readonly $(File1) $(File2)

    2-way Merge  BComp.exe $(TrunkFile) $(BranchFile) /mergeoutput=$(ResultsFile)

    3-way Merge (v3 Pro)  BComp.exe $(TrunkFile) $(BranchFile) $(AncestorFile) $(ResultsFile)


    CLEARCASE

    Go into the "C:/Program Files/Rational/ClearCase/lib/mgrs" folder.Create a backup of the file named "map".Edit "map" and edit the following lines to point to Beyond Compare:text_file_delta compare C:/Program Files/Beyond Compare 3/BComp.exetext_file_delta xcompare C:/Program Files/Beyond Compare 3/BComp.exetext_file_delta merge C:/Program Files/Beyond Compare 3/BComp.exetext_file_delta xmerge C:/Program Files/Beyond Compare 3/BComp.exe

    Make the same change to lines beginning with _html, _xml, _html2, _xml2 to use Beyond Compare for HTML and XML comparisons.

    To use Beyond Compare 2, only change the xcompare line of the map file.  Overriding compare, merge, andxmerge is not supported.  A helper that improves BC2's support is available here.


    CLEARCASE REMOTE CLIENT

    Locate the folder named something like "C:/Program Files/IBM/Rational/ClearCase701/CCRC/plugins/com.ibm.rational.clearcase.compare_merge.win32.x86_7.0.1.D061004".(Note that the version number in path is subject to change.)Copy "C:/Program Files/Beyond Compare 3/bcomp.exe" into the folder.Move ccrc_cleardiff.exe, ccrc_cleardiffmrg.exe, ccrc_worddiffmrg.exe and ccrc_xmldiffmrg.exe to a backup folder.Make 4 copies of bcomp.exe and rename them to ccrc_cleardiff.exe, ccrc_cleardiffmrg.exe, ccrc_worddiffmrg.exe and ccrc_xmldiffmrg.exe.Change "CCRC Integrated (UTF-8)" to "ClearCase External" under Preferences | CCRC |Integration | Compare_Merge.

    CODE CO-OP

    Visit Reliable Software for details on using Beyond Compare with Code Co-op.  Reliable Software offers a discounted bundle of the two products.


    CS-RCS

    Choose Settings from the Document Explorer's Project menu.Switch to the File Types tab.Click the Default button.Change the Difference Analysis Tool to "Custom Tool".Enter the path to BComp.exe in the Difference Analysis Tool edit.

    CVS

    CVS does not support external diff or merge tools.


    DIMENSIONS CM / PVCS / SERENA

     BC version 3:

    Navigate to the Dimensions / PVCS install folder and find the file pvcsmerge.exe and rename it topvcsmerge.exe.exe.Copy bcomp.exe from C:/Program Files/Beyond Compare 3 into the Dimensions folder and rename it topvcsmerge.exe.

    In Dimensions CM 10 you can edit your native.properties file instead.  The integration isn't as complete in that case, so file format/rules matching don't work correctly and folder comparisons aren't supported.

     BC version 2:

    Follow the instructions above, but instead of using BComp.exe use the copy of pvcsmerge.exe inpvcsmergev8.zip for PVCS 6.8, 8.0, and Merant Dimensions 8, or in pvcsmerge75.zip for PVCS 7.5.


    ECLIPSE IDE

    Launch Beyond Compare from the  Eclipse IDE using the  Beyond CVS plug-in by Chris Callandar and Nick Boldt.

    FREEVCS

    Choose Properties in the Project Manager's Options menu.Switch to the Compare Tools panel.Click the Add Custom button.Enter "Beyond Compare" as the new name.Click the Edit button.Enter the path to BComp.exe in the File compare utility edit.Enter %1 %2 in the Command line parameter string edit.

    GIT FOR LINUX

    Diff

    Create a shell script file "git-diff-wrapper.sh" with the following content:   #!/bin/sh  # diff is called by git with 7 parameters:  # path old-file old-hex old-mode new-file new-hex new-mode  "<path_to_bc3_executable>" "$2" "$5" | catIn a console window enter the command:   $ git config --global diff.external <path_to_wrapper_script>

    3-way Merge (v3 Pro)

    In a console window enter the following three commands:    $ git config --global merge.tool bc3  $ git config --global mergetool.bc3.cmd "/usr/bin/bcompare /$LOCAL    /$REMOTE /$BASE /$MERGED"  $ git config --global mergetool.bc3.trustExitCode true

    2-way Merge (v3 Std, v2)

    In a console window enter the following three commands:    $ git config --global merge.tool bc3  $ git config --global mergetool.bc3.cmd "/usr/bin/bcompare /$LOCAL    /$REMOTE -savetarget=/$MERGED"  $ git config --global mergetool.bc3.trustExitCode true

    GIT FOR WINDOWS

    Note:  If you use the Git for Windows' Bash Command Prompt instead of the default Windows Command Prompt, you need to escape the $ character with /.

    Diff

    At a Windows command prompt enter the commands:    git config --global diff.tool bc3  git config --global difftool.bc3.cmd "/"c:/program files/beyond compare 3/bcomp.exe/" /"$LOCAL/" /"$REMOTE/""  git config --global difftool.prompt false

    To launch a diff with BC3, use the command "git difftool foofile.txt".

    3-way Merge (v3 Pro)

    At a Windows command prompt, enter the commands:    git config --global merge.tool bc3  git config --global mergetool.bc3.cmd "/"c:/program files/beyond compare 3/bcomp.exe/" /"$LOCAL/" /"$REMOTE/" /"$BASE/" /"$MERGED/""  git config --global mergetool.bc3.trustExitCode true

    To launch a 3-way merge with BC3, use the command "git mergetool foofile.txt".


    KDESVN

    In KDESVN Choose Configure KDESVN from the Settings menu.Select Diff & Merge.Check Use external diff display.In the External diff display edit, use:bcompare -readonly %1 %2In the External merge program edit, use:bcompare %s1 %s2 %tIn the External resolver program edit, use:bcompare %n %m %o %t

    MERCURIAL / HG / TORTOISEHG

    To configure Mercurial you need to edit the file  %USERPROFILE%/Mercurial.ini or  $HOME/.hgrc.  Add the following lines, using existing INI sections if they already exist:

    Diff

      [extensions]  extdiff =    [extdiff]  cmd.bcomp = C:/Program Files/Beyond Compare 3/BComp.exe  opts.bcomp = /ro    [tortoisehg]  vdiff = bcomp

    Once set up you can compare revisions from the command line usinghg bcomp -r <rev1> [-r <rev2>] [<filename>]

    3-way Merge (v3 Pro)

      [merge-tools]  bcomp.executable = C:/Program Files/Beyond Compare 3/BComp.exe  bcomp.args = $local $other $base $output  bcomp.priority = 1  bcomp.premerge = True  bcomp.gui = True    [ui]  merge = bcomp

    MICROSOFT TEAM FOUNDATION SERVER (TFS)

    Diff

    In Visual Studio Choose Options from the Tools menu.Expand Source Control in the treeview.Click Visual Studio Team Foundation Server in the treeview.Click the Configure User Tools button.Click the Add button.Enter ".*" in the Extension edit.Choose Compare in the Operation combobox.Enter the path to BComp.exe in the Command edit.In the Arguments edit, use:%1 %2 /title1=%6 /title2=%7

    3-way Merge (v3 Pro)

    Follow steps 1-6 above.Choose Merge in the Operation combobox.Enter the path to BComp.exe in the Command edit.In the Arguments edit, use:%1 %2 %3 %4 /title1=%6 /title2=%7 /title3=%8 /title4=%9

    2-way Merge (v3 Std, v2)

    Use the same steps as the 3-way merge above, but use the command line:%1 %2 /savetarget=%4 /title1=%6 /title2=%7


    MICROSOFT VISUAL STUDIO 2005 WITH VISUAL SOURCESAFE 2005

    Supported for "Microsoft Visual SourceSafe" plug-in.  The "Microsoft Visual SourceSafe (Internet)" plug-in does not support external diff tools. Open Visual Studio 2005.Select Options from the Tools menu.Select Plug-In Settings under the Source Control branch of the left-side tree control.Select Visual SourceSafe under Plug-In Settings on the right-hand pane.Press the Advanced button.Select the Custom Editor tab in the "SourceSafe Options" pane.Select File Difference in the Operation drop-down.Enter ".*" in the File Extension edit.Enter this in the Command Line edit:  "C:/Program Files/Beyond Compare 3/bcomp.exe" %1 ,lick the Add button and close all dialog boxes.

    MKS SOURCE INTEGRITY

    Diff

    Start MKS Source Integrity.Go to Tools | Preferences | DiffTool.Select Custom Command.Enter the command:  "C:/Program Files/Beyond Compare 3/BComp.exe" /title1="{1}" /title2="{2}" "{3}" "{4}"

    3-way Merge (v3 Pro)

    Use this for the merge tool command line:  "C:/Program Files/Beyond Compare 3/BComp.exe" /title1="{1}" /title2="{2}" /title3="{0}" "{5}" "{6}" "{4}" "{7}"

    2-way Merge (v3 Std, v2)

    Use this for the merge tool command line:  "C:/Program Files/Beyond Compare 3/BComp.exe" /title1="{1}" /title2="{2}" "{5}" "{6}" /savetarget="{7}"


    NETBEANS

    Select Options from the Tools menu.Select Miscellaneous.Go to the Diff tab.Select External Diff.Command: C:/Program Files/Beyond Compare 3/BComp.exe {0} {1}

    Once configured, selecting Team | Local History | Show Local History will launch a diff in Beyond Compare.


    PERFORCE

    P4V (The Perforce Visual Client) Choose Preferences from the Edit menu.Switch to the Diff tab.Change the Default Diff Application option to "Other application".Enter the path to BComp.exe in the Location edit.Switch to the Merge tab.Change the Default merge application to "Other application".Enter the path to BComp.exe in the Location edit.In the Arguments edit, enter:  %1 %2 %b %r P4Win (The Perforce Windows Client) Choose Options from the Settings menu.Select Files > Diff.Select User supplied diff application.Browse to BComp.exe.Check Options args and enter: /lefttitle="%L" /righttitle="%R" %1 %2Select Files > Merge.Select User supplied merge application.Browse to BComp.exe.Check Optional args and enter: /vcsleft="%T" /vcsright="%Y" %2 %3 %1 %4 P4 (The Perforce Command Line Client) Add two environmental variables: P4DIFF=C:/Program Files/Beyond Compare 3/BComp.exe P4MERGE=C:/Program Files/Beyond Compare 3/BCompP4Merge.batCreate a file named BCompP4Merge.bat in your Beyond Compare install folder with the contents:  "C:/Program Files/Beyond Compare 3/BComp" %2 %3 %1 %4

    QVCS

    Choose Preferences from the Admin menu.Switch to the Utilities tab.in the Visual Compare Utility Command Line edit, enter:  C:/Progra~1/Beyond~1/BComp.exe file1Name file2Name

    ROUNDTABLE TSMS

    Go into the "C:/Program Files/RoundTable/rtb/p" folder.Create a backup of the file named "Rtb_vcom.p".Edit "Rtb_vcom.p" and change the line:  ASSIGN Mexe = SEARCH("visdiff/visdiff.exe").to:  ASSIGN Mexe = SEARCH("C:/Progra~1/Beyond~1/bcomp.exe").

    SOURCEANYWHERE FOR VSS

    Select Tools | Options.  Go to the External Programs tab.Application for diff/merge: C:/Program Files/Beyond Compare 3/bcomp.exeArguments for diff files: /readonly /title1="%FIRST_LABEL%" /title2="%SECOND_LABEL%" "%FIRST_FILE%" "%SECOND_FILE%"Arguments for diff folders: "%FIRST_DIR%" "%SECOND_DIR%"Arguments for Two-way merge: /leftreadonly /title1="%FIRST_LABEL%" /title2="%SECOND_LABEL%" "%FIRST_FILE%" "%SECOND_FILE%"

    SOURCEGEAR VAULT / FORTRESS

    Diff

    Choose Options from the Tools menu.Select Diff / Merge.Under Diff, enter the path to BComp.exe for the Program setting.In the Arguments edit, enter:"%LEFT_PATH%" "%RIGHT_PATH%" /ro /title1="%LEFT_LABEL%" /title2="%RIGHT_LABEL%"

    3-way Merge (v3 Pro)

    Choose Options from the Tools menu.Select Diff / Merge.Under Merge, enter the path to BComp.exe for the Program setting.In the Arguments edit, enter:"%WORKING_PATH%" "%OTHER_PATH%" "
    转载请注明原文地址: https://ibbs.8miu.com/read-2225924.html

    最新回复(0)