Skip to content

support cloning from ssh  #104

Description

@wryfi

Trying to clone a mercurial repo via ssh fails as follows:

hg=MercurialRepository('/tmp/foo', create=True, src_url='ssh://hg@bitbucket.org/marcinkuzminski/vcs')
---------------------------------------------------------------------------URLErrorTraceback (mostrecentcalllast)
<ipython-input-55-bd9b5320f794>in<module>()
---->1hg=MercurialRepository('/tmp/foo', create=True, src_url='ssh://hg@bitbucket.org/marcinkuzminski/vcs')
/usr/local/lib/python2.7/dist-packages/vcs/backends/hg.pyin__init__(self, repo_path, create, baseui, src_url, update_after_clone)
87self.baseui=baseuiorui.ui()
88# We've set path and ui, now we can set _repo itself--->89self._repo=self._get_repo(create, src_url, update_after_clone)
9091 @property/usr/local/lib/python2.7/dist-packages/vcs/backends/hg.pyin_get_repo(self, create, src_url, update_after_clone)
302opts.update({'noupdate': True})
303try:
-->304self._check_url(url)
305clone(self.baseui, url, self.path, **opts)
306# except urllib2.URLError:/usr/local/lib/python2.7/dist-packages/vcs/backends/hg.pyin_check_url(self, url)
283exceptException, e:
284# means it cannot be cloned-->285raiseurllib2.URLError(e)
286287def_get_repo(self, create, src_url=None, update_after_clone=False):
URLError: <urlopenerror<urlopenerrorunknownurl type: ssh>>

Works fine for git (incidentally due to using subprocess module).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions