summaryrefslogtreecommitdiff
path: root/tests.branching
Commit message (Collapse)AuthorAgeFilesLines
...
| * morph status: Sort list of system branches in a workspaceSam Thursfield2012-10-181-1/+1
| | | | | | | | | | Output needs to be stable, not least so that the test doesn't fail sporadically.
* | morph petrify: Avoid petrifying chunks that have already been editedSam Thursfield2012-10-184-5/+91
|/ | | | | | | | | | | | | This change causes 'morph petrify' to avoid petrifying any chunk whose ref matches the current system branch, because it makes no sense to petrify something that is also being edited. It also improves efficiency slightly and adds warning where different systems point to different refs of the same stratum. A non-obvious effect of this is that if you try to petrify 'master', many of the chunks won't get petrified because they are built from 'master'. However, petrifying master makes no sense so I'm not sure that we need to worry.
* morph status: Add initial version of commandSam Thursfield2012-10-126-0/+106
| | | | This provides a user-friendly summary of the workspace or branch status.
* Merge remote-tracking branch ↵Daniel Silverstone2012-10-114-1/+36
|\ | | | | | | | | | | 'origin/samthursfield/S4873-warn-when-merge-causes-petrification' Renamed petrification test slightly as merge fixup.
| * Add test for petrify warningSam Thursfield2012-10-112-0/+33
| |
| * morph merge: Warn if a merge will cause unexpected petrificationSam Thursfield2012-10-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The concept of a component path is new. This is simply a concise way of referring to a component in an error message, and looks like this: base-system-x86_64-generic.bsp-x86_64-generic.linux We currently only touch the 'edited chunks' in merge_stratum(), i.e. those in the FROM branch where 'morph edit' was run. However, the petrification can affect any chunk so there is a new method added to obtain all components in a morphology. This function also returns the differences between the two, which we will make use of at a later date.
| * Fix test that should have been doing 'morph edit'Sam Thursfield2012-10-111-0/+2
|/
* morph foreach: Handle repos addressed by full URLs correctlySam Thursfield2012-10-102-0/+30
| | | | | | | | | | This should not normally be used, because we make no attempt to detect when a full URL and a keyed URL are equivalent, so they cannot be used interchangably. However, 'foreach' would previously fail completely if the branch root happened to be a full URL because it didn't call convert_uri_to_path() correctly.
* Handle submodules in 'morph edit'Sam Thursfield2012-10-032-0/+71
| | | | | | | | | | | | | | | | We often have .gitmodules edited to contain a URI such as upstream:gnulib, so that we can transparently mirror these in different locations. It would be nice to set up git url.insteadOf rules to expand these for the submodules, but 'git submodule update' uses 'git clone' to fetch them, which will not take into account the configuration of the parent repository. Instead, we set up the submodules automatically and rewrite the URLs directly in the configuration. The user will need to recreate their system branch checkouts if their URL configuration changes, or update the URLs manually, but that should not happen often.
* Fix after reviewSam Thursfield2012-10-032-1/+1
|
* morph merge: Rework how we interact with gitSam Thursfield2012-10-036-24/+9
| | | | | | | | | | | | | Upsides: - clearer error messages on conflicts (we no longer dump the git output) - merge base is available during morphology merging - we no longer need to go through the complexity of implementing a git merge driver We now manually fetch and then merge, instead of using git pull. This is not strictly necessary, but it makes it clearer in the code how FETCH_HEAD is involved in the process.
* Use origin/ref for all refs other than the system branch ref itselfSam Thursfield2012-10-031-0/+49
| | | | | | | | | | The rationale here is that inside a checkout of a system branch, the user should only be committing to the refs for that system branch, because those are the only ones that 'morph merge' will look at. This removes a problem where we could be confused by a ref with a name that would be sorted before 'master' in the result of 'git show-ref'.
* Remove obsolete merging hack from merge conflict testSam Thursfield2012-09-271-12/+0
| | | | | | Previously we had to manually use git merge to resolve the ref conflicts in the morphologies, but the morphology merge driver now takes care of them.
* morph merge: Use a special git merge driver for morphology filesSam Thursfield2012-09-273-5/+6
| | | | | | | | | | We now have a two-stage merge process. Stage one only runs if there are changes in both branches on the same file. At the end of stage one we assume that all the components that were edited in the FROM branch still have their 'ref' field set to the FROM branch. Morph then iterates through these repositories, performing a merge in each one, and then updates the refs in the morphologies again with the correct target branches.
* Remove dead code from the end of testSam Thursfield2012-09-271-20/+1
| | | | | This code made no sense, but since the previous command was expected to fail it didn't have any effect on the test.
* morph merge: Error message wranglingSam Thursfield2012-09-272-2/+2
| | | | | These do need to be quite clear, because merge failures will happen a lot and we are relatively unhelpful at the moment.
* Fix merge tests on Squeeze, by disabling them correctlySam Thursfield2012-09-274-1/+18
|
* Add merge conflict testsSam Thursfield2012-09-258-0/+239
|
* Disable tests on Debian Squeeze that require Python 2.7Sam Thursfield2012-09-245-1/+28
| | | | | Our non-destructive morphology editing requires at least Python 2.7, which is not available on Squeeze.
* Test that 'petrify' is safe against multiple invocationsSam Thursfield2012-09-212-0/+54
| | | | | Make sure we don't lose the 'unpetrify-ref' field in this case, or unpetrify will break.
* Add petrify/unpetrify workflow testSam Thursfield2012-09-214-112/+355
| | | | Split out the external strata scripts to share between workflow tests.
* Add 'morph unpetrify'Sam Thursfield2012-09-212-0/+21
| | | | Tested in the petrify test, to avoid duplication.
* morph petrify: Rewrite in the style of todaySam Thursfield2012-09-212-3/+3
|
* morph foreach: Fix with cliapp < 1.20120630Sam Thursfield2012-09-211-1/+1
| | | | | | Use cliapp.Application.runcmd_unchecked() instead of runcmd() to get the full command output, without requiring AppException.msg (which is an inferior way to get the output in any case)
* Update branching tests to use 'morph foreach'Sam Thursfield2012-09-174-31/+27
|
* Add failure test for 'morph foreach'Sam Thursfield2012-09-174-0/+32
|
* tests.branching: Make workflow test to use system branches moreSam Thursfield2012-09-171-9/+39
| | | | | We now add the strata in one branch, merge, and then make the changes in another.
* tests.branching: Add complex merge testsSam Thursfield2012-09-1711-0/+265
| | | | | | | | | | | | * Spot completely unmergable cases * Make sure that changes in a chunk repo are merged to the back to that chunk's original ref, which is not necessarily the same as the TO system branch. * Test renaming a chunk (works fine if repo is the same) * Try adding a new chunk or stratum and editing it too.
* morph merge: Don't make a merge commit if only the refs changedSam Thursfield2012-09-142-1/+3
| | | | 'git commit' fails if there are no changes in any case.
* Update the stderr and stdout files for the tests.Daniel Silverstone2012-09-1410-21/+6
| | | | | | Rework the test outputs to match reality. This is due to tweaks in how morph edit/checkout gets its repository now that the copy-from-cache is marginally more like a traditional clone in terms of what you get at the end.
* Rework the blackbox tests for bare caches.Daniel Silverstone2012-09-147-11/+23
| | | | | | This reworks the blackbox tests to work with the bare repository caches. For the most part it's slight changes to error messages and tweaks to ignore the repository caches during file listing.
* Fix tests for previous commitSam Thursfield2012-09-132-2/+2
|
* Fix things so test suite works on Debian squeezeLars Wirzenius2012-09-133-1/+15
| | | | | | | | | | This requires disabling the feature that retains the original order of fields in a morphlogy when it gets overwritten. The implementation relies on features that are not available in Python 2.6. We need to support Morph on Debian squeeze, for bootstrapping purposes, and therefore need to have it work with Python 2.6. However, the morphology rewriting is only relevant for system branching and merging, and that isn't needed for bootstrapping, so we disable the affected tests on Python 2.6.
* tests: Always use fixed git committer infoSam Thursfield2012-09-131-12/+1
| | | | | | Move this into a script which can be sourced by the 'setup' scripts and the actual tests (this is needed as the environment in 'setup' is not passed on to the tests).
* Merge branch 'samthursfield/S4713-merge-message-for-chunks' of ↵Richard Maw2012-09-132-0/+13
|\ | | | | | | git://roadtrain.codethink.co.uk/baserock/morph
| * morph merge: Give consistent commit message in chunk reposSam Thursfield2012-09-112-0/+13
| | | | | | | | Update merge test to check the message.
* | Don't require .morph in triplet argumentsSam Thursfield2012-09-121-3/+2
|/ | | | | | | | | This gives us consistency with morphologies, where the triplets are repo|ref|morphology, not repo|ref|filename Anyone who runs 'morph build baserock:morphs master system.morph' will now see an error ending with 'was looking for system.morph.morph', which should make it clear where they have gone wrong.
* Preserve sort order of morphologies, so they can be edited by MorphSam Thursfield2012-09-102-51/+20
|
* morph merge: Complain if 'from' branch is not checked outSam Thursfield2012-09-102-0/+31
|
* morph branch: Fail if branch already exists in the system repoSam Thursfield2012-09-102-0/+40
|
* morph branch,checkout: Clean up the branch dir on failureSam Thursfield2012-09-104-0/+57
|
* tests.branching: Add test with strata outside the main morphs repoSam Thursfield2012-09-101-0/+149
|
* Rewrite 'merge' commandSam Thursfield2012-09-103-16/+19
| | | | | | 'merge' now traverses every system in the branch root (baserock:morphs) and merges any chunk or stratum that was changed with 'morph edit'. It also takes care of updating the refs in the target branch.
* Add a new 'morph build' for building from a system branchJannis Pohlmann2012-09-072-2/+5
| | | | | | | | | | | | | | | | This new command does a lot. First of all, its command line interface has now changed to 'morph build SYSTEM' and it needs to be run from a system branch. When called, the new 'build' command will identify the repositories and morphologies involved in building the system from the system branch, create a build ref behind the scenes based on the system branch and add a commit with all uncommitted changes to this build branch for every repo involved. It will then push those build branches to the repository server and kick off a build of BRANCH_ROOT BUILD_BRANCH SYSTEM.morph. After building has finished, the remote build branches will be deleted again.
* Rewrite edit command to expect SYSTEM STRATUM [CHUNK] parametersJannis Pohlmann2012-09-0410-17/+40
| | | | | | | | | | | | | | | | | Editing no longer requires a repository to be specified, neither does it require a branch. It now starts off from a system morphology that is required to exist in the branch root repository. Relative to this system, "morph edit" realises the repository of a stratum and, optionally, a chunk, creates edit branches named after the system branch, if necessary, and update the references in the system and stratum morphology accordingly. The changes made to any of the repositories in the system branch are not committed. All existing changes are updated to work with this new input syntax for "morph edit".
* Merge branch 'jannis/find-repos-using-git-config-option'Sam Thursfield2012-09-034-0/+107
|\ | | | | | | | | Conflicts: morphlib/plugins/branch_and_merge_plugin.py
| * Find branch root using the morph.repository option in .git/configJannis Pohlmann2012-09-032-0/+52
| | | | | | | | | | | | | | | | This is more flexible than relying on the branch root repository directory to have the original name. The user might rename the branch root directory and we still want to be able to find it. Add a test that this new functionality works.
| * Remember the repo that is cloned from during branch/checkout/editJannis Pohlmann2012-08-312-0/+55
| | | | | | | | | | | | | | | | | | | | | | We do this by storing a morph.repository option in the local clone's .git/config file. This way the user can rename local repositories or move them around in a system branch in whatever way he or she likes and we can still find the repository later by the same name. Previously, we could only identify repositories in a system branch by their directory name. Now things are more flexible and tolerant of "unexpected" user behavior.
* | Use git config to store the branch root in .morph-system-branch/configJannis Pohlmann2012-08-316-18/+18
|/ | | | | | | This way we can store more branch config options in the future more conveniently without having store them all in separate files or writing our own code to parse the options into a branch config object or something like that.
* Rename 'minedir' to 'workspace' in testsSam Thursfield2012-08-305-0/+0
|