@@ -155,7 +155,7 @@ def translation_branch(locale_repo, locale_clone_dir, needed_version):
155
155
156
156
157
157
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' ,
159
159
log_directory = '/var/log/docsbuild/' , language = None ):
160
160
if not language :
161
161
language = 'en'
@@ -193,12 +193,8 @@ def build_one(version, isdev, quick, venv, build_root, www_root,
193
193
os .chdir (checkout )
194
194
195
195
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" )
202
198
maketarget = "autobuild-" + ("dev" if isdev else "stable" ) + ("-html" if quick else "" )
203
199
logging .info ("Running make %s" , maketarget )
204
200
logname = "{}-{}.log" .format (os .path .basename (checkout ), language )
@@ -308,7 +304,9 @@ def parse_args():
308
304
default = "docs" )
309
305
parser .add_argument (
310
306
"--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." ,
312
310
action = "store_true" )
313
311
parser .add_argument (
314
312
"--log-directory" ,
@@ -349,7 +347,7 @@ def main():
349
347
try :
350
348
build_one (version , devel , args .quick , venv ,
351
349
args .build_root , args .www_root ,
352
- args .skip_cache_invalidation , args .group , args . git ,
350
+ args .skip_cache_invalidation , args .group ,
353
351
args .log_directory , language )
354
352
except Exception :
355
353
logging .exception ("docs build raised exception" )
0 commit comments