<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tools/git-repo.git/tests/test_project.py, branch v2.19</title>
<subtitle>Mirror of gerrit.googlesource.com/git-repo</subtitle>
<id>https://git.enea.com/cgit/tools/git-repo.git/atom?h=v2.19</id>
<link rel='self' href='https://git.enea.com/cgit/tools/git-repo.git/atom?h=v2.19'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/'/>
<updated>2021-12-01T15:27:16+00:00</updated>
<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>tests: Make ReviewableBranchTests.test_smoke work with git &lt; 2.28.0</title>
<updated>2021-04-14T16:22:52+00:00</updated>
<author>
<name>Peter Kjellerstedt</name>
<email>pkj@axis.com</email>
</author>
<published>2021-04-12T21:25:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=b8bf291ddbe00731d441a34cbf1ec5b5f95f401b'/>
<id>urn:sha1:b8bf291ddbe00731d441a34cbf1ec5b5f95f401b</id>
<content type='text'>
Bug: https://crbug.com/gerrit/14380
Change-Id: Id015bd98b008e1530ada2c7e4332c67e8e208e25
Signed-off-by: Peter Kjellerstedt &lt;peter.kjellerstedt@axis.com&gt;
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/303325
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>strip python2-only coding:utf-8 &amp; print_function settings</title>
<updated>2021-01-06T18:53:05+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@google.com</email>
</author>
<published>2021-01-01T13:42:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=784ccfc040dc8efa1a64d3c7d4070b66beb15d08'/>
<id>urn:sha1:784ccfc040dc8efa1a64d3c7d4070b66beb15d08</id>
<content type='text'>
We're committed to Python 3 at this point, so clean up boilerplate.

Bug: https://crbug.com/gerrit/10418
Change-Id: Ib1719ba2eb65c53b94881a1a1bf203ddfcaaafed
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/292382
Reviewed-by: Chris Mcdonald &lt;cjmcdonald@google.com&gt;
Tested-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>Fix tests after "use new main branch"</title>
<updated>2020-12-03T07:29:59+00:00</updated>
<author>
<name>Fredrik de Groot</name>
<email>fredrik.de.groot@volvocars.com</email>
</author>
<published>2020-12-01T14:58:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=6342d5691478873708ee9363bd7dc8e275a75098'/>
<id>urn:sha1:6342d5691478873708ee9363bd7dc8e275a75098</id>
<content type='text'>
Tests worked fine if init.defaultBranch main was used,
but failed due to git branch reasons if master was still used.

Since we can only use init.defaultBranch if git version &gt;= 2.28,
I also went with a template dir HEAD main tweak if lower so tests
now pass regardless of client git default branch and version.

Test: Ran tests with ~/.gitconfig:init.defaultBranch=master
Test: Ran tests with ~/.gitconfig:init.defaultBranch=main
Test: Ran tests for both code branches of git require

Change-Id: I49fa1e4ae45b8aec16a093132ee9fa466cbc11ec
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/290404
Tested-by: Fredrik de Groot &lt;fredrik.de.groot@volvocars.com&gt;
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>tests: use new main branch</title>
<updated>2020-11-17T04:29:09+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@google.com</email>
</author>
<published>2020-11-17T03:56:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=e283b95cf2c95befcb2b67259fd8877c1c36d25e'/>
<id>urn:sha1:e283b95cf2c95befcb2b67259fd8877c1c36d25e</id>
<content type='text'>
Now that we clone "main" by default, use that for our local test.

Change-Id: Ib8420074bdfabfcb9d5252a3a0ecd3d852ca36e8
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/288422
Reviewed-by: Jonathan Nieder &lt;jrn@google.com&gt;
Tested-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>Move RepoHook class from project.py file to dedicated file</title>
<updated>2020-11-03T22:08:08+00:00</updated>
<author>
<name>Remy Bohmer</name>
<email>github@bohmer.net</email>
</author>
<published>2020-09-10T08:38:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=16c1328fecdbd950bb4f2c24f9c49a8ed0992c50'/>
<id>urn:sha1:16c1328fecdbd950bb4f2c24f9c49a8ed0992c50</id>
<content type='text'>
The project.py file is huge and contains multiple
classes. By moving it to seperate class files the code
becomes more readable and maintainable.

