summaryrefslogtreecommitdiff
path: root/morphlib/app.py
diff options
context:
space:
mode:
Diffstat (limited to 'morphlib/app.py')
-rw-r--r--morphlib/app.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/morphlib/app.py b/morphlib/app.py
index 9ab102b3..c3c9c970 100644
--- a/morphlib/app.py
+++ b/morphlib/app.py
@@ -290,7 +290,8 @@ class Morph(cliapp.Application):
morphlib.util.sanitise_morphology_path(args[2]))
args = args[3:]
- def create_source_pool(self, lrc, rrc, repo, ref, filename):
+ def create_source_pool(self, lrc, rrc, repo, ref, filename,
+ original_ref=None):
pool = morphlib.sourcepool.SourcePool()
def add_to_pool(reponame, ref, filename, absref, tree, morphology):
@@ -302,7 +303,8 @@ class Morph(cliapp.Application):
self.traverse_morphs(repo, ref, [filename], lrc, rrc,
update=not self.settings['no-git-update'],
- visit=add_to_pool)
+ visit=add_to_pool,
+ definitions_original_ref=original_ref)
return pool
def resolve_ref(self, lrc, rrc, reponame, ref, update=True):
@@ -346,7 +348,8 @@ class Morph(cliapp.Application):
def traverse_morphs(self, definitions_repo, definitions_ref,
system_filenames, lrc, rrc, update=True,
- visit=lambda rn, rf, fn, arf, m: None):
+ visit=lambda rn, rf, fn, arf, m: None,
+ definitions_original_ref=None):
morph_factory = morphlib.morphologyfactory.MorphologyFactory(lrc, rrc,
self)
definitions_queue = collections.deque(system_filenames)
@@ -359,6 +362,9 @@ class Morph(cliapp.Application):
definitions_absref, definitions_tree = self.resolve_ref(
lrc, rrc, definitions_repo, definitions_ref, update)
+ if definitions_original_ref:
+ definitions_ref = definitions_original_ref
+
while definitions_queue:
filename = definitions_queue.popleft()