Commit 2e7f46c3 authored by Jens Ulferts's avatar Jens Ulferts Committed by Eric Davis

[#270] bugfix: considering underscore a valid match in project identifier

parent 1071f3ee
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
# == Usage # == Usage
# #
# reposman [OPTIONS...] -s [DIR] -r [HOST] # reposman [OPTIONS...] -s [DIR] -r [HOST]
# #
# Examples: # Examples:
# reposman --svn-dir=/var/svn --redmine-host=redmine.example.net --scm subversion # reposman --svn-dir=/var/svn --redmine-host=redmine.example.net --scm subversion
# reposman -s /var/git -r redmine.example.net -u http://svn.example.net --scm git # reposman -s /var/git -r redmine.example.net -u http://svn.example.net --scm git
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
# -q, --quiet no log # -q, --quiet no log
# #
# == References # == References
# #
# You can find more information on the redmine's wiki : http://www.redmine.org/wiki/redmine/HowTos # You can find more information on the redmine's wiki : http://www.redmine.org/wiki/redmine/HowTos
...@@ -225,9 +225,9 @@ end ...@@ -225,9 +225,9 @@ end
def owner_name(file) def owner_name(file)
mswin? ? mswin? ?
$svn_owner : $svn_owner :
Etc.getpwuid( File.stat(file).uid ).name Etc.getpwuid( File.stat(file).uid ).name
end end
def mswin? def mswin?
(RUBY_PLATFORM =~ /(:?mswin|mingw)/) || (RUBY_PLATFORM == 'java' && (ENV['OS'] || ENV['os']) =~ /windows/i) (RUBY_PLATFORM =~ /(:?mswin|mingw)/) || (RUBY_PLATFORM == 'java' && (ENV['OS'] || ENV['os']) =~ /windows/i)
end end
...@@ -238,7 +238,7 @@ projects.each do |project| ...@@ -238,7 +238,7 @@ projects.each do |project|
if project.identifier.empty? if project.identifier.empty?
log("\tno identifier for project #{project.name}") log("\tno identifier for project #{project.name}")
next next
elsif not project.identifier.match(/^[a-z0-9\-]+$/) elsif not project.identifier.match(/^[a-z0-9\-_]+$/)
log("\tinvalid identifier for project #{project.name} : #{project.identifier}"); log("\tinvalid identifier for project #{project.name} : #{project.identifier}");
next; next;
end end
...@@ -309,4 +309,3 @@ projects.each do |project| ...@@ -309,4 +309,3 @@ projects.each do |project|
end end
end end
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment