Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(489)

Side by Side Diff: Tools/Scripts/webkitpy/tool/commands/rebaseline.py

Issue 1235353002: Fix resolution of local branch name in scm and rebaseline tools. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2010 Google Inc. All rights reserved. 1 # Copyright (c) 2010 Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer 10 # copyright notice, this list of conditions and the following disclaimer
(...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after
836 did_finish = False 836 did_finish = False
837 try: 837 try:
838 # Setup git-svn for dcommit if necessary. 838 # Setup git-svn for dcommit if necessary.
839 if tool.executive.run_command( 839 if tool.executive.run_command(
840 ['git', 'config', '--local', '--get-regexp', r'^svn-remote\. '], 840 ['git', 'config', '--local', '--get-regexp', r'^svn-remote\. '],
841 return_exit_code=True): 841 return_exit_code=True):
842 tool.executive.run_command(['git', 'auto-svn']) 842 tool.executive.run_command(['git', 'auto-svn'])
843 843
844 # Save the current branch name and checkout a clean branch for the p atch. 844 # Save the current branch name and checkout a clean branch for the p atch.
845 old_branch_name = tool.executive.run_command( 845 old_branch_name = tool.executive.run_command(
846 ["git", "rev-parse", "--symbolic-full-name", "HEAD"]) 846 ["git", "rev-parse", "--symbolic-full-name", "HEAD"]).strip()
Xianzhu 2015/07/15 21:16:58 If scm.current_branch() had problem we should fix
joelo 2015/07/16 21:48:48 Done.
847 if old_branch_name == "HEAD": 847 if old_branch_name == "HEAD":
848 # If HEAD is detached use commit SHA instead. 848 # If HEAD is detached use commit SHA instead.
849 old_branch_name = tool.executive.run_command(["git", "rev-parse" , "HEAD"]) 849 old_branch_name = tool.executive.run_command(["git", "rev-parse" , "HEAD"])
850 tool.scm().delete_branch(self.AUTO_REBASELINE_BRANCH_NAME) 850 tool.scm().delete_branch(self.AUTO_REBASELINE_BRANCH_NAME)
851 tool.scm().create_clean_branch(self.AUTO_REBASELINE_BRANCH_NAME) 851 tool.scm().create_clean_branch(self.AUTO_REBASELINE_BRANCH_NAME)
852 852
853 # If the tests are passing everywhere, then this list will be empty. We don't need 853 # If the tests are passing everywhere, then this list will be empty. We don't need
854 # to rebaseline, but we'll still need to update TestExpectations. 854 # to rebaseline, but we'll still need to update TestExpectations.
855 if test_prefix_list: 855 if test_prefix_list:
856 self._rebaseline(options, test_prefix_list) 856 self._rebaseline(options, test_prefix_list)
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
951 self._tool.scm().checkout_branch(old_branch_name) 951 self._tool.scm().checkout_branch(old_branch_name)
952 else: 952 else:
953 self._log_queue.put(self.QUIT_LOG) 953 self._log_queue.put(self.QUIT_LOG)
954 log_thread.join() 954 log_thread.join()
955 955
956 def execute(self, options, args, tool): 956 def execute(self, options, args, tool):
957 self._verbose = options.verbose 957 self._verbose = options.verbose
958 while True: 958 while True:
959 self._do_one_rebaseline() 959 self._do_one_rebaseline()
960 time.sleep(self.SLEEP_TIME_IN_SECONDS) 960 time.sleep(self.SLEEP_TIME_IN_SECONDS)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698