Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Versions > 1.2.0 break handling of branch name in URL #35

Open
elgow opened this issue Mar 29, 2019 · 1 comment
Open

Versions > 1.2.0 break handling of branch name in URL #35

elgow opened this issue Mar 29, 2019 · 1 comment

Comments

@elgow
Copy link

elgow commented Mar 29, 2019

Under version 1.2.0 I this URL which correctly specifies a branch, PROD, works fine:

In [1]: import giturlparse; giturlparse.parse('git+ssh://[email protected]_dept.uw.edu/uwmydept/my_repo.git@PROD')
Out[1]: Parsed(pathname='/uwmydept/my_repo.git', protocols=['git', 'ssh'], protocol='ssh', href='git+ssh://[email protected]_dept.uw.edu/uwmydept/my_repo.git@PROD', resource='gitlab.my_dept.uw.edu', user='git', port=None, name='my_repo', owner='uwmydept')

But under 1.2.1 or 1.2.2 it gets an error:

In [1]: import giturlparse; giturlparse.parse('git+ssh://[email protected]_dept.uw.edu/uwmydept/my_repo.git@PROD')

.....

~/.virtualenvs/my_dir/lib/python3.6/site-packages/giturlparse/parser.py in parse(self)
    102         else:
    103             msg = "Invalid URL '{}'".format(self._url)
--> 104             raise ParserError(msg)
    105
    106         return Parsed(**d)

ParserError: Invalid URL 'git+ssh://[email protected]_dept.uw.edu/uwmydept/my_repo.git@PROD'
@retr0h
Copy link
Collaborator

retr0h commented Mar 29, 2019

I'm not sure that was every "officially" working, since we do not parse out the branch name, and have no unit tests for this particular scenario. Feel free to submit a PR if you feel so inclined to support this functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants