| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
This changes how CachedRepo runs git to get the SHA1 information
it needs, based on a suggestion by Richard Maw.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CachedRepo.resolve_ref does, effectively, this:
absref = git rev-parse --verify $ref
git log -1 --format=format:%T $absref
Roughly, "git rev-parse" takes any ref and returns the corresponding
SHA1. If the ref looks like a SHA1 (40 hex digits), it is returned
as-is, and despite --verify is not checked for existence.
"git log" then takes the SHA1 and returns the **tree** SHA1, as
opposed to the commit one, and if the commit doesn't exist, barfs.
The unit test for resolve_ref with an invalid SHA1 currently succeeds
for the wrong reason. The mocked _rev_parse fails for an unknown SHA1
(raising cliapp.AppException), which causes resolve_ref to raise
InvalidReferenceError, which the unit test expects. However, the real
implementation of _rev_parse wouldn't fail in that way, and so the
unit test doesn't test the thing it's meant to test: that resolve_ref
actually works the expected way for an unknown SHA1. What actually
happens is that resolve_ref calls _show_tree_hash, which raises
cliapp.AppException for an unknown SHA1, resulting in horror and
despair, instead of resolve_ref raising InvalidReferenceError.
This commit fixes the unit test so that it causes the right code
path in resolve_ref to be executed. This makes the unit test suite
to fail.
|
|\
| |
| |
| |
| | |
Reviewed by Lars Wirzenius
Reviewed by Richard Maw
|
| | |
|
| | |
|
|\ \
| | |
| | |
| | |
| | | |
Reviewed by: Lars Wirzenius
Reviewed by: Pedro Alvarezwq
|
| |/ |
|
|\ \
| | |
| | |
| | |
| | | |
Reviewed by Lars Wirzenius
Reviewd by Richard Ipsum
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
Changed the message according to suggestion by Rob Kendrick,
supported by Daniel Silverstone.
|
| | |/
| |/| |
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
Reviewed by: Lars Wirzenius
Reviewed by: Pedro Alvarez
|
| |/ / |
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
Reviewed-by: Lars Wirzenius
Reviewed-by: Richard Maw
|
| | | | |
|
| |/ / |
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
Reviewed-by: Lars Wirzenius
Reviewed-by: Richard Maw
|
| |/ / |
|
|\ \ \
| | | |
| | | |
| | | | |
Changed the error (exception) to list all obsolete fields.
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
ObsoleteFieldError
|
| | | | |
|
| | |/
| |/| |
|
| |/
|/|
| |
| |
| | |
Reviewed-by: Dan Firth
Reviewed-by: Richard Maw
|
| | |
|
|\ \
| | |
| | |
| | |
| | | |
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 provides access to the /baserock directory as if it were a dict,
abstracting away the details of how to get data out of it.
The abstraction is useful since it is easier to use than accessing
/baserock yourself, and allows the storage format to be changed more
easily.
Keys with / in may be supported in the future. since there have been
discussions about allowing morphologies to be placed in subdirectories.
Adding this support would require creating and removing directory
components when values are set and deleted respectively.
Iterating would require using os.walk instead of glob.iglob, since
python doesn't support ** in globs.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
|\ \ \
| |_|/
|/| |
| | |
| | | |
Reviewed-by: Lars Wirzenius
Reviewed-by: Jonathan Maw
|
| | | |
|
| | | |
|
| | | |
|
|/ / |
|
|\ \
| |/
|/|
| |
| | |
Reviewed-by: Richard Maw
Reviewed-by: Pedro Alvarez
|
| |
| |
| |
| |
| |
| |
| |
| | |
The cliapp formatting doesn't understand Markdown. Adding
Markdown support in Morph is more work than there is time
for right now, but we'll do it later. This quick hack just
means we output the raw Markdown rather than something that
is incomprehensible due to ruined formatting.
|
|\ \
| | |
| | |
| | |
| | | |
Reviewed-by: Lars Wirzenius
Reviewed-by: Daniel Silverstone
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This was missing from the test suite, and allowed a broken petrify to
slip through.
This was not added to the set of yarns, since they do not currently have
any build tests.
|
|/ / |
|
|\ \
| | |
| | |
| | |
| | | |
Reviewed-by: Pedro Alvarez <pedro.alvarez@codethink.co.uk>
Reviewed-by: Lars Wirzenius <lars.wirzenius@codethink.co.uk>
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|\ \
| |/
|/|
| |
| | |
Reviewed-by: Lars Wirzenius
Reviewed-by: Daniel Silverstone
|
| | |
|
| |
| |
| |
| |
| | |
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.
|