lib/commands/commit.rb in dev-2.0.130 vs lib/commands/commit.rb in dev-2.0.131
- old
+ new
@@ -8,13 +8,26 @@
if(File.exists?('commit.message') && File.read('commit.message').gsub(/\s+/,"").length >0)
add "git commit -a -v -m \"#{File.read('commit.message')}\""
else
add "git commit -m'all'"
end
- add "<%FileUtils.rm('commit.message')%>" if File.exists?('commit.message')
+ #add "<%FileUtils.rm('commit.message')%>" if File.exists?('commit.message')
+ add "<%File.open('commit.message','w'){|f|f.write('')}%>"
end
end
- if(File.exists?('.svn') && Internet.available?)
- add 'svn commit -m"commit all"'
+ if(File.exists?('.svn'))
+ message=""
+ message=IO.read('commit.message').strip if File.exists?('commit.message')
+ if(!File.exists?('commit.message') || message.length==0)
+ if(defined?(REQUIRE_COMMIT_MESSAGE))
+ puts "commit.message required to perform commit"
+ else
+ add 'svn commit -m"commit all"'
+ end
+ else
+ add 'svn commit --file commit.message'
+ add "<%File.open('commit.message','w'){|f|f.write('')}%>"
+ #add "<%FileUtils.rm('commit.message')%>" if File.exists?('commit.message')
+ end
end
end
end
\ No newline at end of file