Browse Source

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

tags/3.4.6.4
parent
commit
d8e25f5185
2 changed files with 7 additions and 3 deletions
  1. +5
    -1
      pym/update/profile.py
  2. +2
    -2
      pym/update/variables/update.py

+ 5
- 1
pym/update/profile.py View File

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


+ 2
- 2
pym/update/variables/update.py View File

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



Loading…
Cancel
Save