Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,785,101 Members 41,513 Now Online
XDA Developers Android and Mobile Development Forum

[GUIDE] How-To Cherry-Pick Features for your ROM (both GitHub and Gerrit)

Tip us?
 
ezio84
Old
#51  
ezio84's Avatar
Senior Member
Thanks Meter 463
Posts: 530
Join Date: Oct 2009
Location: Giovinazzo (Bari)
Quote:
Originally Posted by spida_singh View Post
I did that, and it committed fine, saw the nano message etc, its during the build part, i saw the not part of a branch message, so when i lunch the , it states the commit is ignored.
Git checkout on a branch before cherry picking and committing:

git checkout kk4.4
git cherry-pick
(If there are conflicts solve them, then:
git add .
git commit -a)

If the local branch kk4.4 doesn't exist, git will create it.
ezio.deviantart.com <-- Windows dark themes
Slimkat unofficial builds by xda guys (links and resources) --> Click
 
spida_singh
Old
(Last edited by spida_singh; 20th August 2014 at 07:22 PM.)
#52  
Senior Member
Thanks Meter 118
Posts: 400
Join Date: Mar 2011
Quote:
Originally Posted by ezio84 View Post
Git checkout on a branch before cherry picking and committing:

git checkout kk4.4
git cherry-pick
(If there are conflicts solve them, then:
git add .
git commit -a)

If the local branch kk4.4 doesn't exist, git will create it.
Thanks, just as a quick reference for myself, would this be the correct order / process

Source Sync

mkdir ~/vanir
cd ~/vanir
repo init -u git://github.com/VanirAOSP/platform_manifest.git -b kk44
repo sync j8

Checkout

git checkout kk44

Cherry pick, solve conflicts then

git cherry-pick --strategy=recursive -X theirs e1572513f08b1bb4c427ef426d52a994a00af10
git add . (assuming this is for the files / conflicts i want to keep)
git commit -a

Build

. build/envsetup.sh
lunch vanir_sirius-userdebug
mka bacon -j4

Wait for zip and flash and keep fingers crossed

For reference, my head data using git reflog

b314f90 HEAD@{3}: checkout: moving from 17bbc4a3b88dc3d6e9d49a86a13370dea46fbb20 to b314f903325c1fdf
17bbc4a HEAD@{4}: commit (cherry-pick): sirius: use honami camera blob


Appreciate the help guys.
 
ezio84
Old
(Last edited by ezio84; 20th August 2014 at 07:49 PM.)
#53  
ezio84's Avatar
Senior Member
Thanks Meter 463
Posts: 530
Join Date: Oct 2009
Location: Giovinazzo (Bari)
Quote:
Originally Posted by spida_singh View Post
cut
I don't use/know this:
git cherry-pick --strategy=recursive -X theirs e1572513f08b1bb4c427ef426d52a994a00af10

Here are my steps:
Code:
repo init -u ... -b ...
repo sync
Then the cherrypicking from github:
Code:
git remote add NameYouWant https://github.com/xxx/project_you_cherrypick_from
git fetch NameYouChoseInThePreviousStep
git checkout kk4.4 (or a new local branch if you want)
git cherry-pick e1572513f08b1bb4c427ef426d52a994a00af10
or cherrypicking from gerrit: just use the cherrypick link provided in the commit page, skipping git remote add and git fetch.

If there are no conflicts, i go to the build process:
Code:
 . build/envsetup.sh && lunch
make bacon -j# (or mka bacon instead of make bacon -j# to use all cpu  resources)
If there are conflicts, i edit files to solve them, then:
Code:
git add .
git commit -a
then to the build process.
ezio.deviantart.com <-- Windows dark themes
Slimkat unofficial builds by xda guys (links and resources) --> Click
The Following User Says Thank You to ezio84 For This Useful Post: [ Click to Expand ]
 
spida_singh
Old
(Last edited by spida_singh; 23rd August 2014 at 02:59 PM.)
#54  
Senior Member
Thanks Meter 118
Posts: 400
Join Date: Mar 2011
Just a quick question, I receive the following during the commit and my git status (this is just a sample, there are more like this):

Code:
both modified:      shinano-common/proprietary/lib/libcald_client.so
both modified:      shinano-common/proprietary/lib/libcald_pal.so
both modified:      shinano-common/proprietary/lib/libcald_server.so
both modified:      shinano-common/proprietary/lib/libexcal_system.so
both modified:      shinano-common/proprietary/lib/libmmcamera_interface.so
both modified:      shinano-common/proprietary/lib/libmmjpeg_interface.so
When i choose to 'add' the files, are these adding the ones taken / fetched from the commit, or keeping the ones already in the local folder (in essence these WONT be getting overwritten)

I actually need to have my local .so files overwritten by the ones being fetched form the commit, so just trying to understanding what 'add' is actually doing.

As described above, am i best using

"git add . " as it applies new and modified files, without performing deletions, so this 'takes the commits files and creates them and modifies / overwrites existing ones as required, without performing any required deletions?

Thanks again.
Tags
cherry pick, cherry picks, cherry-pick, gerrit, github
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes