summaryrefslogtreecommitdiff
path: root/morphlib/sourcemanager_tests.py
Commit message (Collapse)AuthorAgeFilesLines
* Create chunks, strata in cache via temporary filesLars Wirzenius2012-02-271-1/+0
| | | | | This avoids problems with files with the right names but partial content, if morph is killed in the middle of writing the file.
* Hide git output from unit test outputLars Wirzenius2012-02-271-3/+5
| | | | | | | | | | | | This makes it easier to check the output with vgrep for errors or problems. Voluminous git output made that hard. The key is that "git bundle create" has no --quiet optio (meh), so we have to redirect stderr to /dev/null. However, that would hide real errors, which we want to catch. Luckily, we can just replace the call to subprocess.call with a call to subprocess.check_call, and then we'll at least abort if there's an error, instead of silently ignoring it.
* Apply the test changes of the previous commit to all related tests.Jannis Pohlmann2012-02-241-2/+6
|
* Rework the bundle code to set the bundle filename outside _wget().Jannis Pohlmann2012-02-241-12/+9
| | | | | This is a bit stupid and requires tests to be adjusted (which is done in this commit as well).
* Rewrite get_treeish(), fetching and update code.Jannis Pohlmann2012-02-141-8/+40
| | | | This is to improve logging, error reporting and readability of the code.
* Add --ignore-submodules flag to avoid updating/unpacking submodules.Jannis Pohlmann2012-02-091-0/+1
|
* Cache submodule repositories recursively.Jannis Pohlmann2012-02-081-2/+12
| | | | | | | | | | | | | | | | | | | | | | This commit introduces the following new classes: morphlib.git.Submodules: * takes a parent repo treeish * parses the .gitmodule file into morphlib.git.Submodule objects * provides iterator/container functionality for submodules morphlib.git.Submodule: * represents a single entry in a .gitmodules file * stores a Treeish for the corresponding repository In addition to this, the exception classes InvalidTreeish and SourceNotFound where renamed to InvalidReferenceError and RepositoryUpdateError. Several new exception classes were added for when resolving submodules fails. The SourceManager now resolves the Submodules and Submodule objects for the submodules of a Treeish in SourceManager.get_treeish() and also takes care of caching submodule repositories whenever necessary.
* Add an update option to prevent the source manager from updating origin.Jannis Pohlmann2012-01-261-1/+1
| | | | | | This is useful because we still have a mix of sudo and fakeroot, which can cause permission issues in repos. This way, we can work around this problem in some situations.
* Bump copyright years, get rid of long lines and unused imports.Jannis Pohlmann2012-01-231-4/+5
|
* Port everything to using Treeish objects instead of (repo, ref).Jannis Pohlmann2012-01-201-16/+30
| | | | | | | | | | | This affects pretty much every part of morph, so this might not be fully working and stable yet. This commit also introduces the "update-gits" command that can be used to update all cached repositories from the list of base URLs. The tree walk when resolving the Treeish objects in Builder.get_cache_id() is a bit similar to what we do in BuildDependencyGraph, maybe we can merge that one day.
* Actually make show-dependencies.setup create an invariant historyRob Taylor2012-01-191-11/+11
| | | | | tests/show-dependencies.setup was actually creating different histories on machines with different timezones.
* Make SourceManager tests build their own git repoRob Taylor2012-01-191-25/+29
|
* Use self.assert* everywhere instead of the assert statement.Jannis Pohlmann2012-01-191-6/+6
|
* Coding style cleanup.Jannis Pohlmann2012-01-191-3/+2
|
* Fix coding style, update copyrights, drop unused imports.Jannis Pohlmann2012-01-191-13/+16
|
* Remove bad whitespaceRob Taylor2012-01-191-2/+2
|
* One of the Sourcemanager tests wasn't cleaning up.Rob Taylor2012-01-191-0/+1
|
* Complete SourceManager testsRob Taylor2012-01-191-11/+88
|
* initial version of Sourcemanager and testsRob Taylor2012-01-181-0/+49