Skip to content

Commit

Permalink
Add ability to use custom parameters;
Browse files Browse the repository at this point in the history
  • Loading branch information
f100024 committed Jul 15, 2020
1 parent 3784065 commit 0c845d0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion svn/common.py
Expand Up @@ -21,7 +21,8 @@

class CommonClient(svn.common_base.CommonBase):
def __init__(self, url_or_path, type_, username=None, password=None,
svn_filepath='svn', trust_cert=None, env={}, *args, **kwargs):
svn_filepath='svn', trust_cert=None, custom_params=None,
env={}, *args, **kwargs):
super(CommonClient, self).__init__(*args, **kwargs)

self.__url_or_path = url_or_path
Expand All @@ -30,6 +31,7 @@ def __init__(self, url_or_path, type_, username=None, password=None,
self.__svn_filepath = svn_filepath
self.__trust_cert = trust_cert
self.__env = env
self.__custom_params = custom_params

if type_ not in (svn.constants.LT_URL, svn.constants.LT_PATH):
raise svn.exception.SvnException("Type is invalid: {}".format(type_))
Expand All @@ -42,6 +44,9 @@ def run_command(self, subcommand, args, **kwargs):
if self.__trust_cert:
cmd += ['--trust-server-cert']

if self.__custom_params:
cmd += [self.__custom_params]

if self.__username is not None and self.__password is not None:
cmd += ['--username', self.__username]
cmd += ['--password', self.__password]
Expand Down

0 comments on commit 0c845d0

Please sign in to comment.