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

时间:2011-10-03 08:30:32

标签: svn version-control username

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

cleartool annotate -nhe -fmt %u \t file_name.cpp

2 个答案:

答案 0 :(得分:7)

svn blame 

是您正在寻找的

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

答案 1 :(得分:1)

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