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