From 2c92e45bdb831ef499c8a8758f84ff1c7e114dcd Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Fri, 22 Apr 2016 02:10:31 -0500 Subject: [PATCH] Fix committing. --- lib/kgrader/backend/svn.rb | 6 ++++-- lib/kgrader/submission.rb | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/kgrader/backend/svn.rb b/lib/kgrader/backend/svn.rb index 5394d45..4352370 100644 --- a/lib/kgrader/backend/svn.rb +++ b/lib/kgrader/backend/svn.rb @@ -51,8 +51,10 @@ module KGrader::Backend end end - def commit(repo, message, paths = nil) - run 'commit', '-m', message, *paths.map { |fn| File.join repo, fn } + def commit(repo, message, *paths) + fullpaths = *paths.map { |fn| File.join repo, fn } + run 'add' fullpaths + run 'commit', '-m', message, fullpaths end def commit_date(repo) diff --git a/lib/kgrader/submission.rb b/lib/kgrader/submission.rb index 6e5fc7d..273f1d6 100644 --- a/lib/kgrader/submission.rb +++ b/lib/kgrader/submission.rb @@ -65,6 +65,7 @@ module KGrader @course.backend.commit repo, message, @assignment.report FileUtils.rm pendingfile end + nil end private