<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tools/git-repo.git/subcmds, branch v2.50</title>
<subtitle>Mirror of gerrit.googlesource.com/git-repo</subtitle>
<id>https://git.enea.com/cgit/tools/git-repo.git/atom?h=v2.50</id>
<link rel='self' href='https://git.enea.com/cgit/tools/git-repo.git/atom?h=v2.50'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/'/>
<updated>2024-12-16T18:23:40+00:00</updated>
<entry>
<title>sync: Delete symlinks relative to client topdir</title>
<updated>2024-12-16T18:23:40+00:00</updated>
<author>
<name>Josip Sokcevic</name>
<email>sokcevic@chromium.org</email>
</author>
<published>2024-12-13T18:24:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=9500aca754058bff18ddf35db62852ca4f722c63'/>
<id>urn:sha1:9500aca754058bff18ddf35db62852ca4f722c63</id>
<content type='text'>
If repo sync is invoked outside the repo root, and the latest manifest
removes symlinks, repo incorrectly tries to remove symlink - it starts
from `cwd` instead of the repo root.

Bug: b/113935847
Bug: 40010423
Change-Id: Ia50ea70a376e38c94389880f020c80da3c3f453c
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/445901
Tested-by: Josip Sokcevic &lt;sokcevic@chromium.org&gt;
Reviewed-by: Gavin Mak &lt;gavinmak@google.com&gt;
</content>
</entry>
<entry>
<title>branches: Escape percent signs in branch names</title>
<updated>2024-12-03T19:02:20+00:00</updated>
<author>
<name>Josip Sokcevic</name>
<email>sokcevic@google.com</email>
</author>
<published>2024-11-22T20:11:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=1feecbd91eac1b4a30e74f5356b61607d13ce89f'/>
<id>urn:sha1:1feecbd91eac1b4a30e74f5356b61607d13ce89f</id>
<content type='text'>
If a branch name contains a percent sign, it will be interpreted as a placeholder and color.py will fail to format it.

To avoid this, escape the percent signs prior to calling Coloring
method.

Bug: b/379090488
Change-Id: Id019c776bbf8cbed5c101f2773606f1d32c9e057
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/443801
Reviewed-by: Scott Lee &lt;ddoman@google.com&gt;
Tested-by: Josip Sokcevic &lt;sokcevic@google.com&gt;
Commit-Queue: Josip Sokcevic &lt;sokcevic@google.com&gt;
</content>
</entry>
<entry>
<title>sync: Do not fail to sync a manifest with no projects</title>
<updated>2024-11-26T10:16:03+00:00</updated>
<author>
<name>Peter Kjellerstedt</name>
<email>pkj@axis.com</email>
</author>
<published>2024-11-20T20:10:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=616e314902b0234cee1cce13bed7d9ef44ce0b6c'/>
<id>urn:sha1:616e314902b0234cee1cce13bed7d9ef44ce0b6c</id>
<content type='text'>
Since commit 454fdaf1191c87e5c770ab865a911e10e600e178 (v2.48), syncing a
manifest without any projects would result in:

  Repo command failed: RepoUnhandledExceptionError
          Number of processes must be at least 1

Bug: 377546300
Change-Id: Iaa2f6a3ac64542ad65a19c0eef449f53c09cae67
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/443442
Reviewed-by: Erik Elmeke &lt;erik@haleytek.corp-partner.google.com&gt;
Reviewed-by: Josip Sokcevic &lt;sokcevic@google.com&gt;
Commit-Queue: Peter Kjellerstedt &lt;peter.kjellerstedt@axis.com&gt;
Tested-by: Peter Kjellerstedt &lt;peter.kjellerstedt@axis.com&gt;
</content>
</entry>
<entry>
<title>sync: fix connection error on macOS</title>
<updated>2024-11-06T16:33:17+00:00</updated>
<author>
<name>Kuang-che Wu</name>
<email>kcwu@google.com</email>
</author>
<published>2024-11-06T05:03:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=ab2d3211043e2cb42a55f56e5abf69d23103c105'/>
<id>urn:sha1:ab2d3211043e2cb42a55f56e5abf69d23103c105</id>
<content type='text'>
With a large number of sync workers, the sync process may fail on
macOS due to connection errors. The root cause is that multiple
workers may attempt to connect to the multiprocessing manager server
at the same time when handling the first job. This can lead to
connection failures if there are too many pending connections, exceeding
the socket listening backlog.

