summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2015-06-17 21:02:08 +0000
committerRichard Maw <richard.maw@codethink.co.uk>2015-06-17 21:09:22 +0000
commit2040cbeb01d3588686b8eab5a77867f8952828c5 (patch)
treeadcc57bfea830779895579fbf23296a8486be957
parentca82f85c123d7b22dbf4fdb7493c38ff4be6edfa (diff)
downloadmorph-2040cbeb01d3588686b8eab5a77867f8952828c5.tar.gz
localrepocache: Count freshly cloned repositories as updated
This fixes requires_update_for_ref when it is given a non-fixed ref and it is retrieved from a call to get_updated_repo. Change-Id: Icbcf2e4ec45bd559c6bcb450ceb4a8861b56f654
-rw-r--r--morphlib/localrepocache.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/morphlib/localrepocache.py b/morphlib/localrepocache.py
index f9ecdc0c..ba11fb96 100644
--- a/morphlib/localrepocache.py
+++ b/morphlib/localrepocache.py
@@ -222,7 +222,10 @@ class LocalRepoCache(object):
raise NoRemote(reponame, errors)
self.fs.rename(target, path)
- return self.get_repo(reponame)
+
+ repo = self.get_repo(reponame)
+ repo.already_updated = True
+ return repo
def _new_cached_repo_instance(self, reponame, repourl,
path): # pragma: no cover