Skip to content

Commit f4134a6

Browse files
committed
BF: after a first push the remote still appeared empty (so 1st push again)
Needed to refresh the representation of the remote, either after a firts push or before any sync (we went for the latter)
1 parent 2e47048 commit f4134a6

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

‎psychopy/projects/pavlovia.py‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -727,8 +727,11 @@ def getRepo(self, infoStream=None, forceRefresh=False,
727727
"""Will always try to return a valid local git repo
728728
729729
Will try to clone if local is empty and remote is not"""
730+
731+
# refresh our representation of the local
730732
if self.repo and not forceRefresh:
731733
return self.repo
734+
732735
if not self.localRoot:
733736
raise AttributeError("Cannot fetch a PavloviaProject until we have "
734737
"chosen a local folder.")
@@ -748,6 +751,10 @@ def getRepo(self, infoStream=None, forceRefresh=False,
748751
self.configGitLocal()
749752

750753
self.writeGitIgnore()
754+
# also refresh our representation of the remote
755+
if self.pavlovia and forceRefresh:
756+
self.pavlovia = getCurrentSession().gitlab.projects.get(self.id)
757+
751758
return self.repo
752759

753760
def writeGitIgnore(self):
@@ -809,7 +816,7 @@ def firstPush(self, infoStream):
809816
if infoStream:
810817
infoStream.write("\n{}".format(info))
811818
infoStream.write("\nSuccess!".format(info))
812-
819+
813820
def cloneRepo(self, infoStream=None):
814821
"""Gets the git.Repo object for this project, creating one if needed
815822

0 commit comments

Comments
 (0)