rename HACKING to CONTRIBUTING.md

GitHub treats the CONTRIBUTING file special, in that it is referenced
any time someone files a new issue or starts to create a pull request.
Also make minor updates to file to use markdown and current hacking
instructions.

Change-Id: I68f0d7a69397851ee6c65671ae692cbfb2b93946
This commit is contained in:
Will Norris 2016-04-27 12:10:10 -07:00
parent 7effca63b7
commit a1ec9bf60e
4 changed files with 33 additions and 32 deletions

View File

@ -17,7 +17,7 @@ godoc.org.
It's recommended you use git to fetch the source code, rather than It's recommended you use git to fetch the source code, rather than
hack from a Camlistore release's zip file: hack from a Camlistore release's zip file:
$ git clone https://camlistore.googlesource.com/camlistore $ git clone https://camlistore.googlesource.com/camlistore
(We use github for distribution but its code review system is so poor, (We use github for distribution but its code review system is so poor,
we don't use its Pull Request mechanism. The Gerrit git server & code we don't use its Pull Request mechanism. The Gerrit git server & code
@ -29,7 +29,7 @@ to discuss the ways in which their code review tools are poor.)
On Debian/Ubuntu, some deps to get started: On Debian/Ubuntu, some deps to get started:
$ sudo apt-get install libsqlite3-dev sqlite3 pkg-config git $ sudo apt-get install libsqlite3-dev sqlite3 pkg-config git
During development, rather than use the main binaries ("camput", During development, rather than use the main binaries ("camput",
"camget", "camtool", "cammount", etc) directly, we instead use a "camget", "camtool", "cammount", etc) directly, we instead use a
@ -38,38 +38,42 @@ the test server & test environment.
To build devcam: To build devcam:
$ go run make.go $ go run make.go
And devcam will be in <camroot>/bin/devcam. You'll probably want to And devcam will be in &lt;camroot&gt;/bin/devcam. You'll probably want to
symlink it into your $PATH. symlink it into your $PATH.
Alternatively, if your Camlistore root is checked out at Alternatively, if your Camlistore root is checked out at
$GOPATH/src/camlistore.org (optional, but natural for Go users), you $GOPATH/src/camlistore.org (optional, but natural for Go users), you
can just: can just:
$ export GO15VENDOREXPERIMENT=1 # required for all Camlistore builds $ export GO15VENDOREXPERIMENT=1 # required for all Camlistore builds
$ go install ./dev/devcam $ go install ./dev/devcam
The subcommands of devcam start the server or run camput/camget/etc: The subcommands of devcam start the server or run camput/camget/etc:
$ devcam server # main server $ devcam server # main server
$ devcam appengine # App Engine version of the server $ devcam appengine # App Engine version of the server
$ devcam put # camput $ devcam put # camput
$ devcam get # camget $ devcam get # camget
$ devcam tool # camtool $ devcam tool # camtool
$ devcam mount # cammount $ devcam mount # cammount
Once the dev server is running, Once the dev server is running,
- Upload a file: - Upload a file:
devcam put file ~/camlistore/COPYING devcam put file ~/camlistore/COPYING
- Create a permanode:
- Create a permanode:
devcam put permanode devcam put permanode
- Use the UI: http://localhost:3179/ui/
- Use the UI: http://localhost:3179/ui/
Before submitting a patch, you should check that all the tests pass with: Before submitting a patch, you should check that all the tests pass with:
$ devcam test $ devcam test
You can use your usual git workflow to commit your changes, but for each You can use your usual git workflow to commit your changes, but for each
change to be reviewed you should merge your commits into one before submitting change to be reviewed you should merge your commits into one before submitting
@ -84,31 +88,28 @@ https://help.github.com/articles/closing-issues-via-commit-messages/).
For example: For example:
" > pkg/search: add "file" predicate to search by file name
pkg/search: add "file" predicate to search by file name
File names were already indexed but there was no way to query the index for a file > File names were already indexed but there was no way to query the index for a file
by its name. The "file" predicate can now be used in search expressions (e.g. in the > by its name. The "file" predicate can now be used in search expressions (e.g. in the
search box of the web user interface) to achieve that. > search box of the web user interface) to achieve that.
Fixes #10987 > Fixes #10987
"
If your commit is adding or updating a vendored third party, you must indicate If your commit is adding or updating a vendored third party, you must indicate
in your commit message the version (e.g. git commit hash) of said third party. in your commit message the version (e.g. git commit hash) of said third party.
We follow the Go convention for commits (messages) about new Contributors. We follow the Go convention for commits (messages) about new Contributors.
See https://golang.org/doc/contribute.html#copyright , and examples such as See https://golang.org/doc/contribute.html#copyright , and examples such as
https://camlistore.googlesource.com/camlistore/+/85bf99a72974d88c2ed5d9753d97ad71766b4023 https://camlistore.org/gw/85bf99a7
You can optionally use our pre-commit hook so that your code gets gofmt'ed You can optionally use our pre-commit hook so that your code gets gofmt'ed
before being submitted (which should be done anyway). before being submitted (which should be done anyway).
$ cd .git/hooks $ devcam hook
$ ln -s ../../misc/pre-commit.githook pre-commit
Finally, submit your code to gerrit with: Finally, submit your code to gerrit with:
$ devcam review $ devcam review
Please update this file as appropriate. Please update this file as appropriate.

4
README
View File

@ -10,8 +10,8 @@ lack of a better name. For more, see:
Other useful files: Other useful files:
BUILDING how to compile it ("go run make.go") BUILDING how to compile it ("go run make.go")
HACKING how to do development and contribute CONTRIBUTING how to do development and contribute
Mailing lists: Mailing lists:

View File

@ -201,5 +201,5 @@ You will then have to populate that directory with all the necessary resources
Alternatively, you can run `devcam appengine` once, which will create and Alternatively, you can run `devcam appengine` once, which will create and
populate the default directory (`server/appengine/source_root`). Please see the populate the default directory (`server/appengine/source_root`). Please see the
[HACKING](https://camlistore.googlesource.com/camlistore/+/master/HACKING) doc [CONTRIBUTING](https://camlistore.googlesource.com/camlistore/+/master/CONTRIBUTING.md)
to build devcam. doc to build devcam.

View File

@ -36,7 +36,7 @@
<li>Usual Work Flow</li> <li>Usual Work Flow</li>
<ul> <ul>
<li>Create a topic branch, make some changes and commit away.</li> <li>Create a topic branch, make some changes and commit away.</li>
<li>Read <a href="https://camlistore.googlesource.com/camlistore/+/master/HACKING">HACKING</a>. Install devcam.</li> <li>Read <a href="https://camlistore.googlesource.com/camlistore/+/master/CONTRIBUTING.md">CONTRIBUTING</a>. Install devcam.</li>
<li>Test. (<code>devcam test</code>). </li> <li>Test. (<code>devcam test</code>). </li>
<li>Squash your changes into a single change, and compose a proper commit message.</li> <li>Squash your changes into a single change, and compose a proper commit message.</li>
<li>Send for review with: <pre>devcam review</pre></li> <li>Send for review with: <pre>devcam review</pre></li>