From 445e2eadfcf63284e0e88454338e11dc1d173286 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Tue, 20 Feb 2018 17:23:16 +0100 Subject: [PATCH] Invert logic of namespace vs pdc type We are iterating through the gitolite config that is namespace aware (ie: rpms, modules) and are checking if the repo is in the list to update, list coming from pdc and thus style aware not namespaces (ie: rpm, module). So invert the logic. Signed-off-by: Pierre-Yves Chibon --- roles/distgit/files/mass-branching-gitolite.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/distgit/files/mass-branching-gitolite.py b/roles/distgit/files/mass-branching-gitolite.py index f3b028dede..a52603ca48 100644 --- a/roles/distgit/files/mass-branching-gitolite.py +++ b/roles/distgit/files/mass-branching-gitolite.py @@ -84,10 +84,10 @@ def main(): if row.strip().startswith('repo '): name = row.strip().split()[-1] - if name.startswith('rpm/'): - name = 'rpms/%s' % name[4:] - elif name.startswith('module/'): - name = 'modules/%s' % name[7:] + if name.startswith('rpms/'): + name = 'rpm/%s' % name[5:] + elif name.startswith('modules/'): + name = 'module/%s' % name[8:] if name in repos: process = True