diff options
author | James Thomas <james.thomas@codethink.co.uk> | 2012-10-01 13:15:08 +0000 |
---|---|---|
committer | James Thomas <james.thomas@codethink.co.uk> | 2012-10-01 13:17:23 +0000 |
commit | 2723b41fdf6b5b611707bf7a001472adb8a01f93 (patch) | |
tree | 22a508e0c7d5b917eeb0de0026a8619c97771d19 /morphlib/app.py | |
parent | 18b7b113d5382688d87962e3427680a01f2b17f8 (diff) | |
download | morph-2723b41fdf6b5b611707bf7a001472adb8a01f93.tar.gz |
Only update repos once
Diffstat (limited to 'morphlib/app.py')
-rwxr-xr-x | morphlib/app.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/morphlib/app.py b/morphlib/app.py index 1cf794d9..19f35ea0 100755 --- a/morphlib/app.py +++ b/morphlib/app.py @@ -291,10 +291,14 @@ class Morph(cliapp.Application): morph_factory = morphlib.morphologyfactory.MorphologyFactory(lrc, rrc, self) queue = collections.deque(triplets) + updated_repos = set([]) while queue: reponame, ref, filename = queue.popleft() - absref, tree = self.resolve_ref(lrc, rrc, reponame, ref, update) + update_repo = update and reponame not in updated_repos + absref, tree = self.resolve_ref(lrc, rrc, reponame, ref, + update_repo) + updated_repos.add(reponame) morphology = morph_factory.get_morphology( reponame, absref, filename) visit(reponame, ref, filename, absref, tree, morphology) |