{"id":170,"date":"2014-10-22T09:59:45","date_gmt":"2014-10-22T08:59:45","guid":{"rendered":"http:\/\/www.sarbyn.com\/tech\/?p=170"},"modified":"2014-10-23T21:47:19","modified_gmt":"2014-10-23T20:47:19","slug":"submit-a-changeset-to-gerrit-based-on-another-user-change","status":"publish","type":"post","link":"https:\/\/www.sarbyn.com\/blog\/2014\/10\/22\/submit-a-changeset-to-gerrit-based-on-another-user-change\/","title":{"rendered":"Submit a changeset to Gerrit based on another user change"},"content":{"rendered":"<p>I&#8217;ve submited another change\u00a0to CyanogenMod project that add the &#8220;Delete application&#8221; menu to the &#8220;Developer Option&#8221; advanced menu (<a href=\"http:\/\/review.cyanogenmod.org\/#\/c\/74074\/\">link to gerrit<\/a>)<\/p>\n<p>An user has requested an edit to a file in order to change the string displayed in the setting application, and initially I&#8217;ve thought that the change was related to my submit (but after I realized that is another CM project&#8230;)<\/p>\n<p>BTW the question is: &#8220;How to amend a commit that another user has previously changed with another changeset not in my working copy?&#8221; (&#8230;a little bit obscure&#8230;.)<\/p>\n<p>For example, the commit status on Gerrit is:<\/p>\n<ul>\n<li>Patchset 1 : author Sarbyn<\/li>\n<li>Patchset 2 : author Sarbyn<\/li>\n<li>Patchset 3 : author Sarbyn<\/li>\n<li>Patchset 4 : author\u00a0XYZ<\/li>\n<\/ul>\n<p>My working copy is on patchset 3 and I need to submit a change about patchset 4.<\/p>\n<p>Solution<\/p>\n<p>The steps are:<\/p>\n<ul>\n<li>git stash<\/li>\n<li>click on the checkout-link in Download on the right patch set and copy&amp;paste the git command in your working copy<\/li>\n<li>git stash pop<\/li>\n<li>Edit the file<\/li>\n<li>git commit &#8211;amend and keep the Change-Id the same<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve submited another change\u00a0to CyanogenMod project that add the &#8220;Delete application&#8221; menu to the &#8220;Developer Option&#8221; advanced menu (link to gerrit) An user has requested an edit to a file in order to change the string displayed in the setting application, and initially I&#8217;ve thought that the change was related to my submit (but after <a class=\"read-more\" href=\"https:\/\/www.sarbyn.com\/blog\/2014\/10\/22\/submit-a-changeset-to-gerrit-based-on-another-user-change\/\">&hellip;&nbsp;<span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[5],"tags":[22,24,48],"class_list":["post-170","post","type-post","status-publish","format-standard","hentry","category-android","tag-cyanogenmod","tag-gerrit","tag-git"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p3JApm-2K","jetpack_likes_enabled":true,"jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.sarbyn.com\/blog\/wp-json\/wp\/v2\/posts\/170"}],"collection":[{"href":"https:\/\/www.sarbyn.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sarbyn.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sarbyn.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sarbyn.com\/blog\/wp-json\/wp\/v2\/comments?post=170"}],"version-history":[{"count":2,"href":"https:\/\/www.sarbyn.com\/blog\/wp-json\/wp\/v2\/posts\/170\/revisions"}],"predecessor-version":[{"id":172,"href":"https:\/\/www.sarbyn.com\/blog\/wp-json\/wp\/v2\/posts\/170\/revisions\/172"}],"wp:attachment":[{"href":"https:\/\/www.sarbyn.com\/blog\/wp-json\/wp\/v2\/media?parent=170"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sarbyn.com\/blog\/wp-json\/wp\/v2\/categories?post=170"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sarbyn.com\/blog\/wp-json\/wp\/v2\/tags?post=170"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}