2011-10-03 8 views
1

我相當堅持我需要讓用戶對特定文件,行和修訂版負責的情況。 例如我有作爲輸入:源名稱,行號和修訂。作爲輸出我需要獲取用戶名。 我不太熟悉SVN,並且查看文檔可能需要一些時間(我沒有)。SVN - 用戶負責源文件中的行

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

回答

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