diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2012-09-20 15:46:30 +0100 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2012-09-21 16:06:08 +0100 |
commit | d473e869cb2ad2fa54696f0336ade1c1fbb0ec84 (patch) | |
tree | 0fdc52f4ceac0ffe1cd23cff2d9ec4d1b015ff7b /morphlib/plugins | |
parent | e0deb3a680fc3068ef72355f3c7e53b1f059e280 (diff) | |
download | morph-d473e869cb2ad2fa54696f0336ade1c1fbb0ec84.tar.gz |
morph edit: unpetrify before editing, if need be
If the user explictly asks to edit a chunk, we can assume that they
do not want it to be petrified any longer.
Also, 'git clone -b' will fail if given a SHA1 instead of an actual
ref.
Diffstat (limited to 'morphlib/plugins')
-rw-r--r-- | morphlib/plugins/branch_and_merge_plugin.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/morphlib/plugins/branch_and_merge_plugin.py b/morphlib/plugins/branch_and_merge_plugin.py index 92c716a5..441a2131 100644 --- a/morphlib/plugins/branch_and_merge_plugin.py +++ b/morphlib/plugins/branch_and_merge_plugin.py @@ -502,6 +502,10 @@ class BranchAndMergePlugin(cliapp.Plugin): return stratum_repo_dir def edit_chunk(self, system_branch, branch_dir, stratum_repo_dir, chunk): + if 'unpetrify-ref' in chunk: + chunk['ref'] = chunk['unpetrify-ref'] + del chunk['unpetrify-ref'] + # Make the chunk repository and the ref available locally. chunk_repo_dir = self.checkout_repository( branch_dir, chunk['repo'], system_branch, |