<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tools/git-repo.git, branch v2.49.2</title>
<subtitle>Mirror of gerrit.googlesource.com/git-repo</subtitle>
<id>https://git.enea.com/cgit/tools/git-repo.git/atom?h=v2.49.2</id>
<link rel='self' href='https://git.enea.com/cgit/tools/git-repo.git/atom?h=v2.49.2'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/'/>
<updated>2024-10-31T21:18:53+00:00</updated>
<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>worktree: Do not try to fix relative paths</title>
<updated>2024-10-30T17:03:57+00:00</updated>
<author>
<name>Allen Webb</name>
<email>allenwebb@google.com</email>
</author>
<published>2024-10-29T18:24:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=1d5098617ec7f476b76d1aa676e2a001d2c3d533'/>
<id>urn:sha1:1d5098617ec7f476b76d1aa676e2a001d2c3d533</id>
<content type='text'>
--worktree was broken with incorrect paths in the .git files
whenever the local copy of git populated gitdir with relative paths
instead of absoulte paths.

Bug: 376251410
Change-Id: Id32dc1576315218967de2a9bfe43bf7a5a0e7aa6
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/440801
Commit-Queue: Allen Webb &lt;allenwebb@google.com&gt;
Reviewed-by: Josip Sokcevic &lt;sokcevic@google.com&gt;
Tested-by: Allen Webb &lt;allenwebb@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>manifest: add optional base check on remove and extend</title>
<updated>2024-10-28T16:55:10+00:00</updated>
<author>
<name>Fredrik de Groot</name>
<email>fredrik.de.groot@haleytek.com</email>
</author>
<published>2024-09-09T13:54:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=303bd963d57936873f62c7b61a885911afc46788'/>
<id>urn:sha1:303bd963d57936873f62c7b61a885911afc46788</id>
<content type='text'>
This adds an optional, built-in checker for
guarding against patches hanging on wrong
base revisions, which is useful if a lower layer of
the manifest changes after a patch was done.

When adding a patch with a new revision using
extend-project or remove-project/project:

          C---D---E patches in project bla
         /
    A---B project bla in manifest state 1

&lt;extend-project name="bla" revision="E" base-rev="B"&gt;

If project bla gets updated, in a new snap ID
or by a supplier or similar, to a new state:

          C---D---E patches in project bla
         /
    A---B---F---G project bla in manifest state 2

Parsing will fail because revision of bla is now G,
giving the choice to create a new patch branch
from G and updating base-rev, or keeping previous
branch for some reason and only updating base-rev.

Intended for use in a layered manifest with
hashed revisions. Named refs like branches and tags
also work fine when comparing, but will be misleading
if a branch is used as base-rev.

Change-Id: Ic6211550a7d3cc9656057f6a2087c505b40cad2b
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/436777
Reviewed-by: Josip Sokcevic &lt;sokcevic@google.com&gt;
Tested-by: Fredrik de Groot &lt;fredrik.de.groot@haleytek.com&gt;
Commit-Queue: Josip Sokcevic &lt;sokcevic@google.com&gt;
</content>
</entry>
<entry>
<title>[event_log] Stop leaking semaphore resources</title>
<updated>2024-10-24T16:58:17+00:00</updated>
<author>
<name>Josip Sokcevic</name>
<email>sokcevic@chromium.org</email>
</author>
<published>2024-10-23T23:15:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=ae384f8623aeb36809541a5e07900a77a0960d5f'/>
<id>urn:sha1:ae384f8623aeb36809541a5e07900a77a0960d5f</id>
<content type='text'>
With the global state and fork, we are left with uncleaned resources.
Isolate mulitprocessing.Value in a function so we stop the leak.

Bug: 353656374
Change-Id: If50bb544bda12b72f00c02bc1d2c0d19de000b88
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/440261
Commit-Queue: Josip Sokcevic &lt;sokcevic@google.com&gt;
Reviewed-by: Gavin Mak &lt;gavinmak@google.com&gt;
Tested-by: Josip Sokcevic &lt;sokcevic@google.com&gt;
</content>
</entry>
<entry>
<title>progress: always show done message</title>
<updated>2024-10-24T16:21:28+00:00</updated>
<author>
<name>Kuang-che Wu</name>
<email>kcwu@google.com</email>
</author>
<published>2024-10-24T02:12:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=70a4e643e66af182709f0888d7727f54fb6b7ea9'/>
<id>urn:sha1:70a4e643e66af182709f0888d7727f54fb6b7ea9</id>
<content type='text'>
The done message was omitted if the task is shorter than 0.5s. This
might confuse users.

Bug: b/371638995
Change-Id: I3fdd2cd8daea16d34fba88457d09397fff71af15
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/440222
Tested-by: Kuang-che Wu &lt;kcwu@google.com&gt;
Commit-Queue: Kuang-che Wu &lt;kcwu@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>
