SVN -用户对源文件中的行负责



我很困的情况下,我需要让用户负责特定的文件,行和修订。例:我有输入:源名称,行号和修订。作为输出,我需要get用户名。我对SVN不太熟悉,查找文档可能需要时间(我没有时间)。在Clear Case中,可以通过运行以下命令实现:

cleartool annotate -nhe -fmt %u t file_name.cpp
svn blame 

就是你要找的

http://svnbook.red-bean.com/en/1.0/re02.html

svn ann -r revision_number source_name

然后转到svn输出的行号

#svn help ann
blame (praise, annotate, ann): Output the content of specified files or
URLs with revision and author information in-line.
usage: blame TARGET[@REV]...
  If specified, REV determines in which revision the target is first
  looked up.
Valid options:
  -r [--revision] ARG      : ARG (some commands also take ARG1:ARG2 range)
                             A revision argument can be one of:
                                NUMBER       revision number
                                '{' DATE '}' revision at start of the date
                                'HEAD'       latest in repository
                                'BASE'       base rev of item's working copy
                                'COMMITTED'  last commit at or before BASE
                                'PREV'       revision just before COMMITTED
  -v [--verbose]           : print extra information
  -g [--use-merge-history] : use/display additional information from merge
                             history
  --incremental            : give output suitable for concatenation
  --xml                    : output in XML
  -x [--extensions] ARG    : Default: '-u'. When Subversion is invoking an
                             external diff program, ARG is simply passed along
                             to the program. But when Subversion is using its
                             default internal diff implementation, or when
                             Subversion is displaying blame annotations, ARG
                             could be any of the following:
                                -u (--unified):
                                   Output 3 lines of unified context.
                                -b (--ignore-space-change):
                                   Ignore changes in the amount of white space.
                                -w (--ignore-all-space):
                                   Ignore all white space.
                                --ignore-eol-style:
                                   Ignore changes in EOL style
                                -p (--show-c-function):
                                   Show C function name in diff output.
  --force                  : force operation to run
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
  --config-dir ARG         : read user configuration files from directory ARG

最新更新