summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEllis Barnwell <ellis.barnwell@codethink.co.uk>2021-10-13 14:07:08 +0100
committerEllis Barnwell <ellis.barnwell@codethink.co.uk>2021-10-13 13:12:48 +0000
commitdfc54e2a59819fcd683b3624f33626c771d7730f (patch)
tree8662456367091e07579821075686c047c5185ccf
parentc91df88eef95a0a8ad5545d66b0f6ddedbe7da01 (diff)
downloadlorry-controller-dfc54e2a59819fcd683b3624f33626c771d7730f.tar.gz
Ensure that origin url is set to what's in settings
-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.