| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
Rather than repeatedly stripping and appending an optional .morph extension
morphology names, instead always use the file path of the morphology
relative to the definitions repository.
Also, make the repo and ref of chunk morphology triplets be some branch
of the definitions repository, rather than the repo/ref given in the
morphology itself (which is the location of the chunk source).
|
| |
|
|
|
|
|
|
|
|
| |
The set of helpers isn't helping for re-usability, since every new use
for the traverse_specs method is different enough that it is only used
in one place.
So just export traverse_specs itself and be done with it.
|
| |
|
|
|
|
|
| |
Add an unpetrify method to MorphSet, since it's a good place to put it
and may be needed for merge.
|
|
|
|
|
| |
This is used to change all the refs of the morphologies in the root
repository to point to the system branch instead.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
petrify_chunks handles regular petrification and branch_from_image's
petrifying to another point in time.
It is given the values to petrify to, instead of doing the ref resolution
itself, since now it will consistently resolve refs to the same thing,
and a different resolution can be passed in to petrify to another point
in time.
It only petrifies chunks, since petrifying strata and systems is a more
complex operation that is not currently handled anyway.
|
|
|
|
|
|
|
| |
This will be used to factor the morphology traversal code out of petrify,
since it is cleaner to find out which refs are present, resolve them,
then update them, instead of the previous approach which updated as part
of the traversal.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
The old code worked, but it was depending on really obscure details
of how the Python scoping works. This commit changes it to not do
that anymore.
|
|
Various parts of Morph need to change a set of morphologies at once,
particularly for petrification and unpetrification. This is easiest
done by loading all the morphologies into memory at once, and changing
them there, then saving again.
|