Skip to content

Commit 30f5a9f

Browse files
committed
refactor(sync[svn]): Remove last non-cmd dependency
1 parent 3c24fb4 commit 30f5a9f

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

src/libvcs/sync/svn.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import re
1919
from typing import Any, Optional
2020

21-
from libvcs._internal.run import run
2221
from libvcs._internal.types import StrPath
2322
from libvcs.cmd.svn import Svn
2423

@@ -88,8 +87,7 @@ def obtain(self, quiet: Optional[bool] = None, *args: Any, **kwargs: Any) -> Non
8887

8988
def get_revision_file(self, location: str) -> int:
9089
"""Return revision for a file."""
91-
92-
current_rev = self.run(["info", location])
90+
current_rev = self.cmd.info(location)
9391

9492
_INI_RE = re.compile(r"^([^:]+):\s+(\S.*)$", re.M)
9593

@@ -181,8 +179,8 @@ def _get_svn_url_rev(cls, location: str) -> tuple[Optional[str], int]:
181179
# We don't need to worry about making sure interactive mode
182180
# is being used to prompt for passwords, because passwords
183181
# are only potentially needed for remote server requests.
184-
xml = run(
185-
["svn", "info", "--xml", location],
182+
xml = Svn(dir=pathlib.Path(location).parent).info(
183+
target=pathlib.Path(location), xml=True
186184
)
187185
match = _svn_info_xml_url_re.search(xml)
188186
assert match is not None

0 commit comments

Comments
 (0)