Bug: 377538810
Change-Id: I1924d318d076ca3be61d75daa37bfa8d7dc23ed7
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/441541
Tested-by: Josip Sokcevic &lt;sokcevic@google.com&gt;
Commit-Queue: Josip Sokcevic &lt;sokcevic@google.com&gt;
Reviewed-by: Josip Sokcevic &lt;sokcevic@google.com&gt;
</content>
</entry>
<entry>
<title>upload: Return correct tuple values in _ProcessResults</title>
<updated>2024-10-31T21:18:53+00:00</updated>
<author>
<name>Josip Sokcevic</name>
<email>sokcevic@chromium.org</email>
</author>
<published>2024-10-31T21:10:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=aada468916936d034a9ac0f0c1e5ebeebd7f3e87'/>
<id>urn:sha1:aada468916936d034a9ac0f0c1e5ebeebd7f3e87</id>
<content type='text'>
Incorrect tuple values were returned with http://go/grev/440221 -
instead of returning (Project, ReviewableBranch), _ProcessResults was
returning (int, ReviewableBranch).

R=jojwang@google.com

Bug: 376731172
Change-Id: I75205f42fd23f5ee6bd8d0c15b18066189b42bd9
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/441121
Reviewed-by: Sam Saccone &lt;samccone@google.com&gt;
Commit-Queue: Josip Sokcevic &lt;sokcevic@google.com&gt;
Tested-by: Josip Sokcevic &lt;sokcevic@google.com&gt;
</content>
</entry>
<entry>
<title>forall: Fix returning results early</title>
<updated>2024-10-30T16:11:04+00:00</updated>
<author>
<name>Josip Sokcevic</name>
<email>sokcevic@chromium.org</email>
</author>
<published>2024-10-30T16:06:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=e219c78fe595c09c5d5b7023ae59f465a61f46ff'/>
<id>urn:sha1:e219c78fe595c09c5d5b7023ae59f465a61f46ff</id>
<content type='text'>
rc should be returned only after all results are processed.

R=jojwang@google.com

Bug: b/376454189
Change-Id: I8200b9954240dd3e8e9f2ab82494779a3cb38627
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/440901
Tested-by: Josip Sokcevic &lt;sokcevic@google.com&gt;
Commit-Queue: Josip Sokcevic &lt;sokcevic@google.com&gt;
Reviewed-by: Joanna Wang &lt;jojwang@google.com&gt;
</content>
</entry>
<entry>
<title>Use full name of the revision when checking dest-branch</title>
<updated>2024-10-28T23:47:08+00:00</updated>
<author>
<name>joehsu</name>
<email>joehsu@google.com</email>
</author>
<published>2024-10-02T12:01:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=f9f4df62e062cccd279867c551a109365b4f380f'/>
<id>urn:sha1:f9f4df62e062cccd279867c551a109365b4f380f</id>
<content type='text'>
The manifest usually doesn't sepecify the revision with the full name
(e.g. refs/heads/REV).
However, when checking if the name of the merge branch, full name is
used on the merge branch.

The CL use full name of revision when comparing it with the merge
branch.

Bug: b/370919047
Test: repo upload on a project with `dest-branch` set
Change-Id: Ib6fa2f7246beb5bae0a26a70048a7ac03b6c5a2f
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/438401
Reviewed-by: Josip Sokcevic &lt;sokcevic@google.com&gt;
Tested-by: Joe Hsu &lt;joehsu@google.com&gt;
Commit-Queue: Josip Sokcevic &lt;sokcevic@google.com&gt;
</content>
</entry>
<entry>
<title>Add REPO_SKIP_SELF_UPDATE check in sync</title>
<updated>2024-10-28T17:46:25+00:00</updated>
<author>
<name>Fredrik de Groot</name>
<email>fredrik.de.groot@haleytek.com</email>
</author>
<published>2024-10-22T12:14:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=ebdf0409d289b1133d5d95c8e06c30709902f1f0'/>
<id>urn:sha1:ebdf0409d289b1133d5d95c8e06c30709902f1f0</id>
<content type='text'>
The command _PostRepoFetch will try to self update
during repo sync. That is beneficial but adds
version uncertainty, fail potential and slow downs
in non-interactive scenarios.

Conditionally skip the update if env variable
REPO_SKIP_SELF_UPDATE is defined.

A call to selfupdate works as before, meaning even
with the variable set, it will run the update.

