<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tools/git-repo.git/tests, branch v2.22</title>
<subtitle>Mirror of gerrit.googlesource.com/git-repo</subtitle>
<id>https://git.enea.com/cgit/tools/git-repo.git/atom?h=v2.22</id>
<link rel='self' href='https://git.enea.com/cgit/tools/git-repo.git/atom?h=v2.22'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/'/>
<updated>2022-01-11T20:16:42+00:00</updated>
<entry>
<title>test_project: use os.readlink instead of Path.readlink</title>
<updated>2022-01-11T20:16:42+00:00</updated>
<author>
<name>Sebastian Wagner</name>
<email>sebix@sebix.at</email>
</author>
<published>2022-01-11T11:12:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=a3ac81627885f78b9391ff291c4a5bc617494045'/>
<id>urn:sha1:a3ac81627885f78b9391ff291c4a5bc617494045</id>
<content type='text'>
Path.readlink is only available on Python 3.9, breaking compatibility
with all python versions below. os.readlink is already used in other
places of this file, so use it here as well.

Change-Id: I5acf8f5334a3e7c8de9cea1939d7e2b9af5f30ae
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/327844
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
Tested-by: Sebastian Wagner &lt;sebix@sebix.at&gt;
</content>
</entry>
<entry>
<title>project: abort a bit earlier before migrating .git/</title>
<updated>2022-01-07T20:17:14+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@google.com</email>
</author>
<published>2022-01-06T10:42:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=89ed8acdbe468fd76d531cd8b7b2ace5b414f0bd'/>
<id>urn:sha1:89ed8acdbe468fd76d531cd8b7b2ace5b414f0bd</id>
<content type='text'>
Verify all the .git/ paths will be handled by the migration logic before
starting the migration.  This way we still abort &amp; log an error, but the
user gets to see it before we put the tree into a state that they have to
manually recover.  Also add a few more known-safe-to-clobber paths.

Bug: https://crbug.com/gerrit/15273
Change-Id: If49d69b341bc960ddcafa30da333fb5ec7145b51
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/327557
Reviewed-by: Colin Cross &lt;ccross@android.com&gt;
Tested-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>project: migrate worktree .git/ dirs to symlinks</title>
<updated>2021-12-01T15:27:16+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@google.com</email>
</author>
<published>2021-11-14T04:29:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=2a089cfee4a3eb0c28cfb441861fc1fcb05797d3'/>
<id>urn:sha1:2a089cfee4a3eb0c28cfb441861fc1fcb05797d3</id>
<content type='text'>
Historically we created a .git/ subdir in each source checkout and
symlinked individual files to the .repo/projects/ paths.  This layer
of indirection isn't actually needed: the .repo/projects/ paths are
guaranteed to only ever have a 1-to-1 mapping with the actual git
checkout.  So we don't need to worry about having files in .git/ be
isolated.

To that end, change how we manage the actual project checkouts from
a dir full of symlinks (and a few files) to a symlink to the internal
.repo/projects/ dir.  This makes the code simpler &amp; faster.

The directory structure we have today is:
.repo/
  project-objects/chromiumos/third_party/kernel.git/
    &lt;paths omitted as not relevant to this change&gt;
  projects/src/third_party/kernel/
    v3.8.git/
      config
      description   -&gt; …/project-objects/…/config
      FETCH_HEAD
      HEAD
      hooks/        -&gt; …/project-objects/…/hooks/
      info/         -&gt; …/project-objects/…/info/
      logs/
      objects/      -&gt; …/project-objects/…/objects/
      packed-refs
      refs/
      rr-cache/     -&gt; …/project-objects/…/rr-cache/
