summaryrefslogtreecommitdiff
path: root/morphlib/plugins/branch_and_merge_plugin.py
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'baserock/richardmaw/misc-fixups'baserock/richardmaw/tmpRichard Maw2014-08-121-104/+15
|\ | | | | | | | | Reviewed-by: Daniel Silverstone Reviewed-by: Pedro Alvarez
| * Fix `morph edit` when repo has the same ref as system branchRichard Maw2014-08-121-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There was a check in it to see whether it needed to do the git branch and git checkout based on whether the name of the branch matched that in the morphology. This had a couple of problems: 1. Now that we aren't always building from HEAD, we need to be able to roll its commit back, so using the existing branch isn't always the best idea. 2. It only checks the "ref" field, not "unpetrify-ref", so even though we clone the right ref in there, it's checking the commit id against the system branch name, so would always try to re-create the branch, and fail when it already exists. So now, we remove the original ref and re-create it with our preferred HEAD. A better solution might be to change the clone logic to not automatically checkout HEAD, and instead require an explicit branch then checkout, but the initial clone logic is shared with build, and I didn't feel like tracking down all the different places that it was used.
| * Make morph show-branch-root print the pathRichard Maw2014-08-121-3/+4
| | | | | | | | | | | | | | | | | | The help for the show-branch-root command said it returns a path, but the command and the yarns just showed the aliased url it was cloned from. Given I found myself needing the path in some scripts, not the repo url, I think it's more useful to reconcile the difference this way.
| * Remove petrify and unpetrify commandsRichard Maw2014-08-121-98/+0
|/ | | | | | | We don't use this any more, and instead prefer to always keep definitions.git petrified, and update the refs ourselves. branch-from-image still uses some of the remaining petrify code.
* Use exact filenames to refer to morphology filesRichard Maw2014-07-101-2/+3
| | | | | | | | | | | | | | | | | | | Rather than repeatedly stripping and appending an optional .morph extension morphology names, instead always use the file path of the morphology relative to the definitions repository. This is an inversion of the previous logic, which would strip the .morph extension and use the "name" internally. The exception to this rule of always using the filename, is that `morph edit CHUNK` uses the name of the morphology as-defined in the stratum. This is based off Adam Coldrick's inital patch, but this version will allow the old style of providing the "name" by converting it into a path if it does not have either a / or a . in it. An unfortunate consequence of this change is that the show-dependencies command's output changed, so the test needed updating.
* Exorcise some old and unused commandsRichard Maw2014-07-071-1699/+536
| | | | | | | | | | | | | `morph merge` only worked for a small subset of cases, and has been left to bit-rot, since we don't use it. `morph tag` is just a `git tag` when we have petrified definitions repository. We don't use it, nor do we need it, so it can go away rather than take up valuable development time fixing it when requirements change. `old-foo` have all been superceded by newer versions and are no-longer used.
* Allow tagging branches with null refsRichard Maw2014-02-131-27/+13
| | | | | | | 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.
* plugins: Use new build command as defaultRichard Maw2013-11-291-1/+1
| | | | The old build is still around for comparison.
* Fix typoRichard Ipsum2013-11-061-1/+1
|
* Added scenario test for preventing building uncommitted systemsDaniel Firth2013-11-011-1/+8
|
* Building with references to tags will now instead use the underlying commitDaniel Firth2013-10-281-2/+3
|
* Tidy up debug output of morph buildDaniel Firth2013-10-281-1/+1
|
* build-without-push: Handle null repo/refRichard Maw2013-10-141-2/+2
| | | | | | | | | | | | | | 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.
* Merge remote-tracking branch 'origin/danielfirth/RT189'Lars Wirzenius2013-10-081-3/+0
|\ | | | | | | Changed the error (exception) to list all obsolete fields.
| * Dropped support for 'system-kind' from system morphology filesDan Firth2013-09-271-1/+0
| |
| * Dropped support for 'disk-size' from system morphology files'Dan Firth2013-09-271-2/+0
| |
* | B&M: refactor branch-from-imageRichard Maw2013-09-251-9/+3
|/ | | | | | | | | | | | 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.
* b&m: Use new-status as the defaultRichard Maw2013-09-171-1/+1
| | | | The previous status is currently still available as old-status.
* b&m: re-implement morph unpetrifyRichard Maw2013-09-051-1/+1
| | | | | | | | | | | | | | This also undoes the test suite change to keep it using the old petrify. Petrify and Unpetrify have the same structure: 1. Set up 2. Load all the morphologies 3. Make changes to the morphologies 4. Write back any changes This suggests some re-use in the form of passing a function callback to a morphology visitor.
* b&m: Re-implement morph petrifyRichard Maw2013-09-051-1/+1
| | | | | This includes amending the test suite to use the old petrify, since the old unpetrify depends on some implementation details of it.
* b&m: Re-implement morph foreachRichard Maw2013-09-041-1/+1
| | | | | | | | | | | | | | The previous version attempted to separate the output of the commands run with newlines by printing a newline at the beginning if it wasn't the first repository. The check it used was for the first repository was flawed by assuming that the root repository was the first repository processed. Since the complication was not worth keeping the output identical, it has been changed to separate by printing a newline after every command and the test output has been amended to include the extra trailing newline.
* Revert "Merge branch 'liw/restore-old-cmds'"Richard Maw2013-08-291-163/+3
| | | | | | | | | | | | | | | This reverts commit 2dc382a2a9ae977b1158002cd2631ec5593959c1, reversing changes made to 89a019af088ff62459699a6efdadf8ac8fe35dd9. We decided to restore the old commands for the release, as we weren't confident the new implementations were correct yet. To gain that confidence we need to use them, so the old versions are no longer available, and the new edit code is used when the edit subcommand is invoked. Doing so also requires the test suite to use the edit command instead of new-edit.
* Restore old branch and merge subcommandsLars Wirzenius2013-08-191-3/+163
| | | | | | | | | Most of the subcommands are available as "old-foo". The exception is edit, for which we've decided to stick with the old implementation by default. Thus the new implementation is "new-edit". This is all meant to be a safety net so that for BR10 we are not stuck in limbo in case the new implementations are broken in unexpected ways.
* Add support for a `cluster` type of morphology.Tiago Gomes2013-08-161-1/+8
| | | | Add the necessary tests to keep CoverageTestRunner happy.
* Re-implement "morph edit" using new infrastructureLars Wirzenius2013-08-141-2/+2
| | | | | | Test suite currently fails because MorphologyLoader validates differently from the old MorphologyFactory code, and because MorphSet changes refs more correctly (including, it seems, build-dependency refs).
* Re-implement "morph branch" using new infrastructureLars Wirzenius2013-08-061-42/+0
|
* Re-implement "morph show-branch-root" using new infrastructureLars Wirzenius2013-08-061-20/+0
|
* Re-implement "morph show-system-branch" using new infrastructureLars Wirzenius2013-08-061-8/+0
|
* Re-implement "morph checkout" using new infrastructureLars Wirzenius2013-08-061-37/+0
|
* Re-implement "morph workspace" using the Workspace classLars Wirzenius2013-07-311-7/+0
| | | | | | | | | Put new implementation into new branch and merge plugin, and remove old implementation from the old plugin. Also change the error message for the NotInWorkspace exception, so that it matches what the test suite expects. It's a crappy error message, I think, but I don't want to change external behaviour during refactoring.
* Re-implement "morph init" using the new Workspace classLars Wirzenius2013-07-311-45/+0
| | | | | | | Move "morph init" into a plugin, and remove it from the previously existing plugin. This keeps all the old, tricky code in the old plugin, and moves new, clean code into a new plugin. Eventually the old plugin can be removed, since it'll be empty.
* Add ARGS to the foreach argument synopsisTiago Gomes2013-07-221-2/+2
|
* Improve docstring for "morph tag"Lars Wirzenius2013-07-051-1/+22
|
* Improve docstring for "morph workspace"Lars Wirzenius2013-07-051-1/+1
|
* Improve docstring for "morph unpetrify"Lars Wirzenius2013-07-051-1/+5
|
* Improve docstring for "morph status"Lars Wirzenius2013-07-051-1/+11
|
* Improve docstring for "morph show-branch-root"Lars Wirzenius2013-07-051-1/+10
|
* Improve docstring for "morph show-system-branch"Lars Wirzenius2013-07-051-1/+1
|
* Improve docstring for "morph petrify"Lars Wirzenius2013-07-051-3/+35
|
* Improve docstring for "morph merge"Lars Wirzenius2013-07-051-2/+14
|
* Improve docstring for "morph init"Lars Wirzenius2013-07-051-1/+22
|
* Improve docstring for "morph foreach"Lars Wirzenius2013-07-051-1/+20
|
* Improve docstring for "morph edit"Lars Wirzenius2013-07-051-1/+59
|
* Improve docstring for "morph checkout"Lars Wirzenius2013-07-051-1/+19
|
* Improve docstring for "morph build"Lars Wirzenius2013-07-051-1/+25
|
* Improve docstring for "morph branch"Lars Wirzenius2013-07-051-1/+20
|
* Make morph petrify use the petrify_everything functionJonathan Maw2013-07-031-49/+2
|
* Revert "Merge branch 'jonathan/fix-petrify'"Daniel Silverstone2013-07-021-2/+49
| | | | | This reverts commit cc04afc00f35dc00e03c9ab207bbc2e5513812d0, reversing changes made to 656295846bffb4eda9fa3869d04fd7c042b2e37a.
* Make morph petrify use the petrify_everything functionJonathan Maw2013-07-021-49/+2
|
* Fix lines overflowing the 80 character limitRichard Dale2013-06-251-4/+8
|