once I give
repo init -u git://github.com/MIPS/manifests.git -b mips-gingerbread-r1
it says
"repo has been initialized to /home/user1".
I want to change this directory(to /home/user1/myproject). How do I do it?
I also have a local_manifest.xml which i need to use with repo to update the source tree. What do I do?
A repo init is done in the current working directory.
So the simplest way would simply to repeat your command in the /home/user1/myproject, that way all files are updated accordingly.
Related
I need to do the following steps,i need to update the default.xml to change the revision of some projects and then sync the code,is there a repo option to sync to local default.xml files?if not can you please advise how to deal with this problem?
1.repo init -u git://git. company.com/platform/manifest.git -b <branchname>
2.Update default.xml to change the revision of some projects
<project path="kernel"
name="kernel/msm"
revision="refs/heads/3.18" />
3. repo sync
It is not recommended to modify default.xml directly, you can put your modification in local_manifests.
For how to use local_manifest.xml, you can refer to here
I posted this question at Android Enthusiasts but figured it was the wrong place to ask, so I deleted it from there and asking it "again" here.
This is such a noob question, and pardon me if it is, but I just want to understand the underlying concepts clearly. Reading repo help and Google's repo command reference page doesn't really enlighten much. I understood some bits from Google's reference page, but I still need some more clarifications.
Following the instructions on how to download android source, I executed these two commands on an Ubuntu shell: (I've taken cared of all the prerequisites for the environment.)
~/android4.2.2$ repo init -u https://android.googlesource.com/platform/manifest -b android-4.2.2_r1.2
~/android4.2.2$ repo sync -j4
After waiting half a day for repo to finish downloading, I ended up with 19G of downloaded material in android4.2.2 directory. So what exactly just happened, and why did it reach 19G when Google said I should only be expecting around 8G of source files?
repo is a python wrapper script for git, its Google Source page defines it as
repo - The Multiple Git Repository Tool
repo init command initializes repo in the current directory. That's, it downloads the latest repo source and a manifest.xml file that describes the directory structure of the git repositories, and store all of these in .repo sub-directory in the current directory. In your case, you have used an optional -b argument which is used to select the branch to checkout. By default (i.e., when -b argument is not used), master branch is used.
repo sync updates working tree to the latest revision. That's, it synchronizes local project directories with the remote repositories specified in the manifest file. If a local
project does not yet exist, it will clone a new local directory from the remote repository and set up tracking branches as specified in the manifest. If the local project already exists, it will update the remote branches and rebase any new local changes on top of the new remote changes. -j argument is used to set number of parallel jobs to execute. The default value can be defined in the manifest, and also can be overridden in command line as in your case.
why did it reach 19G when Google said I should only be expecting around 8G of source files?
That should be because besides the source files, you will get all the history of Android since the beginning of the time :)
Hope this helps.
I am trying to build android from source since I need to customize something at a lower level. I download the entire source code to build from scratch using the command:
repo init -u https://android.googlesource.com/platform/manifest -b android-4.4_r1
repo sync
The size is about 26gb. Only then did I realize that there was a simpler way to do this since a lot of modification were required and that was already done. What i had to do was :
repo init -u git://github.com/jamesonwilliams/platform_manifest.git -b android-4.4_r1.1
repo sync
Is there anyway I can use what I downloaded already . I tried issuing the above command in the same directory where I downloaded the original code form but it looks like it is starting from scratch.Any ideas?
Do repo init in a new folder for android-4.4_r1.1
Copy .repo/projects folder from previous repo (android-4.4_r1) in to new repo's .repo/
Now run repo sync and it will be faster, it should only fetch delta
I need to download src code of different android tags. Each time it takes half an hour and GIGS of space. Instead I'd prefer to switch to different tag. How can I do so?
cd android-4.0.4_r1.1
repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.4_r1.1
repo sync
cd ../android-4.2.2_r1
repo init -u https://android.googlesource.com/platform/manifest -b android-4.2.2_r1
repo sync
What's the proper way to switch/update from android-4.0.4_r1.1 to android-4.2.2_r1?
As mentioned in the comments of the accepted answer, you can change the default revision in manifest.xml. There's a snippet about it in repo help init:
Switching Manifest Branches
To switch to another manifest branch, repo init -b otherbranch may be
used in an existing client. However, as this only updates the manifest,
a subsequent repo sync (or repo sync -d) is necessary to update the
working directory files.
This won't download everything fresh, but will perform the necessary git operations to checkout the correct branch/tag across projects. Actually, if you run it with --trace, you'll see it does a good bit more than just git checkout.
NOTE: If you use this method you must make sure you supply the exact same parameters to repo init as you had for your previous invocation. Specifically, if you supplied -g options, supply them again or repo sync will remove directories now unnecessary in the new set of groups.
You can fetch tags with :
git fetch
git fetch --tags
And do checkout by :
git checkout tag_name
Also if it is taking more time to sync than usual run below command in that repo :
git gc
I would like the repo to sync the source code to "~/home/username/android/device/" folder
currently the repo sync checks out to "~/home/username/" folder
I have tried to initialize the repo to /android/device folder twice and then synced it again, however it didn't work.
Any suggestions?
Did you try to use git remote set-url? If not, you may find helpful this article: https://help.github.com/articles/changing-a-remote-s-url