def upgrade(self, d, version, options):
sh = shell.Shell()
if not os.path.isfile("AdminSettings.php"):
- sh.call("git", "checkout", "mediawiki-" + str(version), "--", "AdminSettings.php")
+ sh.call("git", "checkout", "-q", "mediawiki-" + str(version), "--", "AdminSettings.php")
try:
result = sh.eval("php", "maintenance/update.php", "--quick", log=True)
except shell.CallError as e:
appname, _, version = app.partition('-')
application = deploy.applications()[appname]
sh = shell.Shell()
- sh.call("git", "clone", "--shared", application.repository(options.srv_path), dir)
+ sh.call("git", "clone", "-q", "--shared", application.repository(options.srv_path), dir)
with util.ChangeDirectory(dir):
if version:
- sh.call("git", "reset", "--hard", app)
+ sh.call("git", "reset", "-q", "--hard", app)
# this command's stdin should be hooked up to ours
try:
configure_args = args[2:] + command.makeBaseArgs(options)
temp_wc_dir = perform_tmp_clone(sh)
with util.ChangeDirectory(temp_wc_dir):
sh.call("git", "remote", "add", "scripts", repo)
- sh.call("git", "fetch", "scripts")
+ sh.call("git", "fetch", "-q", "scripts")
user_commit, next_commit = calculate_parents(sh, version)
# save variables so that --continue will work
# yeah yeah no trailing newline whatever
# a master branch may not necessarily exist if the user
# was manually installed to an earlier version
try:
- sh.call("git", "checkout", "-b", "master", "--")
+ sh.call("git", "checkout", "-q", "-b", "master", "--")
except shell.CallError:
- sh.call("git", "checkout", "master", "--")
- sh.call("git", "reset", "--hard", final_commit)
+ sh.call("git", "checkout", "-q", "master", "--")
+ sh.call("git", "reset", "-q", "--hard", final_commit)
d.verifyVersion()
# Till now, all of our operations were in a tmp sandbox.
if options.dry_run:
with util.IgnoreKeyboardInterrupts():
with util.LockDirectory(".scripts-upgrade-lock"):
# git merge (which performs a fast forward)
- sh.call("git", "pull", temp_wc_dir, "master")
+ sh.call("git", "pull", "-q", temp_wc_dir, "master")
version_obj = distutils.version.LooseVersion(version.partition('-')[2])
try:
# run update script
temp_dir = tempfile.mkdtemp(prefix="wizard")
temp_wc_dir = os.path.join(temp_dir, "repo")
logging.info("Using temporary directory: " + temp_wc_dir)
- sh.call("git", "clone", "--shared", ".", temp_wc_dir)
+ sh.call("git", "clone", "-q", "--shared", ".", temp_wc_dir)
return temp_wc_dir
def perform_merge(sh, repo, d, version):
# crazy merge algorithm:
def make_virtual_commit(tag, parents = []):
"""WARNING: Changes state of Git repository"""
- sh.call("git", "checkout", tag, "--")
+ sh.call("git", "checkout", "-q", tag, "--")
d.parametrize(".")
for file in d.application.parametrized_files:
try: