| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Instead of leaving morph3 with a potentially confusing name, rename it
to `morphology` since it is now the only implementation of the
Morphology class.
|
|
|
|
|
|
|
| |
We don't use this any more, and instead prefer to always keep
definitions.git petrified, and update the refs ourselves.
branch-from-image still uses some of the remaining petrify code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
This is an inversion of the previous logic, which would strip the .morph
extension and use the "name" internally.
The exception to this rule of always using the filename, is that `morph
edit CHUNK` uses the name of the morphology as-defined in the stratum.
This is based off Adam Coldrick's inital patch, but this version will
allow the old style of providing the "name" by converting it into a path
if it does not have either a / or a . in it.
An unfortunate consequence of this change is that the show-dependencies
command's output changed, so the test needed updating.
|
|
|
|
|
|
| |
This was originally used by `morph edit`, but since we removed the need
to run `morph edit system stratum` and could shorten it to `morph edit
chunk`, this function is no longer used.
|
|
|
|
|
| |
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.
|
|
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.
|