Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 67 lines (41 sloc) 4.057 kb
268a2b7a » snej
2011-08-04 Tweaked the first section of the README.
1 # Building And Contributing To Couchbase Mobile For iOS
2
3 This repository contains the "manifest" for Couchbase Mobile for iOS, which is simply an XML file that instructs the "repo" tool where to find the multiple Git repositories containing the source code, and where to send patches to the Gerrit tool. If you want to build Couchbase Mobile from source, or make contributions, these instructions will get you started.
55076eaf » jchris
2011-07-05 trying out Mobile Couchbase with repo, for integration into the build…
4
b3109ccc » snej
2011-08-04 Updated the README with instructions on how to use repo and gerrit.
5 ## Get The "Repo" Tool
6
7 [Repo][1] is a tool developed for the Android build system for managing sets of related Git repositories and submitting patches [for review][2]. It's a single file that's easy to install:
55076eaf » jchris
2011-07-05 trying out Mobile Couchbase with repo, for integration into the build…
8
33912139 » grantwood
2011-09-21 README.md: changed URL for repo script to new Google Code location si…
9 $ curl http://git-repo.googlecode.com/files/repo-1.12 > ~/bin/repo
55076eaf » jchris
2011-07-05 trying out Mobile Couchbase with repo, for integration into the build…
10 $ chmod a+x ~/bin/repo
11
b3109ccc » snej
2011-08-04 Updated the README with instructions on how to use repo and gerrit.
12 (This assumes `~/bin` already exists and is in your shell search path. If not, you can add it, or you can download `repo` somewhere else that's already in your `$PATH`.)
13
14 Repo's help system works like git's. Type `repo help` to see a list of commands, and `repo help command` to get help on a particular command. (For some reason you have to be inside a directory managed by repo to be able to use help.)
15
16 ## Clone the Manifest And Couchbase Projects
55076eaf » jchris
2011-07-05 trying out Mobile Couchbase with repo, for integration into the build…
17
b3109ccc » snej
2011-08-04 Updated the README with instructions on how to use repo and gerrit.
18 $ mkdir iOS-Couchbase
19 $ cd iOS-Couchbase
1627553d » snej
2011-12-05 Changed manifest repo URL in README to git:.
20 $ repo init -u git://github.com/couchbaselabs/iOS-Couchbase-manifest.git
55076eaf » jchris
2011-07-05 trying out Mobile Couchbase with repo, for integration into the build…
21 $ repo sync
22
23 ## Build
24
b3109ccc » snej
2011-08-04 Updated the README with instructions on how to use repo and gerrit.
25 See the instructions in `CouchbaseMobile/README.md`.
26
27 To pull in changes from upstream, use the command `repo sync`, then rebuild.
28
29 ## Contribute Improvements
30
31 [“Good for you! You've decided to improve open-source software.”][3]
32
33 Important! Changes have to be submitted through the [Gerrit code-review system][2]. This is different from the Github workflow of forks and patch-requests that you may be more used to. (But hey, it beats [explosive bolts][3].)
34
35 ### Before making changes:
36
37 repo start MyBranchName --all
38
39 This will create new branches named `MyBranchName` in each git repository. Pick a branch name that reminds you of what you're working on, e.g. `optimizeTwiddling` or `fixBug1234`.
40
41 The command `repo branch` will list all current branches known to repo. `repo checkout` will check out a branch across all repositories.
42
43 ### Submitting your changes:
44
45 Commit your changes to the local git repositories as usual. If you've made changes in multiple repositories, remember to commit in each one! The command `repo status` is helpful to show uncommitted changes in all git repositories.
46
47 When you're ready to submit:
48
49 1. Enter `repo upload` to upload your patches to Gerrit.
50 2. The command will output the URL of the new code review page; go to that URL.
51 3. If necessary, sign into Gerrit, with the same email address that appears in your git commits. If that email address doesn't support OpenID, then log in using an address that does, such as any Google or Yahoo! account, then go to Settings > Identities to add your Git email address.
52 4. On the patch page, enter the email address of someone you want to review your patch, into the field next to the "Add Reviewer" button, then press the button.
53
54 ### Fixing your patches:
55
56 The reviewer(s) might find bugs or style issues that they want you to fix. If so, they'll make comments in the Gerrit web UI, which will be emailed to you. It's easy to upload a fixed patch:
57
58 1. Remember to check out the correct repo branch, if you have more than one.
59 2. Make the changes to the source.
60 3. Build and test to make sure the changes work!
61 4. Use `git amend` to update your prior commit with the new changes. DO NOT commit a second time on top of the first one, or you'll confuse Gerrit (it will think you're submitting two different changes.)
62 5. `repo upload` again, to upload the new patch-set. This won't create a new web page on Gerrit, just add content to the existing one.
63 6. You don't need to notify the reviewers; Gerrit will do that. Then they'll look at your new patch and either approve it or ask for more changes.
64
65 [1]: http://source.android.com/source/version-control.html
66 [2]: http://review.couchbase.org/
67 [3]: http://youtu.be/PePSQtc5YPU?t=6m15s
Something went wrong with that request. Please try again.