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

发布于 2024-12-07 18:00:03 字数 202 浏览 0 评论 0原文

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

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

I pretty stuck with situation in which I need to get user responsible for specific file, line and revision.
E.g. I have as input: source name, line number and revision. As output I need get user name.
I not so familiar with SVN and looking into documentation might take time (which I don't have).
In Clear Case it can be achieved by running this command:

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

拧巴小姐 2024-12-14 18:00:03
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
svn ann -r revision_number source_name

Then go to line number in svn output

#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
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文