Commit 4cf232c3 authored by Sandro Knauß's avatar Sandro Knauß
Browse files

[Weblate] Replace push feature from merge_canonical_changes.

parent 4e442b49
......@@ -44,10 +44,11 @@ docron() {
log "Merging changes from main repo into the integration repo..."
git_fetch "${INTEGRATION_GIT_CHECKOUT}" origin
/var/lib/weblate/scripts/merge_canonical_changes.py \
--push \
"${INTEGRATION_GIT_CHECKOUT}" origin/master
log "done."
git_force_push "${INTEGRATION_GIT_CHECKOUT}" weblate-gatekeeper master
log "Fetching and merging changes made by Weblate into the integration repo..."
git_fetch "${INTEGRATION_GIT_CHECKOUT}" weblate
/var/lib/weblate/scripts/merge_weblate_changes.py \
......
......@@ -386,7 +386,7 @@ def updateNonMainGitLangs(source, target, potFile, tree, repopath, index):
return "\n".join(msgs)
def main(repopath, local, localCommit, remote, pushChanges=False):
def main(repopath, local, localCommit, remote):
r = git.Repo(str(repopath))
msg = "merge with main git using {}.\n\n".format(prog)
......@@ -579,11 +579,6 @@ def main(repopath, local, localCommit, remote, pushChanges=False):
# Set the working tree to the new status of "local" and empty the index
local.checkout(force=True)
if remoteBranch and pushChanges:
logger.info('pushing changes...')
_r = r.remotes[remoteBranch.remote_name]
_r.push()
def commandline():
import argparse
......@@ -607,10 +602,6 @@ def commandline():
"-d", "--debug",
action='store_true',
help="keep intermediate step files in {}/.".format(debugPath))
parser.add_argument(
"--push",
action='store_true',
help="Push created merge commits to remote.")
parser.add_argument(
"--local",
default="master",
......@@ -646,7 +637,7 @@ def commandline():
def temporaryDirectory(path):
return tempfile.TemporaryDirectory()
try:
main(args.repopath, args.local, args.localCommit, args.remote, args.push)
main(args.repopath, args.local, args.localCommit, args.remote)
except:
logger.exception("-- Something unexpected happened. Giving up. --")
raise
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment