'morph edit' overwrites local changes
sam.thursfield at codethink.co.uk
Tue Jan 22 13:08:23 GMT 2013
It's rather easy for a user to do the following:
1. morph branch baserock:baserock/morphs my-branch
2. edit foundation.morph in my-branch and add a new chunk
3. morph edit base-system-x86_64-generic foundation my-chunk
At this point morph copies the version of foundation.morph from the
'baserock/releases/water-bomb' ref and overwrites the user's local
changes, and then complains about a missing chunk.
This is a symptom of the rather confusing working directory we present
to the user when they branch a morphs repository: the stratum
morphologies are available, but until the user runs 'morph edit' on that
stratum they may be completely unrelated to what is actually built
because the systems may specify a different ref.
We could avoid this confusion by implicitly running 'morph edit' for any
strata that are contained in the root repository when the system branch
is checked out. When a stratum in a separate repository is checked out,
all strata in that repository should be edited too. 'morph merge' should
be responsible for resolving everything that hasn't changed back to
where it was when the branch is merged.
I don't have any more time to spend on this right now, but I think it
needs to be fixed along with with the rest of the system branch changes.
More information about the baserock-dev