| OLD | NEW |
| 1 # GYP Hacking | 1 # GYP Hacking |
| 2 | 2 |
| 3 Note that the instructions below assume that you have the Chromium | 3 Note that the instructions below assume that you have the Chromium |
| 4 [depot tools](http://dev.chromium.org/developers/how-tos/depottools) | 4 [depot tools](http://dev.chromium.org/developers/how-tos/depottools) |
| 5 installed and configured. | 5 installed and configured. |
| 6 If you don't, you do not pass go, and you cannot collect your $200. | 6 If you don't, you do not pass go, and you cannot collect your $200. |
| 7 | 7 |
| 8 ## Getting the sources | 8 ## Getting the sources |
| 9 | 9 |
| 10 Best is to use git to hack on anything, you can set up a git clone of GYP | 10 Best is to use git to hack on anything, you can set up a git clone of GYP |
| 11 as follows: | 11 as follows: |
| 12 | 12 |
| 13 ``` | 13 ``` |
| 14 git clone https://chromium.googlesource.com/external/gyp.git | 14 git clone https://chromium.googlesource.com/external/gyp.git |
| 15 cd gyp | 15 cd gyp |
| 16 git svn init --prefix=origin/ -T trunk http://gyp.googlecode.com/svn/ | |
| 17 git config --replace-all svn-remote.svn.fetch trunk:refs/remotes/origin/master | |
| 18 git svn fetch | |
| 19 ``` | |
| 20 | |
| 21 At this point you should get a quick stream of output as git-svn rebuilds | |
| 22 it's SVN version->SHA1 database: | |
| 23 | |
| 24 ``` | |
| 25 Rebuilding .git/svn/refs/remotes/origin/master/... | |
| 26 r1 = 880a7f243635258fa4938bb7ebf9b4d5f46e3e48 | |
| 27 r2 = 24a2a4ceedce0ae16d0a107d9898e4828775c633 | |
| 28 r3 = 41276136692399ac4bb84c6664d02384fcad70ad | |
| 29 ``` | |
| 30 | |
| 31 If you get slow trickling output with a bunch of file names as such: | |
| 32 | |
| 33 ``` | |
| 34 r1 = 880a7f243635258fa4938bb7ebf9b4d5f46e3e48 (refs/remotes/git-svn) | |
| 35 A xc.py | |
| 36 ``` | |
| 37 | |
| 38 then these instructions are out of date, and you're re-downloading | |
| 39 the entire version history from SVN. Please update these instructions | |
| 40 once you've figured out what's up. | |
| 41 | |
| 42 If you intend to commit your changes back to the GYP SVN repository, | |
| 43 you need to configure git-svn's commit url. | |
| 44 | |
| 45 ``` | |
| 46 git config svn-remote.svn.commiturl https://gyp.googlecode.com/svn/trunk | |
| 47 ``` | 16 ``` |
| 48 | 17 |
| 49 ## Testing your change | 18 ## Testing your change |
| 50 | 19 |
| 51 GYP has a suite of tests which you can run with the provided test driver | 20 GYP has a suite of tests which you can run with the provided test driver |
| 52 to make sure your changes aren't breaking anything important. | 21 to make sure your changes aren't breaking anything important. |
| 53 | 22 |
| 54 You run the test driver with e.g. | 23 You run the test driver with e.g. |
| 55 | 24 |
| 56 ``` | 25 ``` |
| (...skipping 30 matching lines...) Expand all Loading... |
| 87 with e.g. | 56 with e.g. |
| 88 | 57 |
| 89 ``` | 58 ``` |
| 90 git try | 59 git try |
| 91 ``` | 60 ``` |
| 92 | 61 |
| 93 Once the change has been approved (LGTMed) and passes trybots, you can submit | 62 Once the change has been approved (LGTMed) and passes trybots, you can submit |
| 94 it with: | 63 it with: |
| 95 | 64 |
| 96 ``` | 65 ``` |
| 97 git cl dcommit | 66 git cl land |
| 98 ``` | 67 ``` |
| 99 | 68 |
| 100 To be allowed to submit, you will need committer rights in the project, and | 69 To be allowed to submit, you will need committer rights in the project. You |
| 101 your password for the SVN server. You can get that password here: | 70 need to do the new password dance at |
| 102 https://code.google.com/hosting/settings | 71 https://chromium.googlesource.com/new-password . |
| 72 |
| 73 ## Migrating from an old with-svn checkout |
| 74 |
| 75 Remove the [svn] entry from .git/config, and the .git/svn subdirs to avoid |
| 76 having `git cl land` complain that it looks like the repo is a SVN one. It might |
| 77 be easier to just repull instead. |
| OLD | NEW |