Skip to content

Commit

Permalink
BF: pavlovia URL checking was only working on https URLs
Browse files Browse the repository at this point in the history
They have this format:
  https://gitlab.pavlovia.org/NameSpace/Name.git
Should also be able to work with ssh format:
  git@gitlab.pavlovia.org:NameSpace/Name.git
  • Loading branch information
peircej committed Jun 17, 2019
1 parent 3546e12 commit 08d7937
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions psychopy/projects/pavlovia.py
Original file line number Diff line number Diff line change
Expand Up @@ -1064,8 +1064,14 @@ def getProject(filename):
proj = None
for remote in localRepo.remotes:
for url in remote.urls:
if "gitlab.pavlovia.org/" in url:
namespaceName = url.split('gitlab.pavlovia.org/')[1]
if "gitlab.pavlovia.org" in url:
# could be 'https://gitlab.pavlovia.org/NameSpace/Name.git'
# or may be 'git@gitlab.pavlovia.org:NameSpace/Name.git'
namespaceName = url.split('gitlab.pavlovia.org')[1]
# remove the first char (: or /)
if namespaceName[0] in ['/', ':']:
namespaceName = namespaceName[1:]
# remove the .git at the end if present
namespaceName = namespaceName.replace('.git', '')
pavSession = getCurrentSession()
if not pavSession.user:
Expand Down

0 comments on commit 08d7937

Please sign in to comment.