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

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

Issue 1950213002: Remove unused imports in webkitpy with using autoflake. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 7 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, Google Inc. All rights reserved. 1 # Copyright (c) 2009, 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 15 matching lines...) Expand all
26 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 # 29 #
30 # Python module for interacting with an SCM system (like SVN or Git) 30 # Python module for interacting with an SCM system (like SVN or Git)
31 31
32 import logging 32 import logging
33 import re 33 import re
34 import sys 34 import sys
35 35
36 from webkitpy.common.system.executive import Executive, ScriptError 36 from webkitpy.common.system.executive import Executive
37 from webkitpy.common.system.executive import ScriptError
37 from webkitpy.common.system.filesystem import FileSystem 38 from webkitpy.common.system.filesystem import FileSystem
38 39
39 _log = logging.getLogger(__name__) 40 _log = logging.getLogger(__name__)
40 41
41 42
42 # SCM methods are expected to return paths relative to self.checkout_root. 43 # SCM methods are expected to return paths relative to self.checkout_root.
43 class SCM: 44 class SCM:
44 45
45 def __init__(self, cwd, executive=None, filesystem=None): 46 def __init__(self, cwd, executive=None, filesystem=None):
46 self.cwd = cwd 47 self.cwd = cwd
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 #-------------------------------------------------------------------------- 134 #--------------------------------------------------------------------------
134 # Subclasses must indicate if they support local commits, 135 # Subclasses must indicate if they support local commits,
135 # but the SCM baseclass will only call local_commits methods when this is tr ue. 136 # but the SCM baseclass will only call local_commits methods when this is tr ue.
136 @staticmethod 137 @staticmethod
137 def supports_local_commits(): 138 def supports_local_commits():
138 SCM._subclass_must_implement() 139 SCM._subclass_must_implement()
139 140
140 def commit_locally_with_message(self, message): 141 def commit_locally_with_message(self, message):
141 _log.error("Your source control manager does not support local commits." ) 142 _log.error("Your source control manager does not support local commits." )
142 sys.exit(1) 143 sys.exit(1)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698