<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tools/git-repo.git/tests, branch v2.18</title>
<subtitle>Mirror of gerrit.googlesource.com/git-repo</subtitle>
<id>https://git.enea.com/cgit/tools/git-repo.git/atom?h=v2.18</id>
<link rel='self' href='https://git.enea.com/cgit/tools/git-repo.git/atom?h=v2.18'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/'/>
<updated>2021-09-30T21:45:09+00:00</updated>
<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>
<entry>
<title>manifest: make repo-hooks more robust wrt element ordering</title>
<updated>2021-09-23T21:17:38+00:00</updated>
<author>
<name>Jack Neus</name>
<email>jackneus@google.com</email>
</author>
<published>2021-09-21T22:23:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=a84f43a0065e7af2a30fd6b99bf3f13efcc7961c'/>
<id>urn:sha1:a84f43a0065e7af2a30fd6b99bf3f13efcc7961c</id>
<content type='text'>
Currently, repo will fail to sync to a manifest if the definition
of the repo-hooks project comes after the repo-hooks element.

BUG=none
TEST=new test, run_tests

Change-Id: I0bf85625173492af6c6404d4b67543e96e670562
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/318520
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
Tested-by: Jack Neus &lt;jackneus@google.com&gt;
</content>
</entry>
<entry>
<title>sync: Log repo sync state events as 'data' events.</title>
<updated>2021-09-14T21:36:12+00:00</updated>
<author>
<name>Raman Tenneti</name>
<email>rtenneti@google.com</email>
</author>
<published>2021-09-14T00:40:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=6448a4f2af53c241594b5d12eb0d03b18f889eda'/>
<id>urn:sha1:6448a4f2af53c241594b5d12eb0d03b18f889eda</id>
<content type='text'>
git_trace2_event_log.py:
+ Added LogDataConfigEvents method to log 'data' events.
  Sync's current_sync_state and previous_sync_state are logged
  as 'data' events in the current log.

  It logs are key/value in the |config| argument. Each key is
  prefixed with |prefix| argument.

  The following are sample events that are logged during repo sync.

   {"event":"data",
   "sid":"repo-20210914T181545Z-P000330c0/repo-20210914T181545Z-P000330c0",
   "thread":"MainThread",
   "time":"2021-09-14T18:16:19.935846Z",
   "key":"previous_sync_state/repo.syncstate.main.synctime",
   "value":"2021-09-14T17:27:11.573717Z"}

   {"event":"data",
   "sid":"repo-20210914T181545Z-P000330c0/repo-20210914T181545Z-P000330c0",
   "thread":"MainThread",
   "time":"2021-09-14T18:16:19.955546Z",
   "key":"current_sync_state/repo.syncstate.main.synctime",
   "value":"2021-09-14T18:16:19.935979Z"}

tests/test_git_trace2_event_log.py:
+ Added unit tests

sync.py:
+ Changed logging calls to LogDataConfigEvents.

Tested:
$ ./run_tests

Tested it by running the following command multiple times.
$ repo_dev sync -j 20
  repo sync has finished successfully

  Verified config data is looged in trace2 event logs.

Bug: [google internal] b/199758376
Change-Id: I75fd830e90c1811ec28510538c99a2632b104e85
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/317823
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: print messages if the manifest has superproject tag.</title>
<updated>2021-08-13T20:07:40+00:00</updated>
<author>
<name>Raman Tenneti</name>
<email>rtenneti@google.com</email>
</author>
<published>2021-08-13T18:47:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=b55769a5c9422e0aac532e901a4d7b5af834b34d'/>
<id>urn:sha1:b55769a5c9422e0aac532e901a4d7b5af834b34d</id>
<content type='text'>
1) If the manifest has superproject tag (git_master, etc), then
   display error/warning messages (as it is doing today)
2) If the manifest doesn't have superproject tag (nest, chromeos
   manifests), then don't display any error/warning messages about
   superrproject (behave as though user has specified
   --no-use-superproject).
3) Print error/warning messages if --use-superproject passed as
   argument to repo sync.
4) No change in behavior for the repo init command.

git_superproject.py:
+ Fixed typo in _WriteManifestFile method name
+ Superproject accepts print_message  as an argument and it defaults
  to True. All messages that are printed to stderr are controlled by
  this flag. If it is True, then messages get printed.
+ Added PrintMessages function which return true if either
  --use-superproject is specified on the command line or if the
  manifest has a superproject tag.

sync.py:
+ Displays the warning message if PrintMessgages are enabled and
  passes that as argument to superproject object.
+ Added 'hassuperprojecttag' trace2 log entry for analysis. We can
  find users/branches that are using superproject, but the manifest is
  missing the superproject tag.

Tested:
$ ./run_tests

+ Verified printing of messages with and without superproject tag, with
  with --use-superproject option.

+ aosp-master
  $ repo_dev init --use-superproject -u https://android.googlesource.com/platform/manifest
  $ repo_dev sync

+ A manifest without superproject tag.
  $ repo_dev init -m $(pwd)/manifest_7482982.xml
  $ repo_dev sync -n -c -j32 -m $(pwd)/manifest_7482982.xml

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