summaryrefslogtreecommitdiff
path: root/morphlib/morphset_tests.py
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2013-09-02 13:32:47 +0000
committerRichard Maw <richard.maw@codethink.co.uk>2013-09-05 09:46:37 +0000
commitb16e99a71980e9f10ff719d749ad8e453704ea83 (patch)
tree3084be822f8b0091eb98b0d62e168dc02b4a65b5 /morphlib/morphset_tests.py
parent400f77f81bc02c7c56f67f93d9eb53cbd08bf53d (diff)
downloadmorph-b16e99a71980e9f10ff719d749ad8e453704ea83.tar.gz
MorphSet: keep old ref as unpetrify-ref
This makes petrify much simpler, since adding unpetrify-ref is handled by MorphSet. This has the side-effect of adding unpetrify-ref when editing, but this information is also useful for this use-case. The edit tests now have different diffs and commits, so those have been updated. Also, the old merge code currently warns that now there appears to be petrified changes, since it detects if a branch is petrified by the presence of the unpetrify-ref field, even though the ref is not a SHA1. The old code does not handle undoing an edit the new way, so I did not feel it was worth attempting to comprehend it to fix this bug, which will be later fixed by the introduction of the new merge code.
Diffstat (limited to 'morphlib/morphset_tests.py')
-rw-r--r--morphlib/morphset_tests.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/morphlib/morphset_tests.py b/morphlib/morphset_tests.py
index 7dbc861a..65fe2058 100644
--- a/morphlib/morphset_tests.py
+++ b/morphlib/morphset_tests.py
@@ -127,7 +127,8 @@ class MorphologySetTests(unittest.TestCase):
{
'repo': 'test:morphs',
'ref': 'new-ref',
- 'morph': 'foo-stratum'
+ 'morph': 'foo-stratum',
+ 'unpetrify-ref': 'master',
})
def test_changes_stratum_ref_in_build_depends(self):
@@ -140,6 +141,7 @@ class MorphologySetTests(unittest.TestCase):
'repo': self.stratum.repo_url,
'ref': self.stratum.ref,
'morph': self.stratum['name'],
+ 'unpetrify-ref': 'master',
},
]
})
@@ -157,7 +159,8 @@ class MorphologySetTests(unittest.TestCase):
{
'repo': 'test:morphs',
'ref': 'new-ref',
- 'morph': 'foo-stratum'
+ 'morph': 'foo-stratum',
+ 'unpetrify-ref': 'master',
})
def test_changes_chunk_ref(self):
@@ -175,6 +178,7 @@ class MorphologySetTests(unittest.TestCase):
'repo': 'test:foo-chunk',
'ref': 'new-ref',
'morph': 'foo-chunk',
+ 'unpetrify-ref': 'master',
}
])