| 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 | f530923 | 2014-07-29 12:50:40 -0700 | [diff] [blame^] | 25 | cd /path/to/repositories # Don't run from the gitiles repo. |
| Dave Borowitz | 4cecfb0 | 2014-03-21 09:49:57 -0700 | [diff] [blame] | 26 | /path/to/gitiles/tools/run_dev.sh |
| 27 | |
| 28 | This will recompile and start a development server. |
| Dave Borowitz | f530923 | 2014-07-29 12:50:40 -0700 | [diff] [blame^] | 29 | Open http://localhost:8080/ to view your local copy of gitiles, which will serve |
| 30 | any repositories under /path/to/repositories. |
| Eric Seidel | 48816fb | 2013-06-11 17:17:50 -0700 | [diff] [blame] | 31 | |
| 32 | |
| 33 | ECLIPSE |
| 34 | |
| Dave Borowitz | 4cecfb0 | 2014-03-21 09:49:57 -0700 | [diff] [blame] | 35 | If you'd like to use Eclipse to edit Gitiles, first generate a project file: |
| 36 | ./bucklets/tools/eclipse.py && ./bucklets/tools/eclipse.py --src |
| Eric Seidel | 48816fb | 2013-06-11 17:17:50 -0700 | [diff] [blame] | 37 | |
| Dave Borowitz | 4cecfb0 | 2014-03-21 09:49:57 -0700 | [diff] [blame] | 38 | Import the project in Eclipse: |
| 39 | File -> Import -> Existing Projects into Workpace |
| Eric Seidel | 48816fb | 2013-06-11 17:17:50 -0700 | [diff] [blame] | 40 | |
| Dave Borowitz | 4cecfb0 | 2014-03-21 09:49:57 -0700 | [diff] [blame] | 41 | The project only needs to be rebuilt if the source roots or third-party |
| 42 | libraries have changed. For best results, ensure the project is closed in |
| 43 | Eclipse before rebuilding. |
| Eric Seidel | 48816fb | 2013-06-11 17:17:50 -0700 | [diff] [blame] | 44 | |
| 45 | |
| 46 | CODE REVIEW |
| 47 | |
| 48 | Gitiles uses Gerrit for code review: |
| 49 | https://gerrit-review.googlesource.com/ |
| 50 | |
| 51 | Gitiles uses the "git push" workflow described here: |
| 52 | http://gerrit.googlecode.com/svn/documentation/2.0/user-upload.html |
| 53 | With the server https://gerrit.googlesource.com/gitiles |
| 54 | You'll need a password from: https://gerrit.googlesource.com/new-password |
| 55 | |
| 56 | Gerrit depends on "Change-Id" annotations in your commit message. |
| 57 | If you try to push a commit without one, it will explain how to |
| 58 | install the proper git-hook: |
| 59 | |
| 60 | curl -Lo `git rev-parse --git-dir`/hooks/commit-msg \ |
| 61 | https://gerrit-review.googlesource.com/tools/hooks/commit-msg |
| 62 | chmod +x `git rev-parse --git-dir`/hooks/commit-msg |
| 63 | |
| 64 | Before you create your local commit (which you'll push to Gerrit) |
| 65 | you will need to set your email to match your Gerrit account: |
| 66 | git config --local --add user.email [email protected] |
| 67 | |
| 68 | Normally you'll create code reviews for pushes to master: |
| 69 | git push origin HEAD:refs/for/master |