Change-Id: Iab0ef55dc3d3db3cbf1ba1f506c57fbb58a504c3
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/439967
Tested-by: Fredrik de Groot &lt;fredrik.de.groot@haleytek.com&gt;
Commit-Queue: Josip Sokcevic &lt;sokcevic@google.com&gt;
Reviewed-by: Josip Sokcevic &lt;sokcevic@google.com&gt;
</content>
</entry>
<entry>
<title>subcmds: reduce multiprocessing serialization overhead</title>
<updated>2024-10-23T23:34:34+00:00</updated>
<author>
<name>Kuang-che Wu</name>
<email>kcwu@google.com</email>
</author>
<published>2024-10-22T13:04:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=8da4861b3860c505e39341b4135c21f67569e4d8'/>
<id>urn:sha1:8da4861b3860c505e39341b4135c21f67569e4d8</id>
<content type='text'>
Follow the same approach as 39ffd9977e to reduce serialization overhead.

Below benchmarks are tested with 2.7k projects on my workstation
(warm cache). git tracing is disabled for benchmark.

(seconds)              | v2.48 | v2.48 | this CL | this CL
	               |       |  -j32 |         |    -j32
-----------------------------------------------------------
with clean tree state:
branches (none)        |   5.6 |   5.9 |    1.0  |    0.9
status (clean)         |  21.3 |   9.4 |   19.4  |    4.7
diff (none)            |   7.6 |   7.2 |    5.7  |    2.2
prune (none)           |   5.7 |   6.1 |    1.3  |    1.2
abandon (none)         |  19.4 |  18.6 |    0.9  |    0.8
upload (none)          |  19.7 |  18.7 |    0.9  |    0.8
forall -c true         |   7.5 |   7.6 |    0.6  |    0.6
forall -c "git log -1" |  11.3 |  11.1 |    0.6  |    0.6

with branches:
start BRANCH --all     |  21.9 |  20.3 |   13.6  |    2.6
checkout BRANCH        |  29.1 |  27.8 |    1.1  |    1.0
branches (2)           |  28.0 |  28.6 |    1.5  |    1.3
abandon BRANCH         |  29.2 |  27.5 |    9.7  |    2.2

Bug: b/371638995
Change-Id: I53989a3d1e43063587b3f52f852b1c2c56b49412
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/440221
Reviewed-by: Josip Sokcevic &lt;sokcevic@google.com&gt;
Tested-by: Kuang-che Wu &lt;kcwu@google.com&gt;
Commit-Queue: Kuang-che Wu &lt;kcwu@google.com&gt;
</content>
</entry>
<entry>
<title>sync: reduce multiprocessing serialization overhead</title>
<updated>2024-10-23T02:58:45+00:00</updated>
<author>
<name>Kuang-che Wu</name>
<email>kcwu@google.com</email>
</author>
<published>2024-10-18T15:32:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=39ffd9977e2f6cb1ca1757e59173fc93e0eab72c'/>
<id>urn:sha1:39ffd9977e2f6cb1ca1757e59173fc93e0eab72c</id>
<content type='text'>
Background:
 - Manifest object is large (for projects like Android) in terms of
   serialization cost and size (more than 1mb).
 - Lots of Project objects usually share only a few manifest objects.

Before this CL, Project objects were passed to workers via function
parameters. Function parameters are pickled separately (in chunk). In
other words, manifests are serialized again and again. The major
serialization overhead of repo sync was
  O(manifest_size * projects / chunksize)

This CL uses following tricks to reduce serialization overhead.
 - All projects are pickled in one invocation. Because Project objects
   share manifests, pickle library remembers which objects are already
   seen and avoid the serialization cost.
 - Pass the Project objects to workers at worker intialization time.
   And pass project index as function parameters instead. The number of
   workers is much smaller than the number of projects.
 - Worker init state are shared on Linux (fork based). So it requires
   zero serialization for Project objects.

On Linux (fork based), the serialization overhead is
  O(projects)  --- one int per project
On Windows (spawn based), the serialization overhead is
  O(manifest_size * min(workers, projects))

Moreover, use chunksize=1 to avoid the chance that some workers are idle
while other workers still have more than one job in their chunk queue.

Using 2.7k projects as the baseline, originally "repo sync" no-op
sync takes 31s for fetch and 25s for checkout on my Linux workstation.
With this CL, it takes 12s for fetch and 1s for checkout.

Bug: b/371638995
Change-Id: Ifa22072ea54eacb4a5c525c050d84de371e87caa
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/439921
Tested-by: Kuang-che Wu &lt;kcwu@google.com&gt;
Reviewed-by: Josip Sokcevic &lt;sokcevic@google.com&gt;
Commit-Queue: Kuang-che Wu &lt;kcwu@google.com&gt;
</content>
</entry>
</feed>