src/third_party/kernel/
  v3.8/
    .git/
      config        -&gt; …/projects/…/v3.8.git/config
      description   -&gt; …/project-objects/…/v3.8.git/description
      HEAD
      hooks/        -&gt; …/project-objects/…/v3.8.git/hooks/
      index
      info/         -&gt; …/project-objects/…/v3.8.git/info/
      logs/         -&gt; …/projects/…/v3.8.git/logs/
      objects/      -&gt; …/project-objects/…/v3.8.git/objects/
      packed-refs   -&gt; …/projects/…/v3.8.git/packed-refs
      refs/         -&gt; …/projects/…/v3.8.git/refs/
      rr-cache/     -&gt; …/project-objects/…/v3.8.git/rr-cache/

The directory structure we have after this commit:
.repo/
  &lt;nothing changes&gt;
src/third_party/kernel/
  v3.8/
    .git            -&gt; …/projects/…/v3.8.git

Bug: https://crbug.com/gerrit/15273
Change-Id: I9dd8def23fbfb2f4cb209a93f8b1b2b24002a444
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/323695
Reviewed-by: Mike Nichols &lt;mikenichols@google.com&gt;
Reviewed-by: Xin Li &lt;delphij@google.com&gt;
Tested-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>git_config: Fixed test.gitconfig getting updated when running tests.</title>
<updated>2021-09-30T21:45:09+00:00</updated>
<author>
<name>Raman Tenneti</name>
<email>rtenneti@google.com</email>
</author>
<published>2021-09-30T21:24:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=a0f6006ae7613ba08480bfccac300ea7c7de9af4'/>
<id>urn:sha1:a0f6006ae7613ba08480bfccac300ea7c7de9af4</id>
<content type='text'>
Moved test_GetSyncAnalysisStateData to GitConfigReadWriteTests class.

