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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkit-patch

Issue 2137013004: Re-add the path() method of WebKitPatch. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update unit test. Created 4 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
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/tool/webkit_patch.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2011 Code Aurora Forum. All rights reserved. 2 # Copyright (c) 2011 Code Aurora Forum. All rights reserved.
3 # Copyright (c) 2010 Google Inc. All rights reserved. 3 # Copyright (c) 2010 Google Inc. All rights reserved.
4 # Copyright (c) 2009 Apple Inc. All rights reserved. 4 # Copyright (c) 2009 Apple Inc. All rights reserved.
5 # Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org) 5 # Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org)
6 # 6 #
7 # Redistribution and use in source and binary forms, with or without 7 # Redistribution and use in source and binary forms, with or without
8 # modification, are permitted provided that the following conditions are 8 # modification, are permitted provided that the following conditions are
9 # met: 9 # met:
10 # 10 #
(...skipping 12 matching lines...) Expand all
23 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 24 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 25 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 26 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 32
33 import codecs
33 import logging 34 import logging
35 import os
34 import signal 36 import signal
35 import sys 37 import sys
36 import codecs
37 38
38 import webkitpy.common.version_check 39 import webkitpy.common.version_check
39 40
40 from webkitpy.common.system.logutils import configure_logging 41 from webkitpy.common.system.logutils import configure_logging
41 from webkitpy.tool.webkit_patch import WebKitPatch 42 from webkitpy.tool.webkit_patch import WebKitPatch
42 43
43 # A StreamWriter will by default try to encode all objects passed 44 # A StreamWriter will by default try to encode all objects passed
44 # to write(), so when passed a raw string already encoded as utf8, 45 # to write(), so when passed a raw string already encoded as utf8,
45 # it will blow up with an UnicodeDecodeError. This does not match 46 # it will blow up with an UnicodeDecodeError. This does not match
46 # the default behaviour of writing to sys.stdout, so we intercept 47 # the default behaviour of writing to sys.stdout, so we intercept
(...skipping 23 matching lines...) Expand all
70 71
71 def main(): 72 def main():
72 # This is a hack to let us enable DEBUG logging as early as possible. 73 # This is a hack to let us enable DEBUG logging as early as possible.
73 # Note this can't be ternary as versioning.check_version() 74 # Note this can't be ternary as versioning.check_version()
74 # hasn't run yet and this python might be older than 2.5. 75 # hasn't run yet and this python might be older than 2.5.
75 if set(["-v", "--verbose"]).intersection(set(sys.argv)): 76 if set(["-v", "--verbose"]).intersection(set(sys.argv)):
76 logging_level = logging.DEBUG 77 logging_level = logging.DEBUG
77 else: 78 else:
78 logging_level = logging.INFO 79 logging_level = logging.INFO
79 configure_logging(logging_level=logging_level) 80 configure_logging(logging_level=logging_level)
80 WebKitPatch().main() 81 WebKitPatch(os.path.abspath(__file__)).main()
81 82
82 83
83 if __name__ == "__main__": 84 if __name__ == "__main__":
84 try: 85 try:
85 main() 86 main()
86 except KeyboardInterrupt: 87 except KeyboardInterrupt:
87 sys.exit(signal.SIGINT + 128) 88 sys.exit(signal.SIGINT + 128)
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/tool/webkit_patch.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698