Reviewers: Jakob,

Message:
PTAL

Description:
Fix branch for resetting change log in push-to-trunk.

The patch is applied to ChangeLog with the "--index" option, which already
updates the index of the file. For resetting the ChangeLog to the trunk
revision, the trunk branch needs to be stated explicitly in the checkout,
otherwise it checks out the already patched HEAD.

TEST=tools/push-to-trunk/script_test.py

Please review this at https://codereview.chromium.org/199993005/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+5, -4 lines):
  M tools/push-to-trunk/git_recipes.py
  M tools/push-to-trunk/push_to_trunk.py
  M tools/push-to-trunk/test_scripts.py


Index: tools/push-to-trunk/git_recipes.py
diff --git a/tools/push-to-trunk/git_recipes.py b/tools/push-to-trunk/git_recipes.py index 4358258d3fc730ed0bc5edaa135fe9006fb8eade..7d9c4026e217a46e9461e6a41b15ef237e6f7252 100644
--- a/tools/push-to-trunk/git_recipes.py
+++ b/tools/push-to-trunk/git_recipes.py
@@ -63,9 +63,10 @@ class GitRecipesMixin(object):
     assert name
     self.Git(MakeArgs(["checkout -f", name]))

-  def GitCheckoutFile(self, name):
+  def GitCheckoutFile(self, name, branch):
     assert name
-    self.Git(MakeArgs(["checkout -f --", name]))
+    assert branch
+    self.Git(MakeArgs(["checkout -f", branch, "--", name]))

   @Strip
   def GitCurrentBranch(self):
Index: tools/push-to-trunk/push_to_trunk.py
diff --git a/tools/push-to-trunk/push_to_trunk.py b/tools/push-to-trunk/push_to_trunk.py index ce1773447e423619b102740e24c9a3e210e1b7cf..eca699315964e7646b9ed1fc2265978eaf1b94ca 100755
--- a/tools/push-to-trunk/push_to_trunk.py
+++ b/tools/push-to-trunk/push_to_trunk.py
@@ -318,7 +318,7 @@ class AddChangeLog(Step):
# The change log has been modified by the patch. Reset it to the version # on trunk and apply the exact changes determined by this PrepareChangeLog
     # step above.
-    self.GitCheckoutFile(self.Config(CHANGELOG_FILE))
+    self.GitCheckoutFile(self.Config(CHANGELOG_FILE), "svn/trunk")
     changelog_entry = FileToText(self.Config(NEW_CHANGELOG_FILE))
     old_change_log = FileToText(self.Config(CHANGELOG_FILE))
     new_change_log = "%s\n\n\n%s" % (changelog_entry, old_change_log)
Index: tools/push-to-trunk/test_scripts.py
diff --git a/tools/push-to-trunk/test_scripts.py b/tools/push-to-trunk/test_scripts.py index d2a29dac3da94822d40e11c67ff220c7914e5160..0edfbfe9747a1c39836548d9b5c8e238b626f87e 100644
--- a/tools/push-to-trunk/test_scripts.py
+++ b/tools/push-to-trunk/test_scripts.py
@@ -741,7 +741,7 @@ Performance and stability improvements on all platforms.""", commit)
       Git("checkout -b %s svn/trunk" % TEST_CONFIG[TRUNKBRANCH], "",
           cb=ResetChangeLog),
       Git("apply --index --reject \"%s\"" % TEST_CONFIG[PATCH_FILE], ""),
-      Git("checkout -f -- %s" % TEST_CONFIG[CHANGELOG_FILE], "",
+      Git("checkout -f svn/trunk -- %s" % TEST_CONFIG[CHANGELOG_FILE], "",
           cb=ResetChangeLog),
       Git("add \"%s\"" % TEST_CONFIG[VERSION_FILE], ""),
       Git("commit -aF \"%s\"" % TEST_CONFIG[COMMITMSG_FILE], "",


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to