Skip to content

Instantly share code, notes, and snippets.

@adithya2306
Created July 17, 2024 06:10
Show Gist options
  • Save adithya2306/ce8b6d368106a7d7d8cb12fd8b3ad913 to your computer and use it in GitHub Desktop.
Save adithya2306/ce8b6d368106a7d7d8cb12fd8b3ad913 to your computer and use it in GitHub Desktop.
sync only roomservice.xml
#!/usr/bin/env python3
import xml.etree.ElementTree as ET
import os
tree = ET.parse('.repo/local_manifests/roomservice.xml')
repos = []
for child in tree.getroot():
repos.append(child.attrib['path'])
if not repos:
print("no repos to sync!")
exit()
print("Syncing", repos)
os.system('repo sync -j8 -c --force-sync --optimized-fetch --no-clone-bundle --no-tags --retry-fetches=3 %s' % ' '.join(repos))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment