2012-11-15 21 views
0

我正在安裝scmbug以在Windows上集成bugzilla與svn。經過與scmbug的一整天戰鬥。似乎我讓它脫離地面。瞭解以下模板的正則表達式

我進入提交評論爲


錯誤3

bug3

測試測試測試

唧唧歪歪


但它給我錯誤如 以下

Scmbug錯誤3:沒有找到與log_bugid_regex'^ \ s * bug \ s *([\ d | \ s |,|#] *?)匹配的bug id列表:''和log_bugid_split_regex',\ s?#| \ s?#|,| \ s +'在日誌消息'錯誤3

grepping的語法使我到conf文件。

因此期待幫助理解下面的正則表達式及其有效的輸入。

log_template => { 
    # The log_bugid_regex is a regular expression that must 
    # set the unnamed variable $1 to the bug number, or list 
    # of bug numbers. It is checked for a match as: m/$regex/s 

    log_bugid_regex => '^\s*bug\s*([\d|\s|,|#]*?):', 

     # The log_bugid_split_regex is a regular expression 
     # describing how a list of bug ids will be split in 
     # individual bug numbers. It is split as: /$regex/ 

     log_bugid_split_regex => ',\s?#|\s?#|,|\s+', 

    # The log_body_regex is a regular expression that must set 
    # the unnamed variable $1 to the log comment. It is 
    # checked for a match as: m/$regex/s 

    log_body_regex => '^\s*bug.*?:\s*(.*)' 

    }, 

任何幫助,將不勝感激。

感謝

回答

2
^\s*bug\s*([\d|\s|,|#]*?): 

你必須在正則表達式的末尾有一個冒號;你的提交信息沒有它。因此,它不匹配。

的正則表達式是爲了滿足像條目:

bug #2,#666: Corrected the number of the beast 

#是可選的。

+0

是的..明白了。感謝那。我們是否也可以爲所有三個正則表達式的有效輸入得到一些解釋。 – Javanator

+0

@Javanator:看到編輯,希望它有幫助 – jpalecek

+1

感謝您的時間 – Javanator