summaryrefslogtreecommitdiff
path: root/morphlib/remoterepocache_tests.py
Commit message (Collapse)AuthorAgeFilesLines
* Only autodetect morphology when result is 404baserock/richardmaw/bugfix/http-failRichard Maw2014-08-191-2/+7
| | | | | | | | | | | | | | | | | The MorphologyFactory class will use a RemoteRepoCache to see if a morphology file exists, and if it doesn't, uses a file listing to see if it can detect what build-system is uses, hence what the default morphology should be. However, it was overly generic in what error cases it would accept as the morphology not being found, so if the RemoteRepoCache was suddenly un-resolvable for a brief period, then it would assume the morphology didn't exist, and use the default one. This happened to a user, and the result was a full rebuild. So we now fix this by only raising the exception that means the file didn't exist, if we got a HTTP 404.
* Quote ref and filenameBen Brown2013-12-181-4/+3
| | | | | | 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.
* urllib: Convert URLs with non URL friendly characters into a valid format.Ben Brown2013-12-111-4/+5
|
* Support 'git ls-tree' in local and remote reposSam Thursfield2012-08-241-0/+28
|
* python scripts: pep8ize codebaseRichard Maw2012-08-011-11/+10
| | | | | | | | | This was done with the aid of the pep8 script, available by running `easy_install pep8`. It may be worth making this part of ./check, but that will require putting pep8 into the development tools stratum. This should be easy, given pep8 has no external dependencies.
* Fix missing bits so that tests pass again.Jannis Pohlmann2012-05-041-10/+11
|
* Add RemoteRepoCache and integrate it into _create_source_pool().Jannis Pohlmann2012-04-181-0/+105
This adds a new setting called 'cache-server' to morph. It is None by default and should be set to the HTTP URL of a morph cache server to be used. The RemoteRepoCache object provides two methods: resolve_ref() and cat_file(), both of which wrap the communication with the cache server and return a SHA1 string and file contents, respectively. The _create_source_pool() method now takes a local and an optional remote repo cache and tries to do whatever is best to resolve refs and load morphologies for the Source objects it creates.