| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
This should not normally be used, because we make no attempt to detect
when a full URL and a keyed URL are equivalent, so they cannot be used
interchangably.
However, 'foreach' would previously fail completely if the branch root
happened to be a full URL because it didn't call convert_uri_to_path()
correctly.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We often have .gitmodules edited to contain a URI such as
upstream:gnulib, so that we can transparently mirror these in different
locations.
It would be nice to set up git url.insteadOf rules to expand these for
the submodules, but 'git submodule update' uses 'git clone' to fetch
them, which will not take into account the configuration of the
parent repository.
Instead, we set up the submodules automatically and rewrite the URLs
directly in the configuration. The user will need to recreate their
system branch checkouts if their URL configuration changes, or update
the URLs manually, but that should not happen often.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Upsides:
- clearer error messages on conflicts (we no longer dump the git
output)
- merge base is available during morphology merging
- we no longer need to go through the complexity of implementing a
git merge driver
We now manually fetch and then merge, instead of using git pull. This
is not strictly necessary, but it makes it clearer in the code how
FETCH_HEAD is involved in the process.
|
|
|
|
|
|
|
|
|
|
| |
The rationale here is that inside a checkout of a system branch, the
user should only be committing to the refs for that system branch,
because those are the only ones that 'morph merge' will look at.
This removes a problem where we could be confused by a ref with a
name that would be sorted before 'master' in the result of 'git
show-ref'.
|
|
|
|
|
|
| |
Previously we had to manually use git merge to resolve the ref
conflicts in the morphologies, but the morphology merge driver
now takes care of them.
|
|
|
|
|
|
|
|
|
|
| |
We now have a two-stage merge process. Stage one only runs if there
are changes in both branches on the same file. At the end of stage
one we assume that all the components that were edited in the FROM
branch still have their 'ref' field set to the FROM branch. Morph
then iterates through these repositories, performing a merge in each
one, and then updates the refs in the morphologies again with the
correct target branches.
|
|
|
|
|
| |
This code made no sense, but since the previous command was expected
to fail it didn't have any effect on the test.
|
|
|
|
|
| |
These do need to be quite clear, because merge failures will happen a
lot and we are relatively unhelpful at the moment.
|
| |
|
| |
|
|
|
|
|
| |
Our non-destructive morphology editing requires at least Python 2.7,
which is not available on Squeeze.
|
|
|
|
|
| |
Make sure we don't lose the 'unpetrify-ref' field in this case, or
unpetrify will break.
|
|
|
|
| |
Split out the external strata scripts to share between workflow tests.
|
|
|
|
| |
Tested in the petrify test, to avoid duplication.
|
| |
|
|
|
|
|
|
| |
Use cliapp.Application.runcmd_unchecked() instead of runcmd() to get
the full command output, without requiring AppException.msg (which is
an inferior way to get the output in any case)
|
| |
|
| |
|
|
|
|
|
| |
We now add the strata in one branch, merge, and then make the changes
in another.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Spot completely unmergable cases
* Make sure that changes in a chunk repo are merged to the back to
that chunk's original ref, which is not necessarily the same as
the TO system branch.
* Test renaming a chunk (works fine if repo is the same)
* Try adding a new chunk or stratum and editing it too.
|
|
|
|
| |
'git commit' fails if there are no changes in any case.
|
|
|
|
|
|
| |
Rework the test outputs to match reality. This is due to tweaks in how morph
edit/checkout gets its repository now that the copy-from-cache is marginally
more like a traditional clone in terms of what you get at the end.
|
|
|
|
|
|
| |
This reworks the blackbox tests to work with the bare repository caches. For
the most part it's slight changes to error messages and tweaks to ignore the
repository caches during file listing.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This requires disabling the feature that retains the original order of
fields in a morphlogy when it gets overwritten. The implementation relies
on features that are not available in Python 2.6. We need to support
Morph on Debian squeeze, for bootstrapping purposes, and therefore need
to have it work with Python 2.6. However, the morphology rewriting is
only relevant for system branching and merging, and that isn't needed
for bootstrapping, so we disable the affected tests on Python 2.6.
|
|
|
|
|
|
| |
Move this into a script which can be sourced by the 'setup' scripts
and the actual tests (this is needed as the environment in 'setup' is
not passed on to the tests).
|
|\
| |
| |
| | |
git://roadtrain.codethink.co.uk/baserock/morph
|
| |
| |
| |
| | |
Update merge test to check the message.
|
|/
|
|
|
|
|
|
|
| |
This gives us consistency with morphologies, where the triplets are
repo|ref|morphology, not repo|ref|filename
Anyone who runs 'morph build baserock:morphs master system.morph' will
now see an error ending with 'was looking for system.morph.morph', which
should make it clear where they have gone wrong.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
'merge' now traverses every system in the branch root (baserock:morphs)
and merges any chunk or stratum that was changed with 'morph edit'. It
also takes care of updating the refs in the target branch.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This new command does a lot. First of all, its command line interface
has now changed to 'morph build SYSTEM' and it needs to be run from
a system branch.
When called, the new 'build' command will identify the repositories
and morphologies involved in building the system from the system branch,
create a build ref behind the scenes based on the system branch and add a
commit with all uncommitted changes to this build branch for every repo
involved. It will then push those build branches to the repository server
and kick off a build of BRANCH_ROOT BUILD_BRANCH SYSTEM.morph.
After building has finished, the remote build branches will be
deleted again.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Editing no longer requires a repository to be specified, neither does
it require a branch.
It now starts off from a system morphology that is required to exist
in the branch root repository. Relative to this system, "morph edit"
realises the repository of a stratum and, optionally, a chunk, creates
edit branches named after the system branch, if necessary, and update
the references in the system and stratum morphology accordingly.
The changes made to any of the repositories in the system branch
are not committed.
All existing changes are updated to work with this new input syntax
for "morph edit".
|
|\
| |
| |
| |
| | |
Conflicts:
morphlib/plugins/branch_and_merge_plugin.py
|
| |
| |
| |
| |
| |
| |
| |
| | |
This is more flexible than relying on the branch root repository
directory to have the original name. The user might rename the
branch root directory and we still want to be able to find it.
Add a test that this new functionality works.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We do this by storing a morph.repository option in the local clone's
.git/config file. This way the user can rename local repositories or
move them around in a system branch in whatever way he or she likes
and we can still find the repository later by the same name.
Previously, we could only identify repositories in a system branch
by their directory name. Now things are more flexible and tolerant
of "unexpected" user behavior.
|
|/
|
|
|
|
|
| |
This way we can store more branch config options in the future more
conveniently without having store them all in separate files or writing
our own code to parse the options into a branch config object or
something like that.
|
| |
|
|
|
|
|
|
|
|
|
| |
Doing this rather than creating the system branches in the current working
directory allows "morph branch" and "morph checkout" to be run anywhere in
the workspace (e.g. in a different branch).
This commit also adds two tests to verify that new branches are always
created in the toplevel workspace directory.
|
|
|
|
|
|
|
|
| |
This commit introduces a new "morph show-branch-root" command to print
the repository that the user branched off from with "morph branch" or
that he or she checked out with "morph checkout".
Also add tests for this new command.
|
|\
| |
| |
| |
| | |
Conflicts:
morphlib/plugins/branch_and_merge_plugin.py
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is complementary to adding a repository parameter to the "morph
checkout" command. It allows to branch off arbitrary repositories
rather than always branching off baserock:morphs.
All affected tests are updated to provide and work with this new
parameter.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
With this commit, "morph branch" and "morph checkout" remember the
repository that was branched off from (the "branch root") in a special
file called
$workspace/$branch/.morph-system-branch/branch-root
This information is later used when checking out individual
repositories using "morph edit" instead of using the previously
hard-coded "$workspace/$branch/morphs" repository as the branch
root.
This commit also updates the "morph merge" code to handle repositories
specified with aliases or as full URLs in the same way "morph checkout"
does.
All affected tests are updated.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Instead of hard-coding "baserock:morphs" as the repository we check out
from, we want to allow people to check out from arbitrary repositories
with system and stratum morphologies.
This commit adds a mandatory repository parameter to "morph checkout".
This parameter can either be an aliased repo, e.g. baserock:morphs, or
a full repo URL such as ssh://gitano@git.baserock.org/baserock/morphs.
When cloning the actual repository into a local directory, the following
happens:
For alias repos baserock:morphs and baserock:foo/bar, the repositories
would be cloned into the directories
$workspace/$branch/baserock:morphs
and
$workspace/$branch/baserock:foo/bar.
For repos specified using full URLs, the scheme and .git suffix (if
present) are stripped off. The above ssh example would be cloned into
the following directory:
$workspace/$branch/gitano@git.baserock.org/baserock/morphs
This commit also adjusts all affected tests and adds a new test to
verify that checking out from full repo URLs works as expected.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There are mainly three situations to deal with:
1. We are outside a workspace and cannot deduce the system branch.
2. We are inside a workspace and inside a branch. We can detect this
by walking up from the working directory towards the workspace.
If we find a .morph-system-branch in one of the parent directories,
we know the branch name. If we don't find one, something is wrong.
3. We are inside a workspace but outside a branch (or partially into
a branch, e.g. in foo/ where the branch is foo/bar). We can deduce
the branch if we recurse into subdirectories to find a
.morph-system-branch directory. Care needs to be taken to not
recurse infinitely. We may also not recurse if there are multiple
subdirectories as these could belong to two different branches.
This commit makes "morph show-system-branch" work in all of the above
scenarios. It also adds tests for all of them.
|