From ce8735ee1daf71f2e608c372fba279c322121711 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Apr 11 2017 13:04:42 +0000 Subject: Force the ordering of the project when writing the gitolite config file This way we manage to avoid the issue raised by the different ordering between SQLite and PostgreSQL when it comes to NULL values. --- diff --git a/pagure/lib/git.py b/pagure/lib/git.py index c663740..887672c 100644 --- a/pagure/lib/git.py +++ b/pagure/lib/git.py @@ -91,7 +91,12 @@ def write_gitolite_acls(session, configfile): global_pr_only = pagure.APP.config.get('PR_ONLY', False) config = [] groups = {} - for project in session.query(model.Project).all(): + query = session.query( + model.Project + ).order_by( + model.Project.id + ) + for project in query.all(): for group in project.committer_groups: if group.group_name not in groups: groups[group.group_name] = [