This patch series adds the ability for morph to show the path to artifacts in
the local artifact cache after building/retrieving them. This should reduce
the amount of grubbling around in the artifact cache post-build that developers
currently need to do.
Daniel Silverstone (2):
Add .artifact_filename() to external API of LocalArtifactCache
Always cache artifacts locally and report filenames during build.
morphlib/buildcommand.py | 6 ++++++
morphlib/localartifactcache.py | 3 +++
morphlib/localartifactcache_tests.py | 9 +++++++++
3 files changed, 18 insertions(+), 0 deletions(-)
I discussed this briefly with Rob T and we mentioned integration in the
context of "Baserock workflow" today, so here's a micro-summary in case
we're missing anything from the POV of integrators (who are generally
engineers who have been promoted, right?)
The workflow used in the kernel (work on individual feature branches
merged into a succession of hierarchical integration trees culminating
in one definitive source repo) is also common in big automotive projects.
IBM ClearCase is used by at least one of our customers; it's a huge
monolith, one feature is a proprietary VCS with "Activity-based Change
Management" which is basically the usual feature branch workflow but
wrapped up in different terms. Apparently "Tasks" can depend on other
"Tasks" in progress, so to meet expectations of those customers Morph
would need quite advanced rebase support as part of branch and merge,
too. Nobody wins if we just wrap 'git rebase', but maybe we could make
system branches able to "sit on top of" other system branches and pull
in the new changes from there every so often, which underneath would try
The other good thing for integrators is our CI, where I guess we're
ahead of comparable products already.
I'll add the branching as an idea later on; it would be handy if anyone
can fill in details, explain it more clearly or prove we don't need it.
Or anything else that might make Baserock attractive from an integration
perspective (am I right that they are closer to management than most
developers? in which case they are worth focusing on)
Quick implementation of 'morph foreach', good enough to do git
push/pull/status in all available repos in a system branch. I feel
we can make it more complex as and when we need it to be.
Sam Thursfield (3):
Add 'morph foreach'
Add failure test for 'morph foreach'
Update branching tests to use 'morph foreach'
morphlib/plugins/branch_and_merge_plugin.py | 44 ++++++++++++++++++++
.../edit-checkouts-existing-chunk.script | 9 ++--
.../edit-checkouts-existing-chunk.stdout | 7 +++-
tests.branching/edit-clones-chunk.script | 25 ++++-------
tests.branching/edit-clones-chunk.stdout | 17 +++++---
.../foreach-handles-command-failure.exit | 1 +
.../foreach-handles-command-failure.script | 28 +++++++++++++
.../foreach-handles-command-failure.stderr | 1 +
.../foreach-handles-command-failure.stdout | 2 +
9 files changed, 103 insertions(+), 31 deletions(-)
create mode 100644 tests.branching/foreach-handles-command-failure.exit
create mode 100755 tests.branching/foreach-handles-command-failure.script
create mode 100644 tests.branching/foreach-handles-command-failure.stderr
create mode 100644 tests.branching/foreach-handles-command-failure.stdout
* If the resultant diff after a merge is empty, Morph no longer tries
to commit, which results in it not crashing
* 'merge' merges to the correct branch, not always the TO system branch:
so if a chunk ref was 'master' in the TO branch its changes in the FROM
system branch will be merged back to 'master'.
* Morph copes with renamed chunks
* Morph detects if a chunk or stratum is new inside the branch, and
* Merge detects unmergable thinks like 'kind' being changed in a morphology.
* No rename detection (we won't have this for a while)
* I'm unsure how to deal with new chunks and strata in general, too -
to what branch do we merge into?
Sam Thursfield (6):
morph merge: Only update refs that were pointing at the 'from' branch
morph edit: Be more permissive checking out repos for system branches
morph merge: Merge changes in morphology contents
morph merge: Give full dir instead of repo name in merge errors
morph merge: Don't make a merge commit if only the refs changed
Add complex merge tests
morphlib/git.py | 10 +-
morphlib/plugins/branch_and_merge_plugin.py | 177 ++++++++++++++------
.../merge-handles-unmergable-cases.script | 30 ++++
.../merge-handles-unmergable-cases.stderr | 1 +
tests.branching/merge-not-to-master.script | 69 ++++++++
tests.branching/merge-with-chunk-renamed.script | 56 +++++++
tests.branching/merge-with-chunk-repo-moved.exit | 1 +
tests.branching/merge-with-chunk-repo-moved.script | 53 ++++++
tests.branching/merge-with-chunk-repo-moved.stderr | 1 +
tests.branching/merge-with-stratum-renamed.exit | 1 +
tests.branching/merge-with-stratum-renamed.script | 52 ++++++
tests.branching/merge-with-stratum-renamed.stderr | 1 +
tests.branching/merge.script | 2 +
tests.branching/merge.stdout | 2 +-
14 files changed, 400 insertions(+), 56 deletions(-)
create mode 100755 tests.branching/merge-handles-unmergable-cases.script
create mode 100644 tests.branching/merge-handles-unmergable-cases.stderr
create mode 100755 tests.branching/merge-not-to-master.script
create mode 100755 tests.branching/merge-with-chunk-renamed.script
create mode 100644 tests.branching/merge-with-chunk-repo-moved.exit
create mode 100755 tests.branching/merge-with-chunk-repo-moved.script
create mode 100644 tests.branching/merge-with-chunk-repo-moved.stderr
create mode 100644 tests.branching/merge-with-stratum-renamed.exit
create mode 100755 tests.branching/merge-with-stratum-renamed.script
create mode 100644 tests.branching/merge-with-stratum-renamed.stderr
There are many and varied reasons why the current style of git caching is bad.
Not least it is causing issues with branching and merging doing "unexpected"
things with older refs.
This series changes the repo caching to be bare mirrors and provides a script
to convert a current cache to the new layout.
Daniel Silverstone (6):
Update .gitignore to ignore tilde files.
Rework git caches to be bare mirrors of the repos.
Update unit tests for bare repo caches.
Rework the blackbox tests for bare caches.
Update the stderr and stdout files for the tests.
Script for converting git cache.
.gitignore | 1 +
morphlib/builder2.py | 20 ++++----
morphlib/cachedrepo.py | 35 +++++++++++--
morphlib/cachedrepo_tests.py | 20 ++++++--
morphlib/git.py | 49 +++++++++++++++++--
morphlib/localrepocache.py | 4 +-
morphlib/localrepocache_tests.py | 6 +-
morphlib/plugins/branch_and_merge_plugin.py | 5 ++-
scripts/convert-git-cache | 51 ++++++++++++++++++++
tests.branching/branch-cleans-up-on-failure.stderr | 2 +-
...reates-new-system-branch-not-from-master.script | 5 +-
...reates-new-system-branch-not-from-master.stdout | 10 ++--
.../branch-creates-new-system-branch.script | 3 +-
.../branch-creates-new-system-branch.stdout | 1 -
tests.branching/branch-works-anywhere.script | 12 +++--
tests.branching/branch-works-anywhere.stdout | 4 --
.../checkout-cleans-up-on-failure.stderr | 2 +-
tests.branching/checkout-existing-branch.script | 3 +-
tests.branching/checkout-existing-branch.stdout | 1 -
tests.branching/checkout-non-aliased-repos.script | 2 +
tests.branching/checkout-non-aliased-repos.stdout | 2 -
tests.branching/checkout-works-anywhere.script | 6 ++-
tests.branching/checkout-works-anywhere.stdout | 2 -
.../edit-checkouts-existing-chunk.stdout | 1 -
...edit-works-after-branch-root-was-renamed.script | 3 +-
...edit-works-after-branch-root-was-renamed.stdout | 2 -
tests/update-gits-chunk.script | 2 +-
tests/update-gits-stratum.script | 2 +-
28 files changed, 189 insertions(+), 67 deletions(-)
create mode 100755 scripts/convert-git-cache
Improves on the previous form:
ERROR: Failed to check out file://TMP/hello-lorried:baserock/newbranch
Sam Thursfield (1):
Give more useful errors when cloning from local cache fails
morphlib/cachedrepo.py | 27 +++++++++++++++++++--------
morphlib/cachedrepo_tests.py | 22 +++++++++-------------
2 files changed, 28 insertions(+), 21 deletions(-)