Skip to content

Commit 00d0b8c

Browse files
state - finally fixed
1 parent 28e4b38 commit 00d0b8c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/setuptools_scm/hg_git.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class GitWorkdirHgClient(GitWorkdir, HgWorkdir):
2222
@classmethod
2323
def from_potential_worktree(cls, wd: _t.PathT) -> GitWorkdirHgClient | None:
2424
require_command(cls.COMMAND)
25-
root, _, ret = do_ex("hg root", wd)
25+
root, _, ret = do_ex(["hg", "root"], wd)
2626
if ret:
2727
return None
2828
return cls(root)
@@ -91,7 +91,7 @@ def node(self) -> str | None:
9191
return git_node[:7]
9292

9393
def count_all_nodes(self) -> int:
94-
revs, _, _ = self.do_ex(["hg", "log" "-r", "ancestors(.)", "-T", "."])
94+
revs, _, _ = self.do_ex(["hg", "log", "-r", "ancestors(.)", "-T", "."])
9595
return len(revs)
9696

9797
def default_describe(self) -> _t.CmdResult:
@@ -119,7 +119,7 @@ def default_describe(self) -> _t.CmdResult:
119119
return _FAKE_GIT_DESCRIBE_ERROR
120120

121121
with open(os.path.join(self.path, ".hg/git-tags")) as fp:
122-
git_tags: dict[str, str] = dict(line.split() for line in fp)
122+
git_tags: dict[str, str] = dict(line.split()[::-1] for line in fp)
123123

124124
tag: str
125125
for hg_tag in hg_tags:

0 commit comments

Comments
 (0)