summaryrefslogtreecommitdiff
path: root/tests.branching
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
|
* Fix branch/checkout to always create branches in the workspace directoryJannis Pohlmann2012-08-305-1/+236
| | | | | | | | | Doing this rather than creating the system branches in the current working directory allows "morph branch" and "morph checkout" to be run anywhere in the workspace (e.g. in a different branch). This commit also adds two tests to verify that new branches are always created in the toplevel workspace directory.
* Add "morph show-branch-root" commandJannis Pohlmann2012-08-306-0/+93
| | | | | | | | This commit introduces a new "morph show-branch-root" command to print the repository that the user branched off from with "morph branch" or that he or she checked out with "morph checkout". Also add tests for this new command.
* Merge branch 'jannis/initial-branch-and-merge-work'Sam Thursfield2012-08-3040-163/+406
|\ | | | | | | | | Conflicts: morphlib/plugins/branch_and_merge_plugin.py
| * Add mandatory repository parameter to "morph branch"Jannis Pohlmann2012-08-2914-43/+43
| | | | | | | | | | | | | | | | | | This is complementary to adding a repository parameter to the "morph checkout" command. It allows to branch off arbitrary repositories rather than always branching off baserock:morphs. All affected tests are updated to provide and work with this new parameter.
| * Remember repository that was branched off from for merging and editingJannis Pohlmann2012-08-299-9/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this commit, "morph branch" and "morph checkout" remember the repository that was branched off from (the "branch root") in a special file called $workspace/$branch/.morph-system-branch/branch-root This information is later used when checking out individual repositories using "morph edit" instead of using the previously hard-coded "$workspace/$branch/morphs" repository as the branch root. This commit also updates the "morph merge" code to handle repositories specified with aliases or as full URLs in the same way "morph checkout" does. All affected tests are updated.
| * Make "morph checkout" require a repository parameterJannis Pohlmann2012-08-298-14/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of hard-coding "baserock:morphs" as the repository we check out from, we want to allow people to check out from arbitrary repositories with system and stratum morphologies. This commit adds a mandatory repository parameter to "morph checkout". This parameter can either be an aliased repo, e.g. baserock:morphs, or a full repo URL such as ssh://gitano@git.baserock.org/baserock/morphs. When cloning the actual repository into a local directory, the following happens: For alias repos baserock:morphs and baserock:foo/bar, the repositories would be cloned into the directories $workspace/$branch/baserock:morphs and $workspace/$branch/baserock:foo/bar. For repos specified using full URLs, the scheme and .git suffix (if present) are stripped off. The above ssh example would be cloned into the following directory: $workspace/$branch/gitano@git.baserock.org/baserock/morphs This commit also adjusts all affected tests and adds a new test to verify that checking out from full repo URLs works as expected.
| * Make "morph show-system-branch" anywhere in a workspace, if possibleJannis Pohlmann2012-08-2929-65/+197
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are mainly three situations to deal with: 1. We are outside a workspace and cannot deduce the system branch. 2. We are inside a workspace and inside a branch. We can detect this by walking up from the working directory towards the workspace. If we find a .morph-system-branch in one of the parent directories, we know the branch name. If we don't find one, something is wrong. 3. We are inside a workspace but outside a branch (or partially into a branch, e.g. in foo/ where the branch is foo/bar). We can deduce the branch if we recurse into subdirectories to find a .morph-system-branch directory. Care needs to be taken to not recurse infinitely. We may also not recurse if there are multiple subdirectories as these could belong to two different branches. This commit makes "morph show-system-branch" work in all of the above scenarios. It also adds tests for all of them.
| * Use .morph-system-branch directories to identify branch directoriesJannis Pohlmann2012-08-293-0/+3
| | | | | | | | | | | | | | | | | | | | The commands "morph branch" and "morph checkout" now create a .morph-system-branch directory for each system branch. This is the per-branch analogue to the .morph directory for a workspace. The .morph-system-branch directories make it possible to store state and other information for system branches. They also make deducing the current system branch more robust and clear.
| * Rename the "morph minedir" command to "morph workspace"Jannis Pohlmann2012-08-2922-46/+48
| | | | | | | | | | | | | | | | | | | | | | | | Mine may be a nice metaphor but it is not very intuitive. Hence, this commit renames "mine" to "workspace". This affects not just the branch and merge plugin (the only code that changes) but also documentation and tests, which are updated along with the code in this commit. I decided to omit the "dir" suffix in the command because I think people know well that a workspace will be a directory in this case and that allows us to refer to this concept with one word ("workspace") instead of two words ("workspace directory").
| * Create mine directory if it does not exists when running "morph init"Jannis Pohlmann2012-08-284-5/+5
| | | | | | | | | | Until now, morph failed when the mine directory did not exist. However, there is no good reason why it can't attempt to create it.
* | Strata should be referred to with full repo/ref/morph tripletsSam Thursfield2012-08-302-4/+8
| | | | | | | | | | | | | | | | This removes the requirement that all strata must be in the same repo as the system morphology. Both the system "strata" field and the stratum "build-depends" field are affected.
* | Strata contain "chunks", not "sources"Sam Thursfield2012-08-293-10/+11
|/ | | | Rename "sources" field of stratum morphologies to "chunks".
* Consolidate morphology writing code in pluginRichard Maw2012-08-011-1/+3
| | | | | As simple as it is to dump json files, it is convenient to use the same function, so the format can be kept the same.
* Add test for petrifying strataRichard Maw2012-08-013-0/+56
| | | | | | | | | | | | | | This test checks if the same morphology json is generated during petrification. Because commits include the author and date, the sha1 sum will differ if a different user commits at a different time. This can be overridden by the environment variables GIT_{AUTHOR,COMMITTER}_{NAME,EMAIL,DATE}. The date chosen was just something recent at the time the work was done, since a too-early timestamp is rejected by git as invalid.
* Refactor system building to use syskind specific classLars Wirzenius2012-07-261-1/+1
|
* Require system-kind on system morphologiesLars Wirzenius2012-07-191-0/+1
|
* Add check for missing build depends in strataLars Wirzenius2012-06-282-5/+9
| | | | | | | This will make a build fail if the morphology is missing explicit build dependencies. Also fix test causes so that ./check passes.
* Fix test suite to deal with morph output changesLars Wirzenius2012-06-261-0/+1
| | | | | | | | Also, some bug fixes. Also, when handling a BaseException, log the exception (with traceback) that we're handling, in case there is an error while handling it, because the second error will otherwise mask the first one.
* Allow "morph edit" to have a default ref to branch off fromLars Wirzenius2012-05-172-0/+35
|
* Add test case for "morph edit" updating strataLars Wirzenius2012-05-172-0/+54
|
* Fix filenames of test morphologiesLars Wirzenius2012-05-175-10/+10
|
* Use repo alias prefixes properly in testsLars Wirzenius2012-05-044-7/+7
|
* Set repo-alias with %s and use baserock: prefixLars Wirzenius2012-05-041-2/+2
|
* Make cmdtests set up repo-aliases and use prefixed reponamesLars Wirzenius2012-05-041-2/+3
|
* Make morph's _clone_to_directory use CachedRepo.checkoutLars Wirzenius2012-05-042-1/+4
| | | | | | | | | This requires changing CachedRepo.checkout to handle non-sha1 refs, which resulted in some further changes in tests and their expected outputs. Also, a fix to CachedRepo to use the cwd keyword argument instead of pwd.
* Add test for branching off not from masterLars Wirzenius2012-04-305-6/+69
|
* Add test script to test the whole branch+merge processLars Wirzenius2012-03-261-0/+39
|
* Change "checkout existing branch" test to not check out masterLars Wirzenius2012-03-265-14/+34
| | | | Checking out another branch exposed a bunch of bugs.