summaryrefslogtreecommitdiff
path: root/morphlib/localrepocache.py
Commit message (Collapse)AuthorAgeFilesLines
* Refactored localrepocacheDaniel Firth2013-12-201-96/+34
|
* Add LocalRepoCache.get_updated_repo methodLars Wirzenius2013-08-061-1/+13
| | | | | This is a helper to avoid having the same code in other places. Have it in the one place it belongs.
* Avoid caching repos that are on the local machine anywaySam Thursfield2012-11-121-3/+7
| | | | | Currently the message is still displayed "Updating xxx" but no update is actually done.
* Use tarballs instead of bundlesDaniel Silverstone2012-09-251-24/+40
| | | | | | | This makes a non-backward-compatible change to morph which switches it to using tarballs instead of bundles when initialising cached git repositories. This is faster because it doesn't require index-pack --fix-thin operations on the machine running morph.
* Refactor _fetch() and log bundle fetches.Daniel Silverstone2012-09-211-11/+18
| | | | | | Log (at chatty) when we start and finish bundle downloads. If we fail for any reason, log that reason since otherwise it gets swallowed if the plain git clone succeeds.
* Rework git caches to be bare mirrors of the repos.Daniel Silverstone2012-09-141-2/+2
| | | | | | | | This reworks the code for managing and using the git caches in morph to treat the caches as bare repositories which are mirrors of where we clone from. In addition we correctly prune the branches during updates, so that we don't end up accumulating pointless branches over and over. This is even more important with branch-and-merge generating temporary build refs for things.
* python scripts: pep8ize codebaseRichard Maw2012-08-011-47/+46
| | | | | | | | | 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.
* morph: remove dead code and replace Execute with app.runcmdRichard Maw2012-05-301-6/+9
|
* Change LocalRepoCache to use the new RepoAliasResolver.Jannis Pohlmann2012-05-041-64/+6
|
* Fix LocalRepoCache to not abort on %s-less repo patternsLars Wirzenius2012-05-041-3/+17
| | | | Also, add debugging messages for debugging prefix expansion.
* Remove use of baseurls in LocalRepoCacheLars Wirzenius2012-05-041-33/+23
| | | | The tests, they still fail.
* Implement repo-alias expansionLars Wirzenius2012-05-041-3/+42
| | | | | | | | Changed the delimieter between push and pull patterns to be #, since = is reasonably frequent in URLs, and # should never be necessary in git urls. Oh my how many tests now fail.
* Add tests for repo-alias expansionLars Wirzenius2012-05-041-0/+6
|
* Get rid of the old internal morph APIsLars Wirzenius2012-05-021-5/+18
|
* Add morphlib.Error and make local repo cache exceptions be based on itLars Wirzenius2012-04-251-2/+3
| | | | | This way, cliapp will automatically print an error message, rather than a stack trace.
* Fix LocalRepoCache tests.Jannis Pohlmann2012-04-191-1/+1
|
* Clone repos with no checkout, use correct gits cache dir in cmd_build.Jannis Pohlmann2012-04-191-2/+2
|
* Remember repo objects in LocalRepoCache to always return the same ones.Jannis Pohlmann2012-04-171-3/+10
|
* localrepocache: return repo after cloningRichard Maw2012-04-111-5/+14
|
* localrepocache: fixes to remote set-urlRichard Maw2012-04-111-3/+6
| | | | | | It needed shutil, but that exception was being missed. _git needs to be able to handle a different current directory for remote set-url to work
* localrepocache: fix remote origin url to upstreamRichard Maw2012-04-111-0/+1
| | | | | | When cloning from a bundle it makes the origin remote url point to the bundle. This is not ideal as we want to update these repositories later from upstream.
* localrepocache: fix bundle pathsRichard Maw2012-04-111-1/+1
| | | | They must end with .bndl as that is the format lorry generates
* localrepocache: return error descriptionRichard Maw2012-04-111-22/+43
| | | | | | | | Also change _fetch to throw its exception as since it is more pythonic to throw exceptions than return exit status, other error handling needed to be caught, so it hsa been kept consistent. This required the tests to throw an exception as well
* localrepocache: check every base-url before cloneRichard Maw2012-04-111-5/+7
| | | | | It should check that it doesn't already have the repository cached under a different base-url before cloning, likewise with bundles.
* Create cache directory when needed in LocalRepoCacheLars Wirzenius2012-04-101-0/+12
|
* Fix unit test failures: mark out-of-coverage, and use wrapper to allow testsLars Wirzenius2012-04-101-6/+5
| | | | | | | | The self._exists method needs to be used instead of raw os.path.exists, so that unit tests can override it easily. Also, a tiny clarification so that the caller of _clone_with_bundle decides whether it's OK to try to download a bundle.
* Various small fixes to make the new update-gits work again.Jannis Pohlmann2012-04-101-15/+23
|
* Use the real CachedRepo class in LocalRepoCacheLars Wirzenius2012-04-091-9/+1
|
* Remove downloaded bundle after it has been clonedLars Wirzenius2012-04-091-0/+10
|
* Add bundle support to LocalRepoCacheLars Wirzenius2012-04-091-2/+47
|
* Add a LocalRepoCache classLars Wirzenius2012-04-091-0/+144
Jannis and I discussed a refactoring of most of morph's internals to reduce coupling and increase cohesion. This is one of the results: we'll want a couple of classes to manage locally cached git repositories. This commit adds the LocalRepoCache class to manage a the git cache directory. Later on, we'll add the CachedRepo class to represent individual repositories.