CandyShop / gerrit

Automatically exported from code.google.com/p/gerrit
Apache License 2.0
1 stars 0 forks source link

Subtree merge strategy not working with Gerrit #784

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Affected Version: 2.1.5.1 , running on Windows XP SP2 (really! Sorry for 
that...) with 1.7.2.3.msysgit.0, JRE 1.6.0_22 .

What steps will reproduce the problem?
1. Create two gerrit projects (ssh create-project), say tp1 and tp2
2. Create Initial commits in both - use the commitmsg hook from the beginning.
3. Add one simple file in the master branch in tp1.
4. Upload everything to Gerrit for review.
5. Review and submit all.
6. Include tp1 in tp2 via subtree merge 
(http://www.kernel.org/pub/software/scm/git/docs/howto/using-merge-subtree.html)
6.1 git remote add -f tp1 ssh://127.0.0.1:29418/testproj1
6.2 git merge -s ours --no-commit tp1/master
6.3 git read-tree --refix=tp1/ -u tp1/master
6.4 git commit
7. Submit to gerrit: git push origin HEAD:refs/for/master

Now you'll find not only one change, but all the changes in tp1 again to be 
approved (see picture). Trying to get the in doesn't work for me, I am a bit 
lost when he wants me to merge again when I want to submit the merge result 
changeset.

Furthermore histories of projects get interconnected. This might be intended, 
but this means that if there is a tp3, that also includes tp1, than tp3 would 
depend partly on tp2, and would need reviewing of tp2 changes after pulling 
tp1!!

My intention here is to bring these strange facts to attention. I was wondering 
why Google does not bring up anything on 'gerrit subtree merge'.

I'm doing some thorough testing of Gerrit and Git, and otherwise I'm quite 
confident with Gerrit and Git, good work!

Best,
Georg

Original issue reported on code.google.com by georg.koester@gmail.com on 26 Nov 2010 at 7:54

Attachments:

GoogleCodeExporter commented 9 years ago
any word on this issue?  We are also running into it :(

Original comment by yur...@gmail.com on 24 Jan 2013 at 2:38

GoogleCodeExporter commented 9 years ago
Also you are likely to hit up-on the following error message if the history of 
the subtee happens to have the same commit in different branches (with the same 
Change-ID):

http://gerrit.googlecode.com/svn-history/r6114/documentation/2.1.7/error-squash-
commits-first.html

Original comment by johannes...@gmail.com on 20 Feb 2013 at 3:55