summaryrefslogtreecommitdiff
path: root/morphlib/app.py
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2012-09-19 18:04:16 +0100
committerSam Thursfield <sam.thursfield@codethink.co.uk>2012-09-21 16:06:08 +0100
commite0555e433ea6611d161aa31b10d621905c95c5ae (patch)
tree6b880ec82f003e85a2991ef28bc728c597fcd073 /morphlib/app.py
parent0513d8ebcd7bff35d602719364374b71b152efd5 (diff)
downloadmorph-e0555e433ea6611d161aa31b10d621905c95c5ae.tar.gz
morph petrify: Rewrite in the style of today
Diffstat (limited to 'morphlib/app.py')
-rwxr-xr-xmorphlib/app.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/morphlib/app.py b/morphlib/app.py
index 42a35461..37e494af 100755
--- a/morphlib/app.py
+++ b/morphlib/app.py
@@ -225,12 +225,11 @@ class Morph(cliapp.Application):
category=DeprecationWarning)
return self.create_source_pool(*args)
- def _resolveref(self, lrc, rrc, reponame, ref, update=True):
+ def resolve_ref(self, lrc, rrc, reponame, ref, update=True):
'''Resolves commit and tree sha1s of the ref in a repo and returns it.
If update is True then this has the side-effect of updating
or cloning the repository into the local repo cache.
-
'''
absref = None
if lrc.has_repo(reponame):
@@ -263,7 +262,7 @@ class Morph(cliapp.Application):
while queue:
reponame, ref, filename = queue.popleft()
- absref, tree = self._resolveref(lrc, rrc, reponame, ref, update)
+ absref, tree = self.resolve_ref(lrc, rrc, reponame, ref, update)
morphology = morph_factory.get_morphology(
reponame, absref, filename)
visit(reponame, ref, filename, absref, tree, morphology)