Skip to content

Commit 3b66dab

Browse files
committed
Build: Mercurial (hg) compatibility with old versions
We are using Ubuntu 20.04 LTS to perform the clone step (`readthedocs/build:ubuntu-20.04`) which comes with Mercurial v5.3.1 and install by default the `sparse-revlog` requirement. However, if the build is using `readthedocs/build:latest`, which comes with Mercurial v4.5.3 and does not contain that requirement it fails: ``` hg identify --id abort: repository requires features unknown to this Mercurial: sparserevlog! (see https://mercurial-scm.org/wiki/MissingRequirement for more information) ``` This commit disables that requirements to make the clone compatible with the older version of Mercurial. Closes #8995
1 parent 3aad444 commit 3b66dab

File tree

1 file changed

+3
-1
lines changed
  • readthedocs/vcs_support/backends

1 file changed

+3
-1
lines changed

readthedocs/vcs_support/backends/hg.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ def pull(self):
3333
def clone(self):
3434
self.make_clean_working_dir()
3535
try:
36-
output = self.run("hg", "clone", self.repo_url, ".")
36+
output = self.run(
37+
"hg", "clone", "--config", "format.sparse-revlog=no", self.repo_url, "."
38+
)
3739
return output
3840
except RepositoryError:
3941
raise RepositoryError(RepositoryError.CLONE_ERROR)

0 commit comments

Comments
 (0)