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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/scm/svn.py

Issue 1379493002: Use chromium revision instead of blink svn revision when rebaselining layout tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove multiple repo support Created 5 years, 2 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
OLDNEW
1 # Copyright (c) 2009, 2010, 2011 Google Inc. All rights reserved. 1 # Copyright (c) 2009, 2010, 2011 Google Inc. All rights reserved.
2 # Copyright (c) 2009 Apple Inc. All rights reserved. 2 # Copyright (c) 2009 Apple Inc. All rights reserved.
3 # 3 #
4 # Redistribution and use in source and binary forms, with or without 4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are 5 # modification, are permitted provided that the following conditions are
6 # met: 6 # met:
7 # 7 #
8 # * Redistributions of source code must retain the above copyright 8 # * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer. 9 # notice, this list of conditions and the following disclaimer.
10 # * Redistributions in binary form must reproduce the above 10 # * Redistributions in binary form must reproduce the above
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 def _deleted_files(self): 173 def _deleted_files(self):
174 return self._run_status_and_extract_filenames(self.status_command(), sel f._status_regexp("D")) 174 return self._run_status_and_extract_filenames(self.status_command(), sel f._status_regexp("D"))
175 175
176 @staticmethod 176 @staticmethod
177 def supports_local_commits(): 177 def supports_local_commits():
178 return False 178 return False
179 179
180 def display_name(self): 180 def display_name(self):
181 return "svn" 181 return "svn"
182 182
183 def svn_revision(self, path):
184 return self.value_from_svn_info(path, 'Revision')
185
186 def timestamp_of_revision(self, path, revision): 183 def timestamp_of_revision(self, path, revision):
187 # We use --xml to get timestamps like 2013-02-08T08:18:04.964409Z 184 # We use --xml to get timestamps like 2013-02-08T08:18:04.964409Z
188 repository_root = self.value_from_svn_info(self.checkout_root, 'Reposito ry Root') 185 repository_root = self.value_from_svn_info(self.checkout_root, 'Reposito ry Root')
189 info_output = Executive().run_command([self.executable_name, 'log', '-r' , revision, '--xml', repository_root], cwd=path).rstrip() 186 info_output = Executive().run_command([self.executable_name, 'log', '-r' , revision, '--xml', repository_root], cwd=path).rstrip()
190 match = re.search(r"^<date>(?P<value>.+)</date>\r?$", info_output, re.MU LTILINE) 187 match = re.search(r"^<date>(?P<value>.+)</date>\r?$", info_output, re.MU LTILINE)
191 return match.group('value') 188 return match.group('value')
192 189
193 def create_patch(self, git_commit=None, changed_files=None): 190 def create_patch(self, git_commit=None, changed_files=None):
194 """Returns a byte array (str()) representing the patch file. 191 """Returns a byte array (str()) representing the patch file.
195 Patch files are effectively binary since they may contain 192 Patch files are effectively binary since they may contain
196 files of multiple different encodings.""" 193 files of multiple different encodings."""
197 if changed_files == []: 194 if changed_files == []:
198 return "" 195 return ""
199 elif changed_files == None: 196 elif changed_files == None:
200 changed_files = [] 197 changed_files = []
201 return self._run([self._filesystem.join(self.checkout_root, 'Tools', 'Sc ripts', 'svn-create-patch')] + changed_files, 198 return self._run([self._filesystem.join(self.checkout_root, 'Tools', 'Sc ripts', 'svn-create-patch')] + changed_files,
202 cwd=self.checkout_root, return_stderr=False, 199 cwd=self.checkout_root, return_stderr=False,
203 decode_output=False) 200 decode_output=False)
204 201
205 def blame(self, path): 202 def blame(self, path):
206 return self._run_svn(['blame', path]) 203 return self._run_svn(['blame', path])
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698