8000 Deprecate the --git flag (use git by default). · python/docsbuild-scripts@c718134 · GitHub
[go: up one dir, main page]

Skip to content

Commit c718134

Browse files
committed
Deprecate the --git flag (use git by default).
1 parent 9efd4d5 commit c718134

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

build_docs.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def translation_branch(locale_repo, locale_clone_dir, needed_version):
155155

156156

157157
def build_one(version, isdev, quick, venv, build_root, www_root,
158-
skip_cache_invalidation=False, group='docs', git=False,
158+
skip_cache_invalidation=False, group='docs',
159159
log_directory='/var/log/docsbuild/', language=None):
160160
if not language:
161161
language = 'en'
@@ -193,12 +193,8 @@ def build_one(version, isdev, quick, venv, build_root, www_root,
193193
os.chdir(checkout)
194194

195195
logging.info("Updating checkout")
196-
if git:
197-
shell_out("git reset --hard HEAD")
198-
shell_out("git pull --ff-only")
199-
else:
200-
shell_out("hg pull -u")
201-
196+
shell_out("git reset --hard HEAD")
197+
shell_out("git pull --ff-only")
202198
maketarget = "autobuild-" + ("dev" if isdev else "stable") + ("-html" if quick else "")
203199
logging.info("Running make %s", maketarget)
204200
logname = "{}-{}.log".format(os.path.basename(checkout), language)
@@ -308,7 +304,9 @@ def parse_args():
308304
default="docs")
309305
parser.add_argument(
310306
"--git",
311-
help="Use git instead of mercurial.",
307+
default=True,
308+
help="Deprecated: Use git instead of mercurial. "
309+
"Defaults to True for compatibility.",
312310
action="store_true")
313311
parser.add_argument(
314312
"--log-directory",
@@ -349,7 +347,7 @@ def main():
349347
try:
350348
build_one(version, devel, args.quick, venv,
351349
args.build_root, args.www_root,
352-
args.skip_cache_invalidation, args.group, args.git,
350+
args.skip_cache_invalidation, args.group,
353351
args.log_directory, language)
354352
except Exception:
355353
logging.exception("docs build raised exception")

0 commit comments

Comments
 (0)
0