scm: cvs: set identifier nil in blame.

Redmine can not handle cvs revision (e.g. 1.2) as changeset identifier.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5401 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2011-04-11 08:34:18 +00:00
parent 4491f71441
commit a6798d6cc2
1 changed files with 7 additions and 1 deletions

View File

@ -316,7 +316,13 @@ module Redmine
shellout(cmd) do |io| shellout(cmd) do |io|
io.each_line do |line| io.each_line do |line|
next unless line =~ %r{^([\d\.]+)\s+\(([^\)]+)\s+[^\)]+\):\s(.*)$} next unless line =~ %r{^([\d\.]+)\s+\(([^\)]+)\s+[^\)]+\):\s(.*)$}
blame.add_line($3.rstrip, Revision.new(:revision => $1, :author => $2.strip)) blame.add_line(
$3.rstrip,
Revision.new(
:revision => $1,
:identifier => nil,
:author => $2.strip
))
end end
end end
return nil if $? && $?.exitstatus != 0 return nil if $? && $?.exitstatus != 0