If you are a Skia committer and have been asked to commit an externally-submitted patch, this is how to do it. (This technique is useful in other situations too, like if you just want to try out somebody else’s patch locally.)
Notes:
See also Contributing Code for The Chromium Projects.
If you use git cl
, then you should be able to use the shortcut:
git cl patch 6201055
If you use gcl
, or the above doesn’t work, the following should always work.
Prepare your local workspace to accept the patch.
trunk/
) of the workspace where you
want to apply the patch.Download the raw patch set.
If you are on Linux or Mac and have «curl» or «wget» installed, you can download the patch from the command line:
curl https://codereview.appspot.com/download/issue6201055_1.diff
--output patch.txt
# or...
wget https://codereview.appspot.com/download/issue6201055_1.diff
--output-document=patch.txt
Otherwise, figure out some other way to download this file and save it as
patch.txt
Apply this patch to your local checkout.
You should still be in the root directory of the workspace where you want to apply the patch.
patch -p1 <patch.txt
Then you can run diff
and visually check the local changes.
Complications: If the patch fails to apply, the following may be happening: