From 73de8b77349d877e77299218a66bc0a62e60233e Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Thu, 22 Aug 2013 15:30:31 -0500 Subject: [PATCH] Use fetch and reset --hard, not checkout and pull --- teuthology/queue.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/teuthology/queue.py b/teuthology/queue.py index 319377a6c1..d9fb9841d2 100644 --- a/teuthology/queue.py +++ b/teuthology/queue.py @@ -20,6 +20,7 @@ def connect(ctx): port = ctx.teuthology_config['queue_port'] return beanstalkc.Connection(host=host, port=port) + def worker(): parser = argparse.ArgumentParser(description=""" Grab jobs from a beanstalk queue and run the teuthology tests they @@ -98,8 +99,9 @@ describe. One job is run at a time. cwd=os.getenv("HOME")) else: log.info("Pulling %s from upstream", teuthology_branch) - subprocess.Popen(('git', 'checkout', teuthology_branch), cwd=teuth_path) - subprocess.Popen(('git', 'pull'), cwd=teuth_path) + subprocess.Popen(('git', 'fetch', teuthology_branch), cwd=teuth_path) + subprocess.Popen(('git', 'reset', '--hard', 'origin/%s' % + teuthology_branch), cwd=teuth_path) log.info("Bootstrapping %s", teuth_path) subprocess.Popen(('./bootstrap'), cwd=teuth_path) teuth_bin_path = os.path.join(teuth_path, 'virtualenv', 'bin') -- 2.39.5