Skip to content

Commit

Permalink
chore(hg,git,svn): Pass through positional args
Browse files Browse the repository at this point in the history
  • Loading branch information
tony committed Apr 2, 2022
1 parent a061c6f commit 3fa0c45
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
6 changes: 4 additions & 2 deletions libvcs/git.py
Expand Up @@ -138,7 +138,9 @@ class GitRepo(BaseRepo):
bin_name = "git"
schemes = ("git", "git+http", "git+https", "git+ssh", "git+git", "git+file")

def __init__(self, url: str, repo_dir: str, remotes: RemotesArgs = None, **kwargs):
def __init__(
self, url: str, repo_dir: str, remotes: RemotesArgs = None, *args, **kwargs
):
"""A git repository.
Parameters
Expand Down Expand Up @@ -203,7 +205,7 @@ def __init__(self, url: str, repo_dir: str, remotes: RemotesArgs = None, **kwarg
"push": url,
}

BaseRepo.__init__(self, url, repo_dir, **kwargs)
BaseRepo.__init__(self, url, repo_dir, *args, **kwargs)

@classmethod
def from_pip_url(cls, pip_url, *args, **kwargs):
Expand Down
4 changes: 2 additions & 2 deletions libvcs/hg.py
Expand Up @@ -20,8 +20,8 @@ class MercurialRepo(BaseRepo):
bin_name = "hg"
schemes = ("hg", "hg+http", "hg+https", "hg+file")

def __init__(self, url, repo_dir, **kwargs):
BaseRepo.__init__(self, url, repo_dir, **kwargs)
def __init__(self, url, repo_dir, *args, **kwargs):
BaseRepo.__init__(self, url, repo_dir, *args, **kwargs)

def obtain(self, *args, **kwargs):
self.ensure_dir()
Expand Down
4 changes: 2 additions & 2 deletions libvcs/svn.py
Expand Up @@ -34,7 +34,7 @@ class SubversionRepo(BaseRepo):
bin_name = "svn"
schemes = ("svn", "svn+ssh", "svn+http", "svn+https", "svn+svn")

def __init__(self, url, repo_dir, **kwargs):
def __init__(self, url, repo_dir, *args, **kwargs):
"""A svn repository.
Parameters
Expand All @@ -55,7 +55,7 @@ def __init__(self, url, repo_dir, **kwargs):
self.svn_trust_cert = False

self.rev = kwargs.get("rev")
BaseRepo.__init__(self, url, repo_dir, **kwargs)
BaseRepo.__init__(self, url, repo_dir, *args, **kwargs)

def _user_pw_args(self):
args = []
Expand Down

0 comments on commit 3fa0c45

Please sign in to comment.