Merge "Don't process lock files as refs in tests"

This commit is contained in:
Zuul 2018-06-22 16:49:19 +00:00 committed by Gerrit Code Review
commit 6bebc00964
1 changed files with 3 additions and 0 deletions

View File

@ -647,6 +647,9 @@ class FakeGerritConnection(gerritconnection.GerritConnection):
path = os.path.join(self.upstream_root, project.name)
repo = git.Repo(path)
for ref in repo.refs:
if ref.path.endswith('.lock'):
# don't treat lockfiles as ref
continue
r = ref.object.hexsha + ' ' + ref.path + '\n'
ret += '%04x%s' % (len(r) + 4, r)
ret += '0000'