From eb7170357938875ebbd297ee56ed6a0624ff05bb Mon Sep 17 00:00:00 2001 From: sunjunnan Date: Fri, 10 Mar 2023 09:38:37 +0000 Subject: [PATCH] teuthology: add the function of finding the commit correctly when the code is not in github Signed-off-by: Sun Junnan add the function of finding the commit correctly when the code is not in github --- teuthology/suite/util.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/teuthology/suite/util.py b/teuthology/suite/util.py index fabfa39472..3c7f916e38 100644 --- a/teuthology/suite/util.py +++ b/teuthology/suite/util.py @@ -209,6 +209,8 @@ def git_validate_sha1(project, sha1, project_owner='ceph'): # kinda specific to knowing git.ceph.com is gitweb url = ('http://git.ceph.com/?p=%s.git;a=blob_plain;f=.gitignore;hb=%s' % (project, sha1)) + elif config.ceph_git_base_url in url: + url = '/'.join((url, 'commit', sha1)) else: raise RuntimeError( 'git_validate_sha1: how do I check %s for a sha1?' % url