From d8e25f5185eb58a345f6f91b39ca65e4b1565d26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A5=D0=B8=D1=80=D0=B5=D1=86=D0=BA=D0=B8=D0=B9=20=D0=9C?= =?UTF-8?q?=D0=B8=D1=85=D0=B0=D0=B8=D0=BB?= Date: Fri, 13 May 2016 15:19:54 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=BE=20=D0=BF=D0=B5=D1=80=D0=B5=D0=BA=D0=BB=D1=8E?= =?UTF-8?q?=D1=87=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BF=D1=80=D0=BE=D1=84=D0=B8?= =?UTF-8?q?=D0=BB=D0=B5=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pym/update/profile.py | 6 +++++- pym/update/variables/update.py | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pym/update/profile.py b/pym/update/profile.py index 77c85bf..f822100 100644 --- a/pym/update/profile.py +++ b/pym/update/profile.py @@ -89,7 +89,7 @@ class CacheStorage(ProfileStorage): if rep.is_like(url, branch): return rep else: - return ProfileRepository.clone(url, self, branch) + return ProfileRepository.clone(url, self, branch or DEFAULT_BRANCH) class RepositoryStorageSet(RepositoryStorageInterface): """ @@ -120,6 +120,10 @@ class RepositoryStorageSet(RepositoryStorageInterface): for rep in self: if rep.is_like(url, branch): return rep + for storage in self.storages: + rep = storage.get_repository(url, branch) + if rep: + return rep return None def is_local(self, url, branch=DEFAULT_BRANCH): diff --git a/pym/update/variables/update.py b/pym/update/variables/update.py index 0be2dc0..17984cf 100644 --- a/pym/update/variables/update.py +++ b/pym/update/variables/update.py @@ -1130,10 +1130,10 @@ class VariableClUpdateProfileRepository(ReadonlyVariable): try: rep_set = self.Get(self.storage) branch = self.Get(self.branch) - rep = rep_set.get_repository(url, branch) + rep = rep_set.get_repository(url, branch=None) if rep and self.Get(self.sync_set) == 'on': rep.sync() - return rep_set.get_repository(url, branch) or "" + return rep_set.get_repository(url, branch=None) or "" except GitError: return ""