| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
This reverts commit ab0a83a09a93ca33aa402d9c4d3b916a48a1a882.
|
| |
|
| |
|
|
|
|
|
|
|
| |
This includes various changes allowing the repo and ref fields to be
missing; but also a change to the the component_key function, so that
instead of generating a string, it returns a tuple, since it's only
required to be a consistently hashable index.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
It now does not push branches as this is not necessary to locate the
artifact.
It still makes temporary build branches, since it is assumed that if
you have changes in your workspace, it's preferable for the deploy to
fail, rather than think you've deployed something you haven't.
|
|
|
|
| |
The old build is still around for comparison.
|
|
|
|
|
|
| |
This uses all the new APIs, so the code is shared across morphlib and
unit tested rather than everything being in one massive plugin that is
only black-box tested.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was previously a private method of the branch and merge
plugin, but it's useful to other plugins, so has been moved to the
SystemBranchDirectory class, where everything else can get to it.
It has an unpleasant amount of coupling to other classes, but in a *good*
object oriented design it would either be a tiny module on its own,
or not exist and leave all its users to re-implement the same logic
multiple ways, so we've opted for a less clean, but more useful design.
It is left un-covered by the unit tests, since it requires a great deal
of instrumentation to test, at which point it may be best to leave it
to integration tests.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This represents the state of the index of a GitDirectory.
Methods that use the index are now used via the GitIndex class, rather
than using the default index, as previously used when the methods were
in GitDirectory.
GitIndex may be constructed with an alternative path, which can be used
to manipulate a git checkout without altering a developer's view of the
repository i.e. The working tree and default index.
This is needed for `morph build` and `morph deploy` to handle the build
without commit logic.
|
|
|
|
|
|
|
| |
We need to use cat-file for files by SHA1, commits by SHA1 and files by
ref and path, so provide access in separate methods, since while it's
all the same thing "under the hood", it avoids the user needing to know
the command-line syntax.
|
| |
|
| |
|
|
|
|
| |
argument
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This wasn't working, since the build-without-push code works by including
morphologies that have had their ref changed to the branch's name.
This is not done by edit if it is null, since the extra ref resolution
can cause interesting issues.
Instead of changing edit to continue to alter the ref, build will now
allow null meaning this current repo/ref.
This has the side-effect of also checking morphologies referred to by
a null ref, even if they aren't altered, but it still works correctly.
|
|\
| |
| |
| |
| | |
Reviewed by: Lars Wirzenius
Reviewed by: Pedro Alvarezwq
|
| | |
|
|\ \
| | |
| | |
| | |
| | | |
Reviewed by Lars Wirzenius
Reviewd by Richard Ipsum
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
Reviewed-by: Lars Wirzenius
Reviewed-by: Richard Maw
|
| | |/
| |/| |
|
|\ \ \
| |/ /
|/| |
| | | |
Changed the error (exception) to list all obsolete fields.
|
| | | |
|
| | | |
|
| |/ |
|
|\ \
| | |
| | |
| | |
| | | |
Reviewed-by: Lars Wirzenius <lars.wirzenius@codethink.co.uk>
Reviewed-by: Jonathan Maw <jonathan.maw@codethink.co.uk>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This changes the interface of branch-from-image to only take 1 parameter,
the name of the new system branch, as the root repository is loaded from
the metadata.
This was also what the previous version of branch-from-image did, but
that silently ignored the parameter.
Given there are not many users of branch-from-image, I felt it was a
reasonable change.
|
| | | |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This creates an object that the with statement can use to handle the
context and clean up the workspace if the body raises an exception.
This is roughly equivalent to having a function that takes a callback of
what to do while the branch is being initialized, but with less
boilerplate at the call site.
contextlib is used to create a context manager from a generator
function. This is less verbose than defining a class with __enter__
and __exit__ methods.
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This does three things:
1. It makes sure that the native-bootstrap script terminates if
any steps fail.
2. It installs files to a temporary directory, then copies them out,
so that builds don't break in cases where we delete files from
DESTDIR.
3. It makes appropriate minor fixes so that a cross-bootstrap build
can happen from beginning to end.
Note: native-bootstrap does not succeed in every case. It has been
observed to fail in an x86_64 virtual machine.
|
| |
|
| |
|
| |
|
|
|
|
| |
The previous status is currently still available as old-status.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This currently performs the workspace-wide status, but not the
system-branch status functionality of the older status subcommand.
A quick estimate showed the new code to be 5x faster, comparing
# time (echo 2 >/proc/sys/vm/drop_caches; morph status)
System branches in current workspace:
baserock/richardmaw/S8537/ssh-copy-id
baserock/richardmaw/S8564/ro-staging-area
baserock/richardmaw/S8591/lzo-shared
baserock/richardmaw/cliapp-pipefail
baserock/richardmaw/malformed-strata-test
master
tutorial-1/tutorial/master
tutorial-1/tutorial/update-ssh
real 0m2.517s
user 0m0.998s
sys 0m1.482s
# time (echo 2 >/proc/sys/vm/drop_caches; morph new-status)
System branches in current workspace:
baserock/richardmaw/S8537/ssh-copy-id
baserock/richardmaw/S8564/ro-staging-area
baserock/richardmaw/S8591/lzo-shared
baserock/richardmaw/cliapp-pipefail
baserock/richardmaw/malformed-strata-test
master
tutorial-1/tutorial/master
tutorial-1/tutorial/update-ssh
real 0m0.506s
user 0m0.207s
sys 0m0.233s
|
|\
| |
| |
| |
| |
| |
| |
| | |
Reviewed-by: Lars Wirzenius
Reviewed-by: Daniel Silverstone
Daniel gave his +1 with the caveat that he would like tests for
petrifying a system branch other than master.
|