From d82cd9b6a7ffe40b9934c5031b0caae841afd7ca Mon Sep 17 00:00:00 2001 From: j Date: Sat, 30 May 2020 14:00:08 +0200 Subject: [PATCH] get current revno before switch --- update.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/update.py b/update.py index 2c1de7564..bfa0a0194 100755 --- a/update.py +++ b/update.py @@ -297,7 +297,7 @@ if __name__ == "__main__": ]: run_sql(sql) run(join(base, 'pandora/manage.py'), 'migrate', 'system') - + run(join(base, 'pandora/manage.py'), 'update_geoip') else: if len(sys.argv) == 1: branch = get_branch() @@ -316,13 +316,13 @@ if __name__ == "__main__": if exists(path): os.chdir(path) current_branch = get_branch(path) - if current_branch != branch: - run('git', 'remote', 'set-branches', 'origin', '*') - run('git', 'fetch', 'origin') - run('git', 'checkout', branch) - revno = get_version(path) if repo == 'pandora': pandora_old_revno = revno + if current_branch != branch: + run('git', 'remote', 'set-branches', 'origin', '*') + run('git', 'fetch', 'origin') + run('git', 'checkout', branch) + revno = get_version(path) current += revno url = repos[repo]['url'] print('Checking', repo)