本文整理汇总了Python中reviewboard.ssh.utils.register_rbssh函数的典型用法代码示例。如果您正苦于以下问题:Python register_rbssh函数的具体用法?Python register_rbssh怎么用?Python register_rbssh使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了register_rbssh函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: super
else:
self.local_site_name = None
super(RBRemoteSSHTransport, self).__init__(
base.encode('ascii'), *args, **kwargs)
def _build_medium(self):
client_medium, auth = \
super(RBRemoteSSHTransport, self)._build_medium()
client_medium._vendor = RBSSHVendor(self.local_site_name)
return client_medium, auth
vendor = RBSSHVendor()
register_ssh_vendor("rbssh", vendor)
register_default_ssh_vendor(vendor)
sshutils.register_rbssh('BZR_SSH')
register_lazy_transport('bzr+ssh://', 'reviewboard.scmtools.bzr',
'RBRemoteSSHTransport')
class BZRTool(SCMTool):
"""An interface to the Bazaar SCM (http://bazaar-vcs.org/)"""
name = "Bazaar"
dependencies = {
'modules': ['bzrlib'],
}
# Timestamp format in bzr diffs.
# This isn't totally accurate: there should be a %z at the end.
# Unfortunately, strptime() doesn't support %z.
DIFF_TIMESTAMP_FORMAT = '%Y-%m-%d %H:%M:%S'
开发者ID:PingAnTech,项目名称:reviewboard,代码行数:31,代码来源:bzr.py
示例2: import
from django.utils import six
from django.utils.six.moves.urllib.parse import urlparse
from djblets.util.filesystem import is_exe_in_path
from reviewboard.scmtools.core import SCMTool, HEAD, PRE_CREATION
from reviewboard.scmtools.errors import (AuthenticationError,
SCMError,
FileNotFoundError,
RepositoryNotFoundError)
from reviewboard.diffviewer.parser import DiffParser, DiffParserError
from reviewboard.ssh import utils as sshutils
from reviewboard.ssh.errors import SSHAuthenticationError, SSHError
sshutils.register_rbssh('CVS_RSH')
class CVSTool(SCMTool):
name = "CVS"
supports_authentication = True
field_help_text = {
'path': 'The CVSROOT used to access the repository.',
}
dependencies = {
'executables': ['cvs'],
}
rev_re = re.compile(r'^.*?(\d+(\.\d+)+)\r?$')
repopath_re = re.compile(r'^(?P<hostname>.*):(?P<port>\d+)?(?P<path>.*)')
ext_cvsroot_re = re.compile(r':ext:([^@][email protected])?(?P<hostname>[^:/]+)')
开发者ID:aaronmartin0303,项目名称:reviewboard,代码行数:30,代码来源:cvs.py
示例3: SVNTool
from reviewboard.diffviewer.parser import DiffParser
from reviewboard.scmtools.certs import Certificate
from reviewboard.scmtools.core import SCMTool, HEAD, PRE_CREATION, UNKNOWN
from reviewboard.scmtools.errors import AuthenticationError, \
FileNotFoundError, \
RepositoryNotFoundError, \
SCMError, \
UnverifiedCertificateError
from reviewboard.ssh import utils as sshutils
# Register these URI schemes so we can handle them properly.
sshutils.ssh_uri_schemes.append('svn+ssh')
sshutils.register_rbssh('SVN_SSH')
class SVNCertificateFailures:
"""SVN HTTPS certificate failure codes.
These map to the various SVN HTTPS certificate failures in libsvn.
"""
NOT_YET_VALID = 1 << 0
EXPIRED = 1 << 1
CN_MISMATCH = 1 << 2
UNKNOWN_CA = 1 << 3
class SVNTool(SCMTool):
name = "Subversion"
开发者ID:B-Rich,项目名称:reviewboard,代码行数:30,代码来源:svn.py
示例4: ShortSHA1Error
try:
import urlparse
uses_netloc = urlparse.uses_netloc
urllib_urlparse = urlparse.urlparse
except ImportError:
import urllib.parse
uses_netloc = urllib.parse.uses_netloc
urllib_urlparse = urllib.parse.urlparse
# Register these URI schemes so we can handle them properly.
uses_netloc.append('git')
sshutils.register_rbssh('GIT_SSH')
class ShortSHA1Error(InvalidRevisionFormatError):
def __init__(self, path, revision, *args, **kwargs):
InvalidRevisionFormatError.__init__(
self,
path=path,
revision=revision,
detail=six.text_type(_('The SHA1 is too short. Make sure the diff '
'is generated with `git diff '
'--full-index`.')),
*args, **kwargs)
class GitTool(SCMTool):
开发者ID:MappleHero,项目名称:reviewboard,代码行数:30,代码来源:git.py
示例5: super
self.local_site_name = m.group(1)
base = base.replace(m.group(0), "")
else:
self.local_site_name = None
super(RBRemoteSSHTransport, self).__init__(base.encode("ascii"), *args, **kwargs)
def _build_medium(self):
client_medium, auth = super(RBRemoteSSHTransport, self)._build_medium()
client_medium._vendor = RBSSHVendor(self.local_site_name)
return client_medium, auth
vendor = RBSSHVendor()
register_ssh_vendor("rbssh", vendor)
register_default_ssh_vendor(vendor)
sshutils.register_rbssh("BZR_SSH")
register_lazy_transport("bzr+ssh://", "reviewboard.scmtools.bzr", "RBRemoteSSHTransport")
class BZRTool(SCMTool):
"""An interface to the Bazaar SCM (http://bazaar-vcs.org/)"""
name = "Bazaar"
dependencies = {"modules": ["bzrlib"]}
# Timestamp format in bzr diffs.
# This isn't totally accurate: there should be a %z at the end.
# Unfortunately, strptime() doesn't support %z.
DIFF_TIMESTAMP_FORMAT = "%Y-%m-%d %H:%M:%S"
# "bzr diff" indicates that a file is new by setting the old
开发者ID:hcchen,项目名称:reviewboard,代码行数:31,代码来源:bzr.py
注:本文中的reviewboard.ssh.utils.register_rbssh函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论