Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
gerrit_tutorial [2020/04/21 17:32] – [Preparation] rpjday | gerrit_tutorial [2020/04/21 17:55] (current) – [git-review --setup] rpjday | ||
---|---|---|---|
Line 13: | Line 13: | ||
* Install '' | * Install '' | ||
- | Test access with: | + | Test access with (should see): |
< | < | ||
Line 30: | Line 30: | ||
$ | $ | ||
</ | </ | ||
+ | |||
+ | ===== Cloning the test repo ===== | ||
+ | |||
+ | Clone a test repo: | ||
+ | |||
+ | < | ||
+ | $ git clone ssh:// | ||
+ | Cloning into ' | ||
+ | remote: Counting objects: 44, done | ||
+ | remote: Finding sources: 100% (4/4) | ||
+ | remote: Getting sizes: 100% (3/3) | ||
+ | remote: Compressing objects: 100% (127443/ | ||
+ | remote: Total 1342 (delta 0), reused 1339 (delta 0) | ||
+ | Receiving objects: 100% (1342/ | ||
+ | Resolving deltas: 100% (889/889), done. | ||
+ | $ | ||
+ | </ | ||
+ | |||
+ | The '' | ||
+ | |||
+ | < | ||
+ | [core] | ||
+ | repositoryformatversion = 0 | ||
+ | filemode = true | ||
+ | bare = false | ||
+ | logallrefupdates = true | ||
+ | [remote " | ||
+ | url = ssh:// | ||
+ | fetch = +refs/ | ||
+ | [branch " | ||
+ | remote = origin | ||
+ | merge = refs/ | ||
+ | </ | ||
+ | |||
+ | The '' | ||
+ | |||
+ | < | ||
+ | [gerrit] | ||
+ | host=gerrit.wikimedia.org | ||
+ | port=29418 | ||
+ | project=mediawiki/ | ||
+ | track=1 | ||
+ | </ | ||
+ | |||
+ | Finally, there are no configured hooks: | ||
+ | |||
+ | < | ||
+ | $ ls -1 .git/hooks | ||
+ | applypatch-msg.sample | ||
+ | commit-msg.sample | ||
+ | fsmonitor-watchman.sample | ||
+ | post-update.sample | ||
+ | pre-applypatch.sample | ||
+ | pre-commit.sample | ||
+ | pre-merge-commit.sample | ||
+ | prepare-commit-msg.sample | ||
+ | pre-push.sample | ||
+ | pre-rebase.sample | ||
+ | pre-receive.sample | ||
+ | update.sample | ||
+ | $ | ||
+ | </ | ||
+ | |||
+ | ===== Configuring git-review ===== | ||
+ | |||
+ | Verify remotes: | ||
+ | |||
+ | < | ||
+ | $ git remote -v | ||
+ | origin ssh:// | ||
+ | origin ssh:// | ||
+ | $ | ||
+ | </ | ||
+ | |||
+ | ==== Configuring git-review for origin ==== | ||
+ | |||
+ | Point '' | ||
+ | |||
+ | < | ||
+ | $ git config --global gitreview.remote origin | ||
+ | </ | ||
+ | |||
+ | Adds .gitconfig info: | ||
+ | |||
+ | < | ||
+ | gitreview.remote=origin | ||
+ | </ | ||
+ | |||
+ | ===== git-review --setup ===== | ||
+ | |||
+ | Set up '' | ||
+ | |||
+ | < | ||
+ | $ git review -s | ||
+ | </ | ||
+ | |||
+ | which does the following: | ||
+ | |||
+ | * check remote access for submitting branches (if no remote access, ask for username) | ||
+ | * create remote access called " | ||
+ | * install Gerrit '' | ||
+ | |||
+ |