Skip to content

Commit 8f7b27c

Browse files
committed
refactor(sync[svn]): Attach command as attribute
1 parent 5cdb96a commit 8f7b27c

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/libvcs/sync/svn.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
class SvnSync(BaseSync):
3030
bin_name = "svn"
3131
schemes = ("svn", "svn+ssh", "svn+http", "svn+https", "svn+svn")
32+
cmd: Svn
3233

3334
def __init__(
3435
self,
@@ -59,8 +60,11 @@ def __init__(
5960
self.password = kwargs.get("password")
6061

6162
self.rev = kwargs.get("rev")
63+
6264
super().__init__(url=url, dir=dir, **kwargs)
6365

66+
self.cmd = Svn(dir=dir, progress_callback=self.progress_callback)
67+
6468
def _user_pw_args(self) -> list[Any]:
6569
args = []
6670
for param_name in ["svn_username", "svn_password"]:
@@ -195,7 +199,3 @@ def _get_svn_url_rev(cls, location: str) -> tuple[Optional[str], int]:
195199
rev = 0
196200

197201
return url, rev
198-
199-
@property
200-
def cmd(self, *args: object, **kwargs: object) -> Svn:
201-
return Svn(dir=self.dir, *args, **kwargs)

0 commit comments

Comments
 (0)