(二) svn diff 命令解释

版权声明:转载请声明~ https://blog.csdn.net/weixin_38890593/article/details/82775859

①命令:svn diff -r版本1:版本2 --summarize
解释:比较两个版本的不同
如果要更新GPL库,可以通过此命令查看前后版本不同

[ll@team E50]$ svn diff -r433:431 --summarize
M       ChangeLog.txt
M       src/Makefile
··············································
在项目中一般版本信息放在log文件中
   diff        : 比较两个版本/路径的不同。
--summarize    : 显示输出结果的概要

②命令:svn diff -rhead XXX
解释:对比当前本地的XXX文件(working copy)和缓存在.svn下的版本库文件的区别,通俗来讲就是显示出修改的内容。
例如:我在ChangeLog.txt中加了一句printf("=test=");

[ll@team E50]$ svn diff -rhead ./ChangeLog.txt 
Index: ChangeLog.txt
=========================================================
--- ChangeLog.txt	(revision 477)    /*这个是缓存在版本库中的*/
+++ ChangeLog.txt	(working copy) /*这个是我们修改的文件*/
@@ -9,6 +9,7 @@
 *
 ********************************************************
 --------------------------------------------------------							
+		printf("=================test======================");
 	J		2018.08.19	r477
 	1.Make it the single image with model name
 		src/Makefile

③命令:svn diff
解释:该命令表示,显示出当前工作路径(区域)的所有变动信息。

补充:命令:svn help commit
查看svn的命令使用帮助

Valid options:
  -q [--quiet]             : print nothing, or only summary information
  -N [--non-recursive]     : obsolete; try --depth=files or --depth=immediates
  --depth ARG              : limit operation by depth ARG ('empty', 'files',
                             'immediates', or 'infinity')
  --targets ARG            : pass contents of file ARG as additional args
  --no-unlock              : don't unlock the targets
  -m [--message] ARG       : specify log message ARG
  -F [--file] ARG          : read log message from file ARG
  --force-log              : force validity of log message source
  --editor-cmd ARG         : use ARG as external editor
  --encoding ARG           : treat value as being in charset encoding ARG
  --with-revprop ARG       : set revision property ARG in new revision
                             using the name[=value] format
  --changelist [--cl] ARG  : operate only on members of changelist ARG
  --keep-changelists       : don't delete changelists after commit
  --include-externals      : Also commit file and dir externals reached by
                             recursion. This does not include externals with a
                             fixed revision. (See the svn:externals property)

Global options:
  --username ARG           : specify a username ARG
  --password ARG           : specify a password ARG
  --no-auth-cache          : do not cache authentication tokens
  --non-interactive        : do no interactive prompting (default is to prompt
                             only if standard input is a terminal device)
  --force-interactive      : do interactive prompting even if standard input
                             is not a terminal device
  --trust-server-cert      : accept SSL server certificates from unknown
                             certificate authorities without prompting (but only
                             with '--non-interactive')
  --config-dir ARG         : read user configuration files from directory ARG
  --config-option ARG      : set user configuration option in the format:
                                 FILE:SECTION:OPTION=[VALUE]
                             For example:
                                 servers:global:http-library=serf

猜你喜欢

转载自blog.csdn.net/weixin_38890593/article/details/82775859
今日推荐