summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Brown <ben@demerara.io>2021-10-13 17:00:39 +0000
committerBen Brown <ben@demerara.io>2021-10-13 17:00:39 +0000
commit6481be75c568c64c6448915b3ff1fa088a056e5a (patch)
tree8662456367091e07579821075686c047c5185ccf
parentc91df88eef95a0a8ad5545d66b0f6ddedbe7da01 (diff)
parentdfc54e2a59819fcd683b3624f33626c771d7730f (diff)
downloadlorry-controller-6481be75c568c64c6448915b3ff1fa088a056e5a.tar.gz
Merge branch 'egb/issue-31-fix' into 'master'
Re #31: ensure that origin url is set to what's in settings See merge request CodethinkLabs/lorry/lorry-controller!28
-rw-r--r--lorrycontroller/readconf.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/lorrycontroller/readconf.py b/lorrycontroller/readconf.py
index c833645..8f95035 100644
--- a/lorrycontroller/readconf.py
+++ b/lorrycontroller/readconf.py
@@ -113,6 +113,11 @@ class ReadConfiguration(lorrycontroller.LorryControllerRoute):
def update_confgit(self, confdir):
logging.info('Updating CONFGIT in %s', confdir)
+ # First ensure that the confgit repo is using the correct
+ # upstream source.
+ url = self.app_settings['confgit-url']
+ cliapp.runcmd(['git', 'remote', 'set-url', 'origin', url], cwd=confdir)
+
# The following sequence makes the working tree mirror
# current upstream git repository as closely as possible.