summaryrefslogtreecommitdiff
path: root/morphlib/sourcemanager.py
diff options
context:
space:
mode:
authorJannis Pohlmann <jannis.pohlmann@codethink.co.uk>2012-01-19 13:49:03 +0000
committerJannis Pohlmann <jannis.pohlmann@codethink.co.uk>2012-01-19 13:49:03 +0000
commit96143d48f432d08be650ea69cbd56cb50988e855 (patch)
tree2bc12320bf83bcd84f52452dd87a3d0ef0b1c5ed /morphlib/sourcemanager.py
parent9a08e558f6493cb2e4b664dab797270300c80caa (diff)
downloadmorph-96143d48f432d08be650ea69cbd56cb50988e855.tar.gz
Document get_treeish() of the SourceManager.
Diffstat (limited to 'morphlib/sourcemanager.py')
-rw-r--r--morphlib/sourcemanager.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/morphlib/sourcemanager.py b/morphlib/sourcemanager.py
index fd2ce71d..f78b8cd6 100644
--- a/morphlib/sourcemanager.py
+++ b/morphlib/sourcemanager.py
@@ -104,6 +104,16 @@ class SourceManager(object):
ex.runv(['wget', '-c', url])
def get_treeish(self, repo, ref):
+ '''Returns a Treeish for a URL or repo name with a given reference.
+
+ If the source hasn't been cloned yet, this will fetch it, either using
+ clone or by fetching a bundle.
+
+ Raises morphlib.git.InvalidTreeish if the reference cannot be found.
+ Raises morphlib.sourcemanager.SourceNotFound if source cannot be found.
+
+ '''
+
self.msg('checking cache for git %s|%s' % (repo, ref))
#TODO is it actually an error to have no base url?