Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
BF: Set new remote URL when recreating projects in existing local repo
This fixes an error where remote repos were not updated when
recreating projects in an existing repo. This was causing an error where
the project was not found remotely because the URL was pointing to a
different accounts remote repo, which may or may be visible due to
privacy settings. This scenario lead to users having to
keep recreating their project locally on every sync.
  • Loading branch information
dvbridges committed Mar 8, 2019
1 parent 7fd0f5b commit c3f0d20
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions psychopy/app/pavlovia_ui/project.py
Expand Up @@ -608,6 +608,8 @@ def ShowModal(self):
localRoot=self.project.localRoot)
if editor.ShowModal() == wx.ID_OK:
self.project = editor.project
# Update git config with new remote URL
self.project.repo.git.remote("set-url", "origin", "{}".format(self.project['remoteHTTPS']))
return 1 # success!
else:
return -1 # user cancelled
Expand Down

0 comments on commit c3f0d20

Please sign in to comment.