| Dave Borowitz | eb794ea | 2012-11-12 14:48:15 -0800 | [diff] [blame] | 1 | Gitiles - A simple JGit repository browser |
| 2 | ========================================== |
| 3 | |
| 4 | Gitiles is a simple repository browser for Git repositories, built on JGit. Its |
| 5 | guiding principle is simplicity: it has no formal access controls, no write |
| 6 | access, no fancy Javascript, etc. |
| Eric Seidel | 48816fb | 2013-06-11 17:17:50 -0700 | [diff] [blame] | 7 | |
| 8 | |
| 9 | BUILDING |
| 10 | |
| Dave Borowitz | 4cecfb0 | 2014-03-21 09:49:57 -0700 | [diff] [blame^] | 11 | Gitiles requires Buck (http://facebook.github.io/buck/) to build. |
| Eric Seidel | 48816fb | 2013-06-11 17:17:50 -0700 | [diff] [blame] | 12 | |
| Dave Borowitz | 4cecfb0 | 2014-03-21 09:49:57 -0700 | [diff] [blame^] | 13 | sudo apt-get install ant |
| 14 | cd ${HOME} |
| 15 | git clone https://github.com/facebook/buck.git |
| 16 | cd buck |
| 17 | ant |
| 18 | sudo ln -s ${PWD}/bin/buck /usr/bin/buck |
| 19 | cd /path/to/gitiles |
| 20 | buck build all |
| Eric Seidel | 48816fb | 2013-06-11 17:17:50 -0700 | [diff] [blame] | 21 | |
| 22 | |
| 23 | TESTING |
| 24 | |
| Dave Borowitz | 4cecfb0 | 2014-03-21 09:49:57 -0700 | [diff] [blame^] | 25 | cd /path/to/repositories |
| 26 | /path/to/gitiles/tools/run_dev.sh |
| 27 | |
| 28 | This will recompile and start a development server. |
| 29 | Open http://localhost:8080/ to view your local copy of gitiles. |
| Eric Seidel | 48816fb | 2013-06-11 17:17:50 -0700 | [diff] [blame] | 30 | |
| 31 | |
| 32 | ECLIPSE |
| 33 | |
| Dave Borowitz | 4cecfb0 | 2014-03-21 09:49:57 -0700 | [diff] [blame^] | 34 | If you'd like to use Eclipse to edit Gitiles, first generate a project file: |
| 35 | ./bucklets/tools/eclipse.py && ./bucklets/tools/eclipse.py --src |
| Eric Seidel | 48816fb | 2013-06-11 17:17:50 -0700 | [diff] [blame] | 36 | |
| Dave Borowitz | 4cecfb0 | 2014-03-21 09:49:57 -0700 | [diff] [blame^] | 37 | Import the project in Eclipse: |
| 38 | File -> Import -> Existing Projects into Workpace |
| Eric Seidel | 48816fb | 2013-06-11 17:17:50 -0700 | [diff] [blame] | 39 | |
| Dave Borowitz | 4cecfb0 | 2014-03-21 09:49:57 -0700 | [diff] [blame^] | 40 | The project only needs to be rebuilt if the source roots or third-party |
| 41 | libraries have changed. For best results, ensure the project is closed in |
| 42 | Eclipse before rebuilding. |
| Eric Seidel | 48816fb | 2013-06-11 17:17:50 -0700 | [diff] [blame] | 43 | |
| 44 | |
| 45 | CODE REVIEW |
| 46 | |
| 47 | Gitiles uses Gerrit for code review: |
| 48 | https://gerrit-review.googlesource.com/ |
| 49 | |
| 50 | Gitiles uses the "git push" workflow described here: |
| 51 | http://gerrit.googlecode.com/svn/documentation/2.0/user-upload.html |
| 52 | With the server https://gerrit.googlesource.com/gitiles |
| 53 | You'll need a password from: https://gerrit.googlesource.com/new-password |
| 54 | |
| 55 | Gerrit depends on "Change-Id" annotations in your commit message. |
| 56 | If you try to push a commit without one, it will explain how to |
| 57 | install the proper git-hook: |
| 58 | |
| 59 | curl -Lo `git rev-parse --git-dir`/hooks/commit-msg \ |
| 60 | https://gerrit-review.googlesource.com/tools/hooks/commit-msg |
| 61 | chmod +x `git rev-parse --git-dir`/hooks/commit-msg |
| 62 | |
| 63 | Before you create your local commit (which you'll push to Gerrit) |
| 64 | you will need to set your email to match your Gerrit account: |
| 65 | git config --local --add user.email [email protected] |
| 66 | |
| 67 | Normally you'll create code reviews for pushes to master: |
| 68 | git push origin HEAD:refs/for/master |