diff options
author | Bob Mottram <bob.mottram@codethink.co.uk> | 2015-04-02 09:42:48 +0100 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2015-06-12 11:28:36 +0000 |
commit | 37cf384ae5d46e1c0b579e6d5de34b4e08ab1859 (patch) | |
tree | 30944da27373a00241049dac310c8bdcfa95d3b5 | |
parent | 78588d65c1e42b9690f5e6303690bcb9963100fa (diff) | |
download | firehose-37cf384ae5d46e1c0b579e6d5de34b4e08ab1859.tar.gz |
Log changed definitions
Change-Id: Ia2eb431d896b11af4f5ba582b8075a99cc6037d0
-rw-r--r-- | firehose/plugin/firehose_plugin.py | 3 |
1 files changed, 3 insertions, 0 deletions
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 |