Signed-off-by: Remy Bohmer &lt;github@bohmer.net&gt;
Change-Id: Ida9d99d31751d627ae1ea0373418080696d2e14b
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/281293
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
Tested-by: Remy Bohmer &lt;linux@bohmer.net&gt;
</content>
</entry>
<entry>
<title>manifest/tests: get them passing under Windows</title>
<updated>2020-02-21T05:17:05+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@google.com</email>
</author>
<published>2020-02-20T03:36:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=d9254599f9bb47632313ecb90c5f281ceca5da3a'/>
<id>urn:sha1:d9254599f9bb47632313ecb90c5f281ceca5da3a</id>
<content type='text'>
We also need to check more things in the manifest/project handlers,
and use platform_utils in a few places to address Windows behavior.

Drop Python 2.7 from Windows testing as it definitely doesn't work
and we won't be fixing it.

Change-Id: I83d00ee9f1612312bb3f7147cb9535fc61268245
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/256113
Tested-by: Mike Frysinger &lt;vapier@google.com&gt;
Reviewed-by: Jonathan Nieder &lt;jrn@google.com&gt;
Reviewed-by: David Pursehouse &lt;dpursehouse@collab.net&gt;
</content>
</entry>
<entry>
<title>test_project.py: Remove unused variable in 'with' statement</title>
<updated>2020-02-12T02:56:32+00:00</updated>
<author>
<name>David Pursehouse</name>
<email>dpursehouse@collab.net</email>
</author>
<published>2020-02-12T02:36:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=348e218d5b85dc1f497e43a8822ecc8ab73df65e'/>
<id>urn:sha1:348e218d5b85dc1f497e43a8822ecc8ab73df65e</id>
<content type='text'>
flake8 reports:

 F841 local variable 'f' is assigned to but never used

Change-Id: If808eb381ee44c7da71e6281615a06a6723cf945
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254593
Tested-by: David Pursehouse &lt;dpursehouse@collab.net&gt;
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
<entry>
<title>Fix duplicate method name in test_project.py</title>
<updated>2020-02-12T02:55:51+00:00</updated>
<author>
<name>David Pursehouse</name>
<email>dpursehouse@collab.net</email>
</author>
<published>2020-02-12T02:14:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=4bbba7d627d9d801f9e3ab50a864a0d2b70bb3e7'/>
<id>urn:sha1:4bbba7d627d9d801f9e3ab50a864a0d2b70bb3e7</id>
<content type='text'>
flake8 reports:

  F811 redefinition of unused 'test_src_block_dir' from line 259

which is caused by having two methods with the same name. Rename
them both to better desribe their purpose.

Change-Id: If7612a42001776d71bb1a6a80fc631d3d262e6ce
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254449
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
Tested-by: David Pursehouse &lt;dpursehouse@collab.net&gt;
</content>
</entry>
<entry>
<title>project: allow src=. with symlinks</title>
<updated>2020-02-11T04:23:26+00:00</updated>
<author>
<name>Mike Frysinger</name>
<email>vapier@google.com</email>
</author>
<published>2020-02-11T02:35:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=07392ed32662006c029299bc06617310cfe17957'/>
<id>urn:sha1:07392ed32662006c029299bc06617310cfe17957</id>
<content type='text'>
Some Android/Nest manifests are using &lt;linkfile&gt; with src="." to
create stable paths to specific projects.  Allow that specific
use case as it seems reasonable to support.

Bug: https://crbug.com/gerrit/11218
Change-Id: I16dbe8d9fe42ea45440afcb61404c753bff1930d
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/254330
Reviewed-by: Chanho Park &lt;parkch98@gmail.com&gt;
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
Tested-by: Mike Frysinger &lt;vapier@google.com&gt;
</content>
</entry>
</feed>
