[ARVADOS] updated: 44064fd5fd15cf053603276438d19941f3d8e892
git at public.curoverse.com
git at public.curoverse.com
Fri Aug 22 15:54:15 EDT 2014
Summary of changes:
services/api/app/models/commit.rb | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
via 44064fd5fd15cf053603276438d19941f3d8e892 (commit)
from d85ec3b1d45863839186537c6c832732784d5689 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 44064fd5fd15cf053603276438d19941f3d8e892
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Fri Aug 22 15:54:12 2014 -0400
Improve error checking a bit on find_commit_range for bad revisions and missing
repositories. no issue #
diff --git a/services/api/app/models/commit.rb b/services/api/app/models/commit.rb
index 8735741..0f62737 100644
--- a/services/api/app/models/commit.rb
+++ b/services/api/app/models/commit.rb
@@ -12,13 +12,18 @@ class Commit < ActiveRecord::Base
end
def self.find_commit_range(current_user, repository, minimum, maximum, exclude)
- if (minimum and !git_check_ref_format(minimum)) or !git_check_ref_format(maximum)
- logger.warn "find_commit_range called with invalid minimum or maximum: '#{minimum}', '#{maximum}'"
+ if minimum and minimum.empty?
+ minimum = nil
+ end
+
+ if minimum and !git_check_ref_format(minimum)
+ logger.warn "find_commit_range called with invalid minimum revision: '#{minimum}'"
return nil
end
- if minimum and minimum.empty?
- minimum = nil
+ if maximum and !git_check_ref_format(maximum)
+ logger.warn "find_commit_range called with invalid maximum revision: '#{maximum}'"
+ return nil
end
if !maximum
@@ -88,6 +93,8 @@ class Commit < ActiveRecord::Base
else
commits.push(max_hash) if !resolved_exclude or !resolved_exclude.include? max_hash
end
+ else
+ logger.warn "Repository #{r.name} exists in table but not found on disk"
end
end
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list