summaryrefslogtreecommitdiff
path: root/morphlib/sysbranchdir.py
Commit message (Collapse)AuthorAgeFilesLines
* sysbranchdir: Move load_all_morphologies helper hereRichard Maw2013-11-291-0/+14
| | | | | | | | | | | | | | | This was previously a private method of the branch and merge plugin, but it's useful to other plugins, so has been moved to the SystemBranchDirectory class, where everything else can get to it. It has an unpleasant amount of coupling to other classes, but in a *good* object oriented design it would either be a tiny module on its own, or not exist and leave all its users to re-implement the same logic multiple ways, so we've opted for a less clean, but more useful design. It is left un-covered by the unit tests, since it requires a great deal of instrumentation to test, at which point it may be best to leave it to integration tests.
* GitDir: Split out Remote objectRichard Maw2013-11-221-1/+2
| | | | Operations on remotes are now accessed through this proxy object.
* util: add find_leaves() supplimenting find_leaf()Richard Maw2013-09-171-7/+3
| | | | | | | | | | | | | | | The workspace needs to be able to list all its system branches, and the system branches need to be able to list all their git repositories. This is broadly the same thing, just with a different directory to look out for, so provide that utility in morphlib.util. find_leaf() is rewritten to use find_leaves(), this is less efficient since it waits until every leaf is found. I felt it was better to reduce the code than maintain a slightly more optimal algorithm. The find_leaf() algorithm could become more optimal if it could lazily check for at least one result in a generator.
* sysbranchdir: simplify prefix / stripRichard Maw2013-09-051-2/+1
| | | | There's a built-in function to do this.
* Make SystemBranchDirectory remember an absolute pathLars Wirzenius2013-08-141-1/+1
| | | | | | | This is necessary because a relative pathname may become invalid, if the current working directory changes, either in Morph itself, of when Morph invokes a subprocess and gives the pathname to the system branch root directory to it.
* Add SystemBranchDirectory.get_filename methodLars Wirzenius2013-08-141-0/+9
|
* Remove unused argument from SystemBranchDirectory.clone_cached_repoLars Wirzenius2013-08-141-1/+1
| | | | | For some reason, there was an unused argument in the method. Remove it from the definition and all call sites.
* Add SystemBranchDirectory classLars Wirzenius2013-08-061-0/+219