Skip to content

Build: Mercurial (hg) compatibility with old versions #9042

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 29, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion readthedocs/vcs_support/backends/hg.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,14 @@ def pull(self):
def clone(self):
self.make_clean_working_dir()
try:
output = self.run("hg", "clone", self.repo_url, ".")
# Disable sparse-revlog extension when cloning because it's not
# included in older versions of Mercurial and producess an error
# when using an old version. See
# https://github.com/readthedocs/readthedocs.org/pull/9042/

output = self.run(
"hg", "clone", "--config", "format.sparse-revlog=no", self.repo_url, "."
)
return output
except RepositoryError:
raise RepositoryError(RepositoryError.CLONE_ERROR)
Expand Down