summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * Fix old cross-bootstrap testPedro Alvarez2013-12-201-1/+2
| |
| * Deploy and cross-bootstrap commands no longer validate host architectureBen Brown2013-12-202-0/+17
|/
* Merge branch 'benbrown/quote-filename-and-ref'Ben Brown2013-12-182-10/+15
|\
| * Quote ref and filenameBen Brown2013-12-182-10/+15
|/ | | | | | Previous fix only quoted URLs, which fixed petrify --no-git-update, but not the whole problem, quoting ref and filename prevents other problems that may be caused by non URL friendly characters.
* Merge branch 'benbrown/S9850/strip-morph-extension'Ben Brown2013-12-165-5/+38
|\
| * Modify morph to strip .morph extensions from parametersBen Brown2013-12-165-5/+38
|/
* Merge branch 'benbrown/S9823/petrify-no-update'Ben Brown2013-12-112-7/+9
|\
| * urllib: Convert URLs with non URL friendly characters into a valid format.Ben Brown2013-12-112-7/+9
|/
* Merge remote-tracking branch ↵Lars Wirzenius2013-11-2919-205/+972
|\ | | | | | | 'remotes/origin/baserock/richardmaw/S9475/refactor-build-cmd-v3'
| * plugins: Convert deploy to new classes.Richard Maw2013-11-291-85/+70
| | | | | | | | | | | | | | | | | | 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.
| * yarns: Change expected result of building uncommitted morphologiesRichard Maw2013-11-291-3/+1
| | | | | | | | | | The new build code uses `git update-index --add`, which means it can use morphologies that haven't previously been added.
| * plugins: Use new build command as defaultRichard Maw2013-11-292-2/+2
| | | | | | | | The old build is still around for comparison.
| * plugins: Add new build commandRichard Maw2013-11-291-0/+92
| | | | | | | | | | | | 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.
| * morphlib: Add BuildBranch abstractionRichard Maw2013-11-293-0/+263
| | | | | | | | | | | | | | This is an abstraction on top of SystemBranchDirectories, providing the ability to add uncommitted changes to the temporary build branch, push temporary build branches and retrieve the correct repository URI and ref to build the system.
| * branchmanager: Allow deferred and optional cleanup on success.Richard Maw2013-11-292-14/+179
| | | | | | | | | | | | | | | | | | | | | | | | Now it will optionally clean up on success based on a constructor parameter. It can be later cleaned up explicitly by calling close(). It is called close, rather than something more obvious, like cleanup(), since it means the manager can be re-used with contextlib.closing(). This now means that using the Managers without a context manager is less ugly, since you can explicitly call .close() in a finally block.
| * sysbranchdir: Move load_all_morphologies helper hereRichard Maw2013-11-293-10/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * yarns: un-parameterise architecture in system morphologiesRichard Maw2013-11-293-10/+18
| | | | | | | | | | | | It doesn't make sense to be able to specify an architecture from the IMPLEMENTS name, since you either need your architecture for something to build, or testarch for something that consistently doesn't build.
| * morphloader: use getattr for validate, set defaultsRichard Maw2013-11-291-16/+5
| | | | | | | | It saves some boilerplate.
| * validation: Require there be non-bootstrap chunks in systemsRichard Maw2013-11-293-8/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Bootstrap chunks don't make it into the final system, so there needs to be an extra check for empty systems after the sources have been collected. This was complicated slightly by the fact that if you try to build a chunk directly you will have no strata in your sources, hence no non-bootstrap chunks, but validation for having been told to build a chunk is best handled later. This amends the old yarns that depended on building a bootstrap chunk and adds a new one that explicitly builds a system with bootstrap chunks.
| * morphloader: Require systems have at least one stratumRichard Maw2013-11-294-48/+155
| | | | | | | | | | | | | | | | | | | | It doesn't currently make sense to build a system which contains no strata. We may later add other fields, such as initramfs to contribute to the system's artifact, but until then it's another bug to trip over. This uses collections.Sequence for checking the type of the systems entry in the morphology as a style choice, though it allows more flexibility if the types in the parsed morphology change.
| * morphloader: Set default values for cluster morphsRichard Maw2013-11-292-3/+54
| | | | | | | | | | | | | | | | This was omittted from the MorphologyLoader due to cluster morphologies being added at about the same time. This bug escaped detection since the MorphologyLoader was not required to deploy. It soon will be.
| * morphloader: Don't use ValueError exceptionRichard Maw2013-11-292-4/+26
| | | | | | | | | | Dedicated exceptions allow more fine-grained exception catching and can have extra data.
| * yarns: Correctly allow run_morph to output stderr on failureRichard Maw2013-11-291-7/+10
|/ | | | | Set -e meant that the stderr could never be re-output, catching the return code and re-outputting was not sufficient.
* Merge branch 'master' of git://git.baserock.org/baserock/baserock/morphLars Wirzenius2013-11-282-1/+2
|\
| * Merge branch 'baserock/pedroalvarez/ppc64-port'Pedro Alvarez2013-11-282-1/+2
| |\ | | | | | | | | | Reviewed-by: Lars Wirzenius
| | * Make morph able to use ppc64 architecture (POWER PC 64 bits)Pedro Alvarez2013-11-272-1/+2
| |/
* | Merge remote-tracking branch ↵Lars Wirzenius2013-11-281-0/+3
|\ \ | |/ |/| | | 'remotes/origin/baserock/ps/show-stratum-versions-in-build'
| * show which ref is expected for each stratum when preparing buildPaul Sherwood2013-11-211-0/+3
| |
* | Merge remote-tracking branch ↵Lars Wirzenius2013-11-2215-143/+1599
|\ \ | |/ |/| | | 'origin/baserock/richardmaw/S9475/build-refactor-foundations-v2'
| * morphlib: Add branch context managersRichard Maw2013-11-223-0/+490
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a LocalRefManager, which handles ref updates to local repositories (i.e. your workspace). It provides proxy methods for ref updates to a set of repositories. If an exception occurs in the body of the context manager, the updates will be rolled back to before the context manager was entered. The purpose for using a LocalRefManager instead of making the changes to the repositories directly, is to provide atomic updates to a set of refs in a set of repositories, where all refs are updated, or none are. This also adds a RemoteRefManager, which handles pushing branches to remote repositories. It provides a proxy push method, which will delete pushed branches, and re-push deleted branches after the context manager exits. Its purpose, instead of providing atomic updates to remote repositories, is to provide temporary branches. This is because it is used to provide temporary build branches. The difference between atomic update and temporary push, is that the remote branches are deleted when the context is left, rather than kept, as LocalRefManager does. The RemoteRefManager currently cannot provide the same atomicity guarantees as the LocalRefManager, so if there is a push between the branch being created and the RemoteRefManager cleaning it up, that change is lost without RemoteRefManager even knowing it existed. Git 1.8.5 will add functionality to make this possible.
| * GitDir: Add remote.push(RefSpec...)Richard Maw2013-11-222-0/+300
| | | | | | | | | | | | | | | | Remotes have a push method, which takes multiple RefSpecs, runs git push using arguments derived from the set of refspecs, then returns the push's result. If it fails the push, it will return the result in the exception.
| * GitDir: Add support for push urls in RemoteRichard Maw2013-11-222-19/+56
| |
| * GitDir: Split out Remote objectRichard Maw2013-11-223-25/+74
| | | | | | | | Operations on remotes are now accessed through this proxy object.
| * GitDir: Add methods for ref managementRichard Maw2013-11-222-0/+201
| |
| * GitDir: Add GitDirectory.commit_tree() methodRichard Maw2013-11-222-0/+53
| | | | | | | | | | This is used to create commit objects. This is used by build without commit to provide the behind-the-scenes history.
| * gitindex: Add GitIndex.write_tree()Richard Maw2013-11-222-0/+9
| | | | | | | | | | This generates a tree object from the index. This can then be used to create a commit.
| * gitindex: Add GitIndex.add_files_from_working_tree()Richard Maw2013-11-222-0/+43
| | | | | | | | | | | | | | | | | | | | This is like GitIndex.add_files_from_index_info, but uses the working tree and a list of paths. This is more convenient when the changes exist in the working tree. The comment describes its relationship with GitIndex.add_files_from_index_info, but it is faster, since it calls out to `git add` rather than calling out to `git hash-object` for every file.
| * gitindex: Add GitIndex.add_files_from_index_info()Richard Maw2013-11-222-0/+31
| | | | | | | | | | | | This is used to add files directly to the index, without touching the working tree. This is used in the build without commit code for creating new morphologies pointing to different branches.
| * gitindex: Add GitIndex.set_to_tree(treeish) methodRichard Maw2013-11-222-0/+13
| | | | | | | | | | | | | | This is used to set the state of the index to that of a previously known commit. This is needed for the build without commit logic, so that commits generated are that of the last commit in the repository and anything uncommitted.
| * GitDir: Add GitIndex classRichard Maw2013-11-226-38/+165
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * GitDir: add store_blob methodRichard Maw2013-11-222-0/+28
| | | | | | | | This is needed for making commits without touching the workspace.
| * util: Add helper for splitting up huge iterablesRichard Maw2013-11-222-0/+21
| | | | | | | | | | | | | | | | This is used to split a large iterable into more manageable chunks. This is important when a consumer can only handle so much input at once e.g. A program can take a large, but finite number of arguments, xargs exists to handle this for shell programs.
| * MorphologySet: Export traverse_specs methodRichard Maw2013-11-221-6/+6
| | | | | | | | | | | | | | | | The set of helpers isn't helping for re-usability, since every new use for the traverse_specs method is different enough that it is only used in one place. So just export traverse_specs itself and be done with it.
| * GitDir: Add resolve_ref_to_{commit,tree} methodsRichard Maw2013-11-222-5/+22
| | | | | | | | | | | | | | | | | | | | | | | | Some APIs should take SHA1 object IDs, there needs to be a way to get one from a ref. To handle this, we add APIs for getting either the commit or the tree pointed to by the ref. Commits are provided because we need to create commits from existing commits and update refs from existing values. Trees are provided because we need trees to create commits, and we can read trees into the index to eventually create another tree.
| * GitDir: Provide more specific object access than cat-fileRichard Maw2013-11-222-5/+29
| | | | | | | | | | | | | | 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.
| * GitDir: Allow config values ending in whitespaceRichard Maw2013-11-221-2/+2
| |
| * GitDir: remove duplicate definition of update_remotesRichard Maw2013-11-221-4/+0
| |
| * Remove unused invent_new_branch methodRichard Maw2013-11-221-12/+0
| |
| * yarns: Also output error messages to terminalRichard Maw2013-11-221-0/+3
| | | | | | | | | | Saving the result is useful for the tests, but diagnostics of failures are quicker if the result is printed to the terminal as well.
| * tests: Run style check before slower testsRichard Maw2013-11-212-59/+85
|/ | | | | | | | | | It turns out that only the check-copyright-year script was exiting properly, but it was not doing the deferred exit that other tests were doing. Other tests would set errors=1, then later check the result and exit if it's non-zero, however the errors variable was set in a sub-shell, since it was on the right-hand side of a pipe.