From f58e5f85d135d00f92116a97bb8bce82d46f0d36 Mon Sep 17 00:00:00 2001 From: Richard Maw Date: Thu, 19 Sep 2013 09:48:06 +0000 Subject: MorphSet: Factor traversal logic out of change_ref Tweaking all the morphology specs in a MorphologySet is a common operation. - Edit does it to rewrite refs - petrify does it to fix refs to their state at the current point in time - unpetrify does this to reverse the petrify operation - branch-from-image works similarly to petrify After the refs inside morphologies are tweaked, any morphologies in the MorphSet that are referred to by the changed ref are also updated. This was previously an operation of change_ref, but it will be useful for the other use cases. Changes other than refs are not handled, since there are currently no use cases for it. --- morphlib/morphset_tests.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'morphlib/morphset_tests.py') diff --git a/morphlib/morphset_tests.py b/morphlib/morphset_tests.py index 65fe2058..69a7057f 100644 --- a/morphlib/morphset_tests.py +++ b/morphlib/morphset_tests.py @@ -145,6 +145,9 @@ class MorphologySetTests(unittest.TestCase): }, ] }) + other_stratum.repo_url = 'test:morphs' + other_stratum.ref = 'master' + other_stratum.filename = 'other-stratum.morph' self.morphs.add_morphology(self.system) self.morphs.add_morphology(self.stratum) -- cgit v1.2.1