Search code examples
androidgitandroid-manifestrepo

how to sync ONLY local_manifest.xml?


I've proprietary repositories stored on our local bitbucket server. I have also created local_manifest.xml to replace those upstream repos with local.

This all is working fine, it's pulling the local repos instead of upstream and built android images with the changes.

There are new changes pushed to local repos and I wanted to pull all the local repos part of local_manifest.xml and ignore upstream projects since it won't be changing for my platform.

I tried repo sync but it blocks at following and doesn't move forward. ^C skips the sync for that repo but it also blocks with the repos from local_manifest.xml

$ repo sync

... A new version of repo (2.32) is available.
... You should upgrade soon:
    cp /aosp/.repo/repo/repo /home/ubuntu/bin/repo

remote: Enumerating objects: 126154, done.
remote: Counting objects: 100% (8123/8123), done.
remote: Compressing objects: 100% (106/106), done.
remote: Total 126154 (delta 8051), reused 8015 (delta 8011), pack-reused 118031
Receiving objects: 100% (126154/126154), 98.97 MiB | 14.81 MiB/s, done.
Resolving deltas: 100% (56268/56268), completed with 737 local objects.
project .repo/manifests/
Updating 2e1ad2ab0..ac52b2de4
Fast-forward

Fetching:  0% (1/759) Last synced: repo^CKeyboard interrupt while processing platform/external/chromium-webview
Fetching:  0% (3/759) Last synced: local_repo^CKeyboard interrupt while processing platform/prebuilts/android-emulator
^Caborted by user
^C

How can I only sync the repos from local_manifest.xml and ignore all other upstream repos?


Solution

  • if you check here a comment from ElpieKay to the original question,

    repo sync is designed to checkout a detached HEAD...

    You could try using repo sync with -f: Proceed with syncing other projects even if a project fails to sync. Check here for more details.

    So following command should pull the latest changes from the branch specified from your local_manifest.xml

    repo sync -f -c