How to submit edited changes git review

Clone from git


$ git clone https://github.com/openstack/cinder.git

Cloning into 'cinder'...
remote: Counting objects: 42771, done.
remote: Compressing objects: 100% (38/38), done.
remote: Total 42771 (delta 17), reused 4 (delta 0)
Receiving objects: 100% (42771/42771), 20.94 MiB | 52.00 KiB/s, done.
Resolving deltas: 100% (27315/27315), done.
Checking connectivity... done.

Go to cinder directory

cd cinder

Get the latest Patch Set

$ git fetch https://review.openstack.org/openstack/cinder refs/changes/12/110312/4 && git checkout FETCH_HEAD


* branch refs/changes/12/110312/4 -> FETCH_HEAD
Note: checking out 'FETCH_HEAD'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b new_branch_name
HEAD is now at c07acab... Change corrupted spelling mistakes

Find last 2 commits

$ git log -n 2

commit c07acabc8ff20f1a0019f04293497cb5020d9b95

Date: Tue Jul 29 20:25:19 2014 +0530
message
Change-Id: I62b4d94d135fa620fac071a5196957c11bb03b77
commit d5b77351379b642c5c74afaee201050b76bad777
Merge: 79ea70f 09f6fe6
Author: Jenkins <jenkins@review.openstack.org>
Date: Tue Jul 29 02:11:05 2014 +0000
Merge "Get updated model info on volume transfer"


Find diff between last two commits


$ git diff <second-last-commit_id>..<last-commit_id>

Open file in "vim"

$ vim <filename>


Commit the changes

$ git commit cinder/tests/test_storwize_svc.py –amend

svc.py --amend
[detached HEAD 4bdce99] message


Submitt changes for review

$ git review

Creating a git remote called "gerrit" that maps to:
ssh://review.openstack.org:29418/openstack/cinder.git
Your change was committed before the commit hook was installed.
Amending the commit to add a gerrit change id.
remote: Resolving deltas: 100% (12/12)
remote: Processing changes: updated: 1, refs: 1, done
To ssh://review.openstack.org:29418/openstack/cinder.git
* [new branch] HEAD -> refs/publish/master/(detached


Comments

Popular posts from this blog

AttributeError: Got AttributeError when attempting to get a value for field `abc` on serializer `PfleSerializer`. The serializer field might be named incorrectly and not match any attribute or key on the `QuerySet` instance. Original exception text was: 'QuerySet' object has no attribute 'abc'.

ImportError: No module named regex