blob: 4b07e4b28ea87e6ef118e699c2b3cee8ebaf177c [file] [log] [blame]
Dave Borowitzeb794ea2012-11-12 14:48:15 -08001Gitiles - A simple JGit repository browser
2==========================================
3
4Gitiles is a simple repository browser for Git repositories, built on JGit. Its
5guiding principle is simplicity: it has no formal access controls, no write
6access, no fancy Javascript, etc.
Eric Seidel48816fb2013-06-11 17:17:50 -07007
8
9BUILDING
10
Dave Borowitz4cecfb02014-03-21 09:49:57 -070011Gitiles requires Buck (http://facebook.github.io/buck/) to build.
Eric Seidel48816fb2013-06-11 17:17:50 -070012
Dave Borowitz4cecfb02014-03-21 09:49:57 -070013 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 Seidel48816fb2013-06-11 17:17:50 -070021
22
23TESTING
24
Dave Borowitzf5309232014-07-29 12:50:40 -070025 cd /path/to/repositories # Don't run from the gitiles repo.
Dave Borowitz4cecfb02014-03-21 09:49:57 -070026 /path/to/gitiles/tools/run_dev.sh
27
28This will recompile and start a development server.
Dave Borowitzf5309232014-07-29 12:50:40 -070029Open http://localhost:8080/ to view your local copy of gitiles, which will serve
30any repositories under /path/to/repositories.
Eric Seidel48816fb2013-06-11 17:17:50 -070031
32
33ECLIPSE
34
Dave Borowitz4cecfb02014-03-21 09:49:57 -070035If 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 Seidel48816fb2013-06-11 17:17:50 -070037
Dave Borowitz4cecfb02014-03-21 09:49:57 -070038Import the project in Eclipse:
39 File -> Import -> Existing Projects into Workpace
Eric Seidel48816fb2013-06-11 17:17:50 -070040
Dave Borowitz4cecfb02014-03-21 09:49:57 -070041The project only needs to be rebuilt if the source roots or third-party
42libraries have changed. For best results, ensure the project is closed in
43Eclipse before rebuilding.
Eric Seidel48816fb2013-06-11 17:17:50 -070044
45
46CODE REVIEW
47
48Gitiles uses Gerrit for code review:
49https://gerrit-review.googlesource.com/
50
51Gitiles uses the "git push" workflow described here:
52http://gerrit.googlecode.com/svn/documentation/2.0/user-upload.html
53With the server https://gerrit.googlesource.com/gitiles
54You'll need a password from: https://gerrit.googlesource.com/new-password
55
56Gerrit depends on "Change-Id" annotations in your commit message.
57If you try to push a commit without one, it will explain how to
58install the proper git-hook:
59
60curl -Lo `git rev-parse --git-dir`/hooks/commit-msg \
61 https://gerrit-review.googlesource.com/tools/hooks/commit-msg
62chmod +x `git rev-parse --git-dir`/hooks/commit-msg
63
64Before you create your local commit (which you'll push to Gerrit)
65you will need to set your email to match your Gerrit account:
66git config --local --add user.email [email protected]
67
68Normally you'll create code reviews for pushes to master:
69git push origin HEAD:refs/for/master