The summurization of integrating of code diff and mere tool in cygwin

1. How to generate the SVN-to-SVN and SVN-to-Accurev diff report in HTML style
    1> SVN-to-SVN
       a. change diff-cmd to svndiff.pl in the config file of ~/.subversion/config
          the svndiff.pl is placed in the folder:  ~/perl_tool/code_diff/
       b. svndiff.pl is triggered by the calling of "svn diff" command.
          In this script, the diff targets files is getted from the ARGV. Then the
          thirdparty diff tool is called. We have two options of the thirdparty diff tools.
          One option is vimdiff, and the other option is BCompare.exe. The report format of BCompare
          is more readable, But BCompare is not a free tool, We can just try it by one month.
          You can find the details by reading the attached svndiff.pl

    2> SVN-to-Accurev
       a. This comparing work is directly taking place in the diff.pl
          Just as the descriptions of the last section, the thirdparty tools, vimdiff or BCompare,
          is called to generate the HTML report.

    3> Using of the BCompare
       a. The BCompare supports CLI mode. The HTML report configurations is not controlled by the args of the CLI command, but by
          a script. The script location is provided in the CLI command.
       b. The being compared files of both leftside and rightside are also provided in the CLI command.
          But, when calling the BCompare.exe in the cygwin environment, the unix style path format is unacceptable by the BCompare.
          The unix style path format can be changed to windows style through the `cygpath -w` cmd.

    4> Using of the vimdiff
       a. vimdiff is integrated into the vim package by default. But if you want to generate the HTML style comparing report,
          you can leverage the vim plugin "formatvim". <http://www.vim.org/scripts/script.php?script_id=3113>.
          To install this plugin, you just need to add the formatvim path to vim's runtimepath. For instance,
          you can add the following line to your own .vimrc configuration file.
          set runtimepath+=C:\exdev\tools\exvim\path-to\formatvim-3.0

          After installing the plugin, using the following command can generate the HTML report.
          vimdiff file1 file2 -c 'Format diffformat' -c 'w! diff.html' -c 'qa!'

    5> Comparison of file comparison tools
       a. URL link
          The following page summarized the common diff tools.
          http://en.wikipedia.org/wiki/Comparison_of_file_comparison_tools

2.  Using the Accurev in CLI mode
    1> Using the vimdiff to do the merging work
       vimdiff is a smart tool and suitable for the code diffing and merging work.  The default file-comparison program of
       AccuRev is acdiff in the AccuRev bin directory. As a thirdparty tool, vimdiff can replace the acdiff through set the ENV
       variable AC_DIFF_CLI to "vim-nox -d %1 %2".
      
       The following is frequently-used command of vimdiff.
       ]c  Jump forwards to the next start of a change
       [c  Jump backwards to the previous start of a change
       dp  Modify another buffer to undo difference with the current buffer
       do  Modify the current buffer to undo difference with another buffer
       fo  folding open
       fc  folding close

       You can get more details using "help vimdiff" in the command mode of vim.

    2> Using the CLI command in Accurev
       The following is frequently-used command of Accurev
       accurev mkws   --  make a workspace
       accurev incl   --  include a module
       accurev excl   --  exclude a module
       accurev diff   --  file-comparison
       accurev stat   --  list the elements by status
       accurev keep   --  keep a file
       accurev promote -- promote a file
       accurev pop -O  -- overwrite the element in the workspace by a version.

3.   Attached files
          

      


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值