From 37cf384ae5d46e1c0b579e6d5de34b4e08ab1859 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 2 Apr 2015 09:42:48 +0100 Subject: Log changed definitions Change-Id: Ia2eb431d896b11af4f5ba582b8075a99cc6037d0 --- firehose/plugin/firehose_plugin.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/firehose/plugin/firehose_plugin.py b/firehose/plugin/firehose_plugin.py index fdd5b20..7229830 100644 --- a/firehose/plugin/firehose_plugin.py +++ b/firehose/plugin/firehose_plugin.py @@ -177,8 +177,10 @@ class FirehosePlugin(cliapp.Plugin): def reset_to_tracking(self, root): logging.info('reset_to_tracking') + # Obtain the head of the repo branch_head_sha = self.app.runcmd(['git', 'rev-parse', 'HEAD'], cwd=self.gitpath).strip() + # Do a hard reset to the master branch self.app.runcmd(['git', 'reset', '--hard', 'origin/%s' % root['baseref']], cwd=self.gitpath) self.app.runcmd(['git', 'reset', '--soft', branch_head_sha], @@ -309,6 +311,7 @@ class FirehosePlugin(cliapp.Plugin): self.loader.unset_defaults(morph) self.loader.save_to_file( self.sb.get_filename(morph.repo_url, morph.filename), morph) + logging.info('Changed definition: '+morph.repo_url+' '+morph.filename) morph.dirty = False return True -- cgit v1.2.1