summaryrefslogtreecommitdiff
path: root/morphlib/plugins/anchor_plugin.py
diff options
context:
space:
mode:
Diffstat (limited to 'morphlib/plugins/anchor_plugin.py')
-rw-r--r--morphlib/plugins/anchor_plugin.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/morphlib/plugins/anchor_plugin.py b/morphlib/plugins/anchor_plugin.py
index bd2449b6..f3973418 100644
--- a/morphlib/plugins/anchor_plugin.py
+++ b/morphlib/plugins/anchor_plugin.py
@@ -137,11 +137,12 @@ class AnchorPlugin(cliapp.Plugin):
for reponame, sources in sources_by_reponame.iteritems():
# UGLY HACK we need to push *FROM* our local repo cache to
# avoid cloning everything multiple times.
- # This uses cache_repo rather than get_repo because the
- # BuildCommand.create_source_pool won't cache the
- # repositories locally if it can use a remote cache
- # instead.
- repo = bc.lrc.cache_repo(reponame)
+ # This uses get_updated_repo rather than get_repo because the
+ # BuildCommand.create_source_pool won't cache the repositories
+ # locally if it can use a remote cache instead.
+ repo = bc.lrc.get_updated_repo(reponame,
+ refs=(s.original_ref
+ for s in sources))
remote = Remote(repo.gitdir)
push_url = resolver.push_url(reponame)