If you install and use the change ID hook, you should not
need to copy the changeIds from Gerrit since your first
upload will have dictated what the changeIds will be. When
you edit your change #1 during your rebase, all the changes
will keep their original changeIds, so when you repush them,
they will be added as new patchsets instead of as new
changes.
You can enforce this better workflow be modifying the
project to require always changeIds, thus preventing
accidental uploads without them,
-Martin
Thank you.--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
My initial reaction to this is whether you have the right process with how you are splitting up your commits.
Normally (but not always) if a task is broken up into smaller chunks then I would expect those chunks to be pushed
for review when they are complete. It sounds like this isn’t the case and you are only pushing the changes after all of
them have been done? If this is your standard method have you considered whether it is better just to get the developers
to squash the commits into a single change. It is much easier to update a single change rather than a chain of changes,
sometimes it is also easier for the reviewers to see the entire picture and review all the files in one go, other times it does
make reviewing much harder, depending on what the change is and how your project is structured.
In terms of controlling what you push the instructions to use “git push origin HEAD:refs/for/master” is a simplification and
not the complete picture, the format is really “git push origin <sha of last commit>:refs/for/<branch>”. HEAD is a convenient
shortcut to refer to the last commit on your current working branch – commit #10 in this case. However you can also specify the
actual SHA so if the SHA of #3 is abcde… you can use the command “git push origin abcde:refs/for/master” and it will only push
commits up to #3 and not push #4-#10.
Thomas
--
To unsubscribe, email
repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
I think you may be helped by the trivial rebase detector hook.
Here's where you can download the hook:
https://www.codeaurora.org/xwiki/bin/QAEP/Gerrit
I've also made an example patchset-created script you can use when you
install the hook, you'll just need to input your gerrit site path that
is passed into --private-key.
https://gist.github.com/1628673
Jason
> I didn't know that there is commit-msg hook. Now I get the hook and
> problem with duplicated patch seems to be solved.
>
> I have another question now. When I commit #1 commit, patch set for
> commits #2-10 is also uploaded. This patch are not reviewed and people
> need to review them again. Is there any solution about this?
Not upload 10 commits at a time? I'm serious. If you find yourself doing
that often, I think you have greater problems than Gerrit not working
perfectly. What if someone has serious objections in one of the first
commits, affecting everything you do in the remaining commits? Do your
commits have the right scope?
[...]
--
Magnus Bäck Opinions are my own and do not necessarily
SW Configuration Manager represent the ones of my employer, etc.
Sony Ericsson
On Tuesday, January 17, 2012 at 08:45 CET,
Lazo Apostolovski <lapost...@tricode.nl> wrote:> I didn't know that there is commit-msg hook. Now I get the hook and
> problem with duplicated patch seems to be solved.
>
> I have another question now. When I commit #1 commit, patch set for
> commits #2-10 is also uploaded. This patch are not reviewed and people
> need to review them again. Is there any solution about this?Not upload 10 commits at a time? I'm serious. If you find yourself doing
that often, I think you have greater problems than Gerrit not working
perfectly. What if someone has serious objections in one of the first
commits, affecting everything you do in the remaining commits? Do your
commits have the right scope?
On Wednesday, January 18, 2012 8:42:55 AM UTC+1, Magnus Bäck wrote:On Tuesday, January 17, 2012 at 08:45 CET,Lazo Apostolovski <lapost...@tricode.nl> wrote:> I didn't know that there is commit-msg hook. Now I get the hook and
> problem with duplicated patch seems to be solved.
>
> I have another question now. When I commit #1 commit, patch set for
> commits #2-10 is also uploaded. This patch are not reviewed and people
> need to review them again. Is there any solution about this?Not upload 10 commits at a time? I'm serious. If you find yourself doing
that often, I think you have greater problems than Gerrit not working
perfectly. What if someone has serious objections in one of the first
commits, affecting everything you do in the remaining commits? Do your
commits have the right scope?What scope commits need to have?
And what about bigger functionality? The developer should commit everything at once?
How can more developers work on same functionality?
Thank you.
[...]
--
Magnus Bäck Opinions are my own and do not necessarily
SW Configuration Manager represent the ones of my employer, etc.
Sony Ericsson
--
> What scope commits need to have?
To paraphrase Albert Einstein, make them as small as possible, but not
smaller.
> And what about bigger functionality? The developer should commit
> everything at once?
Absolutely not, big commits that change large chunks of code become
a real pain to review. Commits that are painful to review tend to get
a sloppy and/or late review, thus both hurting developer morale and
productivity and lowering the quality of the code.
Why not just upload the commits in smaller batches? Putting together
ten commits takes a while, so while you're working on commits 4-10
your peers could review commits 1-3.
> How can more developers work on same functionality?
You mean how more than one developer can collaborate on a larger
feature? If the feature can't be iteratively developed, the team
can share a branch where they can implement the new functionality
in isolation from the trunk. When everything's ready, the branch
can be merged to the trunk in one go.
thanks,
Nasser
> --
> To unsubscribe, email repo-discuss...@googlegroups.com
> More info at http://groups.google.com/group/repo-discuss?hl=en
--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum
= Uploading Changes =
A contributor must generate a password by visiting Settings > HTTP
Password, or directly jumping to the password generator URL in a web
browser:
https://gerrit-review.googlesource.com/new-password
Once a password has been saved to ~/.netrc, changes can be pushed for
review over HTTP: