<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tools/git-repo.git/subcmds/sync.py, branch v2.71</title>
<subtitle>Mirror of gerrit.googlesource.com/git-repo</subtitle>
<id>https://git.enea.com/cgit/tools/git-repo.git/atom?h=v2.71</id>
<link rel='self' href='https://git.enea.com/cgit/tools/git-repo.git/atom?h=v2.71'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/'/>
<updated>2026-10-27T09:00:11+00:00</updated>
<entry>
<title>style: use `import git_refs` everywhere</title>
<updated>2026-10-27T09:00:11+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@google.com</email>
</author>
<published>2026-10-24T00:10:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=338ddb7d83ea35d5aef94d3c5d95c74fa3845780'/>
<id>urn:sha1:338ddb7d83ea35d5aef94d3c5d95c74fa3845780</id>
<content type='text'>
Align with Google style guides and `import git_refs` as a module
rather than import symbols out of it.

Change-Id: I4e33ebdf3b06acd94494f32cdf39aa58427cd4b2
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/648703
Reviewed-by: Brian Gan &lt;brgan@google.com&gt;
Commit-Queue: Mike Frysinger &lt;vapier@google.com&gt;
Tested-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>style: use `import git_command` everywhere</title>
<updated>2026-10-24T00:00:18+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@google.com</email>
</author>
<published>2026-10-23T21:13:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=f4ce9572d1f9e412a5685297d2806ce410e4d4a0'/>
<id>urn:sha1:f4ce9572d1f9e412a5685297d2806ce410e4d4a0</id>
<content type='text'>
Align with Google style guides and `import git_command` as a module
rather than import symbols out of it.

Change-Id: If80d95203e240dd6591e465ef75500c72401d2bf
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/648503
Commit-Queue: Mike Frysinger &lt;vapier@google.com&gt;
Reviewed-by: Gavin Mak &lt;gavinmak@google.com&gt;
Tested-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>style: use `import repo_logging` everywhere</title>
<updated>2026-10-23T16:49:36+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@google.com</email>
</author>
<published>2026-10-23T03:46:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=cc1f41d782b39d852dbd9c738ff01eb8814d9e86'/>
<id>urn:sha1:cc1f41d782b39d852dbd9c738ff01eb8814d9e86</id>
<content type='text'>
Align with Google style guides and `import repo_logging` as a module
rather than import symbols out of it.

Change-Id: Ie13c1f13be00dbf6dd3814a8780baf6453972237
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/647823
Tested-by: Mike Frysinger &lt;vapier@google.com&gt;
Commit-Queue: Mike Frysinger &lt;vapier@google.com&gt;
Reviewed-by: Brian Gan &lt;brgan@google.com&gt;
</content>
</entry>
<entry>
<title>style: use `import repo_trace` everywhere</title>
<updated>2026-10-23T16:01:00+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@google.com</email>
</author>
<published>2026-10-23T03:39:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=f7d252f5dcfdcc01ae73d7a470bca1a7867c6d5b'/>
<id>urn:sha1:f7d252f5dcfdcc01ae73d7a470bca1a7867c6d5b</id>
<content type='text'>
Align with Google style guides and `import repo_trace` as a module
rather than import symbols out of it.

Change-Id: I6bea5e7a68775e93b6b7fcd218db666350aff690
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/647803
Tested-by: Mike Frysinger &lt;vapier@google.com&gt;
Commit-Queue: Mike Frysinger &lt;vapier@google.com&gt;
Reviewed-by: Gavin Mak &lt;gavinmak@google.com&gt;
</content>
</entry>
<entry>
<title>style: use `import error` everywhere</title>
<updated>2026-10-23T00:44:11+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@google.com</email>
</author>
<published>2026-10-22T17:15:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=2c04b98c60d87ff5442820fc084364748a4a15e8'/>
<id>urn:sha1:2c04b98c60d87ff5442820fc084364748a4a15e8</id>
<content type='text'>
Align with Google style guides and `import error` as a module rather
than import classes out of it.

Change-Id: I8686fbe7887bd6ceac7a07877af63934f0d0ddd2
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/647563
Commit-Queue: Mike Frysinger &lt;vapier@google.com&gt;
Reviewed-by: Gavin Mak &lt;gavinmak@google.com&gt;
Reviewed-by: Insaf Latypov &lt;saferif@google.com&gt;
Tested-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>sync, init: support repo.smartsync config and --head alias</title>
<updated>2026-10-21T18:22:58+00:00</updated>
<author>
<name>LaMont Jones</name>
<email>lamontjones@google.com</email>
</author>
<published>2026-10-19T19:53:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=f0124d0fd5f316330ce6c1513874a61c044ede3c'/>
<id>urn:sha1:f0124d0fd5f316330ce6c1513874a61c044ede3c</id>
<content type='text'>
Allow users to configure Smart Sync as the default for a checkout:

* Add `ManifestProject.smart_sync` backed by
  `self.config.GetBoolean("repo.smartsync")`.
* Add `-s`/`--smart-sync` and `--no-smart-sync`/`--head` to `repo init`
  to persist `repo.smartsync` in the manifest project config.
* Add `--head` as an alias for `--no-smart-sync` in `repo sync` and
  `repo init`.
* Update `Sync._ResolveSmartSyncOption` so `ManifestProject.smart_sync`
  takes precedence over `&lt;default sync-smartsync="true" /&gt;` while
  remaining overridable by per-invocation `repo sync` CLI flags.

Bug: 569927750
Test: pytest tests/test_project.py tests/test_subcmds_init.py tests/test_subcmds_sync.py
Change-Id: Ib40efc530336efb59a28acfed3d582713e9d67b2
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/643303
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
Commit-Queue: LaMont Jones &lt;lamontjones@google.com&gt;
Tested-by: LaMont Jones &lt;lamontjones@google.com&gt;
</content>
</entry>
<entry>
<title>sync: Provide a CLI command to opt in/out of smartsync for a user.</title>
<updated>2026-10-19T19:20:06+00:00</updated>
<author>
<name>Insaf Latypov</name>
<email>saferif@google.com</email>
</author>
<published>2026-10-13T15:50:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=46e9866ca0f161604bd45a0c3b7c7887c9415dcb'/>
<id>urn:sha1:46e9866ca0f161604bd45a0c3b7c7887c9415dcb</id>
<content type='text'>
Add a boolean `sync.smartsync` setting in the per-user repo config
(~/.repoconfig/config):
* true: smart sync by default, as if -s were passed.
* false: never smart sync by default, even if the manifest enables it.
* unset: follow the manifest default, as before.

Add docs/repoconfig.md as the user facing documentation for
~/.repoconfig/config and its settings, and point smart-sync.md and the
`repo sync` help at it.

Bug: 569927750
Test: ./run_tests
Change-Id: Ideb4119fcb5e90f8bb35c493d9e4f8bec7878b77
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/643264
Reviewed-by: Gavin Mak &lt;gavinmak@google.com&gt;
Commit-Queue: Insaf Latypov &lt;saferif@google.com&gt;
Tested-by: Insaf Latypov &lt;saferif@google.com&gt;
</content>
</entry>
<entry>
<title>sync: Add GetApprovedManifestV2 with named request options</title>
<updated>2026-10-14T10:30:36+00:00</updated>
<author>
<name>Rahul Yadav</name>
<email>yadavrah@google.com</email>
</author>
<published>2026-10-01T16:34:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=3448df395478c2375d880e33bfc705a9ed36272b'/>
<id>urn:sha1:3448df395478c2375d880e33bfc705a9ed36272b</id>
<content type='text'>
Smart sync calls GetApprovedManifest(branch[, target]) over XML-RPC,
which only supports positional arguments.  Adding new request options
that way does not scale.

Add a GetApprovedManifestV2 method that takes a single struct of named
options and returns a struct:

  request:  {branch, target?, best_effort?}
  response: {success, manifest_xml?, error_message?}

Servers must ignore unknown options, so new options (e.g. criteria for
selecting a good build) can be added without another method.

The first new option is `best_effort`.  repo sets it when smart sync was
enabled implicitly by the manifest's sync-smartsync="true" default
rather than by -s.  The server may decline a best_effort request (e.g.
for rollout or cohort gating) by returning success=false.  The client
still owns the fallback policy: declined implicit requests fall back to
a regular sync, while explicit -s requests fail as before.

If the server does not implement GetApprovedManifestV2, repo falls back
to the legacy GetApprovedManifest call.

Bug: 545137090
Test: ./run_tests
Change-Id: I9297b728df26516012cb93dffc91d39c1fb0458f
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/636623
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
Commit-Queue: Rahul Yadav &lt;yadavrah@google.com&gt;
Tested-by: Rahul Yadav &lt;yadavrah@google.com&gt;
</content>
</entry>
<entry>
<title>sync: keep smart sync override with -l</title>
<updated>2026-10-12T09:14:30+00:00</updated>
<author>
<name>Rahul Yadav</name>
<email>yadavrah@google.com</email>
</author>
<published>2026-10-08T16:27:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=178b66ee3e2e14df3502cb939cb0a43fc3b41685'/>
<id>urn:sha1:178b66ee3e2e14df3502cb939cb0a43fc3b41685</id>
<content type='text'>
Splitting a sync into `repo sync -n` followed by `repo sync -l` should
end up in the same state as a single `repo sync`. With smart sync it
does not always: -n fetches the revisions pinned by the smart sync
manifest and saves it as smart_sync_override.xml, but the following -l
deletes that override and checks out ToT instead, unless the manifest
sets sync-smartsync="true". So `repo sync -s -n` + `repo sync -l` lands
on ToT, while `repo sync -s` lands on the pinned revisions.

Without an explicit -s or -t, -l does not contact the manifest server,
so it cannot choose new pins itself; the only consistent choice is to
keep the override the previous -n left behind. Do that regardless of
the manifest default.

Syncs that choose a manifest themselves still replace or remove the
override as before: any sync without -l, and -l combined with -s, -t,
-m, --superproject-revision or --no-smart-sync. Smart sync stays
non-sticky for regular syncs, and `repo sync -l --no-smart-sync` still
discards the override to check out ToT.

Bug: 569927750
Change-Id: Id06ff88e9f3183fae32e993e86630fc3e8de71a1
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/640965
Commit-Queue: Rahul Yadav &lt;yadavrah@google.com&gt;
Tested-by: Rahul Yadav &lt;yadavrah@google.com&gt;
Reviewed-by: Gavin Mak &lt;gavinmak@google.com&gt;
</content>
</entry>
<entry>
<title>sync: keep --superproject-revision across manifest reloads</title>
<updated>2026-10-09T19:56:07+00:00</updated>
<author>
<name>Brian Gan</name>
<email>brgan@google.com</email>
</author>
<published>2026-10-08T23:30:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=9593a76fd18910072f362524f3fe21e2d1c6a25a'/>
<id>urn:sha1:9593a76fd18910072f362524f3fe21e2d1c6a25a</id>
<content type='text'>
When --superproject-revision moves `.repo/manifests`, the manifest is
reloaded, discarding the pinned superproject. _UpdateProjectsRevisionId
then read gitlinks from the superproject's default branch instead,
pinning failed, and projects synced unpinned.

Apply the revision in _ConfigureSuperproject so it is re-applied after
every reload.

Verified with https://paste.googleplex.com/5889974172516352

Bug: 571245807
Change-Id: I4d782d229b128c0f15081d11b722d8901709458c
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/641743
Reviewed-by: Gavin Mak &lt;gavinmak@google.com&gt;
Tested-by: Brian Gan &lt;brgan@google.com&gt;
Commit-Queue: Brian Gan &lt;brgan@google.com&gt;
</content>
</entry>
</feed>