Deleted [repo "syncstate*..] data from tests/fixtures/test.gitconfig.

Tested:
./run_tests
...
tests/test_git_config.py::GitConfigReadWriteTests::test_GetSyncAnalysisStateData PASSED [ 84%]
...

Bug: https://crbug.com/gerrit/15103
Change-Id: I8cb89ce10b025994a045106c9c66dd243ae8ba50
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/319557
Tested-by: Raman Tenneti &lt;rtenneti@google.com&gt;
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>trace2_event: Add remove_prefix to fix failing tests on Linux &amp; macOS.</title>
<updated>2021-09-29T21:24:59+00:00</updated>
<author>
<name>Raman Tenneti</name>
<email>rtenneti@google.com</email>
</author>
<published>2021-09-29T00:15:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=4f88206178e37205ac13220f4d38b8132839acd9'/>
<id>urn:sha1:4f88206178e37205ac13220f4d38b8132839acd9</id>
<content type='text'>
removeprefix is available i python 3.9. Mac and Linux are running in
a version below 3.9. Thus tests are failing with the following error:
  "AttributeError: 'str' object has no attribute 'removeprefix' "

Replaced the removeprefix with custom function which we will delete
once Linux and macOS versions are updated.

Tested:
$ ./run_tests

Bug: [google internal] b/201453085
Change-Id: I9b4d564ff1176e1b4471805ef05472c1914cd9f9
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/319375
Tested-by: Raman Tenneti &lt;rtenneti@google.com&gt;
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>Add 'dest-path' to extend-project to support changing path</title>
<updated>2021-09-28T20:12:00+00:00</updated>
<author>
<name>Michael Kelly</name>
<email>mkelly@arista.com</email>
</author>
<published>2020-06-13T09:10:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=37c21c268badc2602a827d2236027e235fff95e0'/>
<id>urn:sha1:37c21c268badc2602a827d2236027e235fff95e0</id>
<content type='text'>
This allows us to move the repository to a new location in the source
tree without having to remove-project + add a new project tag.

Change-Id: I4dba6151842e57f6f2b8fe60cda260ecea68b7b4
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/310962
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
Tested-by: Michael Kelly &lt;mkelly@arista.com&gt;
</content>
</entry>
<entry>
<title>superproject: Log syncstate's parameter as data-json it it is an array.</title>
<updated>2021-09-28T18:22:49+00:00</updated>
<author>
<name>Raman Tenneti</name>
<email>rtenneti@google.com</email>
</author>
<published>2021-09-27T22:15:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=bbe883649402d428d1996e1ef0d81e43c7a780a0'/>
<id>urn:sha1:bbe883649402d428d1996e1ef0d81e43c7a780a0</id>
<content type='text'>
All the values of syncstate are strings, check the first byte and last
byte to see if it is an array. For syncstate data, there were no false
positives.

Tested:
$ repo_dev sync

Verified event logged for argv is "data-json".

$./run_tests

Bug: [google internal] b/201102002
Change-Id: Id56adb532b80267f08d09147ac663cdd5987ce87
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/319075
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
Tested-by: Raman Tenneti &lt;rtenneti@google.com&gt;
</content>
</entry>
<entry>
<title>make file removal a bit more robust</title>
<updated>2021-09-28T16:06:50+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@google.com</email>
</author>
<published>2021-09-28T15:27:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=9d96f58f5fcec101c612e61c3e2526ca071d89ea'/>
<id>urn:sha1:9d96f58f5fcec101c612e61c3e2526ca071d89ea</id>
<content type='text'>
Some of the file removal calls are subject to race conditions (if
something else deletes the file), so extend our remove API to have
an option to ignore ENOENT errors.  Then update a bunch of random
call sites to use this new functionality.

Change-Id: I31a9090e135452033135337a202a4fc2dbf8b63c
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/319195
Reviewed-by: Sean McAllister &lt;smcallis@google.com&gt;
Tested-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>superproject: Log argv parameter of syncstate as 'data-json'.</title>
<updated>2021-09-27T19:11:14+00:00</updated>
<author>
<name>Raman Tenneti</name>
<email>rtenneti@google.com</email>
</author>
<published>2021-09-27T17:55:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=956f7363d100abe6c1f58b36d7aea59b9e41cd04'/>
<id>urn:sha1:956f7363d100abe6c1f58b36d7aea59b9e41cd04</id>
<content type='text'>
Fixed: "we need to make a special case for logging the argv; it
should probably be a "data-json" event so that we log this directly as
an array rather than an encoded string.

Tested:
$ repo_dev sync

Verified event logged for argv is "data-json".

$./run_tests

Bug: [google internal] b/201102002
Change-Id: I18ccec79c73c8dc931cb8afc472b2361db8aea4c
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/319055
Reviewed-by: Josh Steadmon &lt;steadmon@google.com&gt;
Reviewed-by: Xin Li &lt;delphij@google.com&gt;
Tested-by: Raman Tenneti &lt;rtenneti@google.com&gt;
</content>
</entry>
<entry>
<title>superproject: support a new revision attribute.</title>
<updated>2021-09-27T06:36:05+00:00</updated>
<author>
<name>Xin Li</name>
<email>delphij@google.com</email>
</author>
<published>2021-09-27T06:20:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=e0b16a22a01c54a00a9e4a0c53dddfce3b0d59d6'/>
<id>urn:sha1:e0b16a22a01c54a00a9e4a0c53dddfce3b0d59d6</id>
<content type='text'>
Tested:
$ ./run_tests

Verified that a manifest that specified superproject revision would use
the specified revision, and superproject will use the default revision.

Note that this is a slight behavior change from earlier repo versions,
which would always use the branch name of the manifest itself. However,
the new behavior would be more consisitent with regular "project"
element and would allow superproject be used even if it is not enabled
for the particular manifest branch, so we have decided to make the
change as it would provide more flexibility and better matches what
other elements would do.

Bug: [google internal] b/187868160
Change-Id: I35255ee347aff6e65179f7879d52931f168b477e
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/317643
Tested-by: Xin Li &lt;delphij@google.com&gt;
Reviewed-by: Raman Tenneti &lt;rtenneti@google.com&gt;
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
</feed>
