Исправлено переключение профилей

master3.4 3.4.6.4
padre 678735dae2
commit d8e25f5185

@ -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):

@ -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 ""

Cargando…
Cancelar
Guardar