From 6a06348bb7457d4957549a44111de07b2f646446 Mon Sep 17 00:00:00 2001 From: Michael Achenbach Date: Thu, 13 Nov 2014 10:22:45 +0100 Subject: [PATCH] Fix landing candidate pushes. BUG=chromium:410721 LOG=n TBR=tandrii@chromium.org TEST=script_test.py Review URL: https://codereview.chromium.org/725503003 Cr-Commit-Position: refs/heads/master@{#25318} --- tools/push-to-trunk/common_includes.py | 6 ------ tools/push-to-trunk/git_recipes.py | 4 ---- tools/push-to-trunk/push_to_trunk.py | 7 +------ tools/push-to-trunk/test_scripts.py | 5 +---- 4 files changed, 2 insertions(+), 20 deletions(-) diff --git a/tools/push-to-trunk/common_includes.py b/tools/push-to-trunk/common_includes.py index 21cdcf4..ac78ef8 100644 --- a/tools/push-to-trunk/common_includes.py +++ b/tools/push-to-trunk/common_includes.py @@ -287,9 +287,6 @@ class VCInterface(object): def RemoteBranch(self, name): raise NotImplementedError() - def Land(self): - raise NotImplementedError() - def CLLand(self): raise NotImplementedError() @@ -356,9 +353,6 @@ class GitInterface(VCInterface): self.step.Git("tag %s %s" % (tag, commit)) self.step.Git("push origin %s" % tag) - def Land(self): - self.step.Git("push origin") - def CLLand(self): self.step.GitCLLand() diff --git a/tools/push-to-trunk/git_recipes.py b/tools/push-to-trunk/git_recipes.py index 77ece5f..cabb78a 100644 --- a/tools/push-to-trunk/git_recipes.py +++ b/tools/push-to-trunk/git_recipes.py @@ -231,10 +231,6 @@ class GitRecipesMixin(object): def GitPresubmit(self, **kwargs): self.Git("cl presubmit", "PRESUBMIT_TREE_CHECK=\"skip\"", **kwargs) - def GitDCommit(self, **kwargs): - self.Git( - "cl dcommit -f --bypass-hooks", retry_on=lambda x: x is None, **kwargs) - def GitCLLand(self, **kwargs): self.Git( "cl land -f --bypass-hooks", retry_on=lambda x: x is None, **kwargs) diff --git a/tools/push-to-trunk/push_to_trunk.py b/tools/push-to-trunk/push_to_trunk.py index e873232..6e821f2 100755 --- a/tools/push-to-trunk/push_to_trunk.py +++ b/tools/push-to-trunk/push_to_trunk.py @@ -51,11 +51,6 @@ class Preparation(Step): self.PrepareBranch() self.DeleteBranch(self.Config("TRUNKBRANCH")) - # Allow directly pushing to candidates. - if not self.Git("config --get remote.origin.push").strip(): - self.Git("config --add remote.origin.push " - "refs/remotes/origin/candidates:refs/pending/heads/candidates") - class FreshBranch(Step): MESSAGE = "Create a fresh branch." @@ -355,7 +350,7 @@ class Land(Step): MESSAGE = "Land the patch." def RunStep(self): - self.vc.Land() + self.vc.CLLand() class TagRevision(Step): diff --git a/tools/push-to-trunk/test_scripts.py b/tools/push-to-trunk/test_scripts.py index fdb5cdc..bea8f3c 100644 --- a/tools/push-to-trunk/test_scripts.py +++ b/tools/push-to-trunk/test_scripts.py @@ -772,9 +772,6 @@ Performance and stability improvements on all platforms.""", commit) Cmd("git fetch", ""), Cmd("git branch", " branch1\n* branch2\n"), Cmd("git branch", " branch1\n* branch2\n"), - Cmd("git config --get remote.origin.push", ""), - Cmd("git config --add remote.origin.push " - "refs/remotes/origin/candidates:refs/pending/heads/candidates", ""), Cmd(("git new-branch %s --upstream origin/master" % TEST_CONFIG["BRANCHNAME"]), ""), @@ -823,7 +820,7 @@ Performance and stability improvements on all platforms.""", commit) if manual: expectations.append(RL("Y")) # Sanity check. expectations += [ - Cmd("git push origin", ""), + Cmd("git cl land -f --bypass-hooks", ""), Cmd("git fetch", ""), Cmd("git log -1 --format=%H --grep=" "\"Version 3.22.5 (based on push_hash)\"" -- 2.7.4