<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tools/git-repo.git/git_superproject.py, branch v2.17</title>
<subtitle>Mirror of gerrit.googlesource.com/git-repo</subtitle>
<id>https://git.enea.com/cgit/tools/git-repo.git/atom?h=v2.17</id>
<link rel='self' href='https://git.enea.com/cgit/tools/git-repo.git/atom?h=v2.17'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/'/>
<updated>2021-09-28T19:42:01+00:00</updated>
<entry>
<title>superproject: Only trigger enrollment logic when manifest have it.</title>
<updated>2021-09-28T19:42:01+00:00</updated>
<author>
<name>Xin Li</name>
<email>delphij@google.com</email>
</author>
<published>2021-09-28T16:55:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=b12c369e0bce29914a50aca258271b25893d2857'/>
<id>urn:sha1:b12c369e0bce29914a50aca258271b25893d2857</id>
<content type='text'>
The current code would check for enrollment status when the user did not
explicitly specify --[no-]use-superproject and do not have a remembered
value in their repo client. However, because superproject only makes
sense for manifests that have one specified, we should skip the
enrollment logic in that case.

Address this by checking manifest.superproject prior to proceeding. This
would avoid showing the greeting message of superproject enrollment
which can be confusing for developers.

Tested:
  For manifest without superproject:
   - repo sync --use-superproject will still show message for
     superproject;
   - repo sync will not show message regardless of enrollment state
  For manifest with superproject:
   - repo sync will show message and perform enrollment if not
     previously enrolled

Bug: https://crbug.com/gerrit/15039
Change-Id: Ic2be9f9d037f0e7cf3446da474a5a0d0e4bd88da
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/319255
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>Fix indent error which would have prevented choice expiration to work.</title>
<updated>2021-09-27T18:59:21+00:00</updated>
<author>
<name>Xin Li</name>
<email>delphij@google.com</email>
</author>
<published>2021-09-24T02:15:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=6f8c1bf4ff1c8cd210e00f0514eec3864967c8a5'/>
<id>urn:sha1:6f8c1bf4ff1c8cd210e00f0514eec3864967c8a5</id>
<content type='text'>
Change-Id: I077e05eea23ad58d1dde2c9fe5608660a56d03e5
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/318815
Tested-by: Xin Li &lt;delphij@google.com&gt;
Reviewed-by: Amith Dsouza &lt;amithds@google.com&gt;
Reviewed-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>superproject: Move enrollment to opt-out when enabled globally</title>
<updated>2021-09-20T07:21:22+00:00</updated>
<author>
<name>Xin Li</name>
<email>delphij@google.com</email>
</author>
<published>2021-09-14T23:42:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=0ec2029833ffa85400b729dc3b7039661eb42619'/>
<id>urn:sha1:0ec2029833ffa85400b729dc3b7039661eb42619</id>
<content type='text'>
Our internal experiments was a success so far and we are enrolling 100%
users now.  Instead of asking every two weeks, simply consider a lack of
unexpired choice as accepting the system default.

With this change the user would still be able to override the system
default with --no-use-superproject, or to permanently set the choice in
user's profile with git config --global repo.superprojectchoice.

Bug: [google internal] b/190688390
Change-Id: Idc77a9cbf88a169d90304169e91f0d722dc4ac8b
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/317975
Tested-by: Xin Li &lt;delphij@google.com&gt;
Reviewed-by: Raman Tenneti &lt;rtenneti@google.com&gt;
</content>
</entry>
<entry>
<title>superproject: Log branch and remote url with every log message.</title>
<updated>2021-09-16T15:46:19+00:00</updated>
<author>
<name>Raman Tenneti</name>
<email>rtenneti@google.com</email>
</author>
<published>2021-09-15T23:32:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=d8e8ae8990c7f02907f8f86d9f772ca4e4b02f11'/>
<id>urn:sha1:d8e8ae8990c7f02907f8f86d9f772ca4e4b02f11</id>
<content type='text'>
Saved superproject's remote URL in _remote_url data and used it
in the _Fecth function.

Tested:
$ ./run_tests
$ flake8 git_superproject.py
$ repo_dev init --use-superproject -u https://android.googlesource.com/platform/manifest
$ repo_dev sync

   Verified the all log messages have the following format.
   repo superproject branch: &lt;branch&gt; url: &lt;url&gt; warning: &lt;message&gt;

Bug: [google internal] b/200072098
Change-Id: Iac6af7c99225479fd50bc6909396b22e0ce5f76b
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/318177
Reviewed-by: Xin Li &lt;delphij@google.com&gt;
Tested-by: Raman Tenneti &lt;rtenneti@google.com&gt;
</content>
</entry>
<entry>
<title>superproject: Provide accurate feedback for user choice</title>
<updated>2021-09-08T20:35:42+00:00</updated>
<author>
<name>Xin Li</name>
<email>delphij@google.com</email>
</author>
<published>2021-09-08T07:25:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=1328c35a4d0b47c7e8c00fe351f0e587481e28c2'/>
<id>urn:sha1:1328c35a4d0b47c7e8c00fe351f0e587481e28c2</id>
<content type='text'>
Currently the code would give a message that would appear like the user
have enrolled the experiment regardless of the actual choice. For users
who choose to not enroll in the experiment, we should give them
instructions to override (enable) superproject once instead of how to
disable it, which is what the code already behave.

Bug: [google internal] b/199167992
Change-Id: Iba3314cb510aedf024375a26baa8bc1d5e2846cf
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/317382
Tested-by: Xin Li &lt;delphij@google.com&gt;
Reviewed-by: Raman Tenneti &lt;rtenneti@google.com&gt;
</content>
</entry>
<entry>
<title>superoject: log error message in the 'fmt' field also.</title>
<updated>2021-09-03T00:32:04+00:00</updated>
<author>
<name>Raman Tenneti</name>
<email>rtenneti@google.com</email>
</author>
<published>2021-09-02T23:13:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=7f8bd85184deae52861513b6fd602508eebdd232'/>
<id>urn:sha1:7f8bd85184deae52861513b6fd602508eebdd232</id>
<content type='text'>
Tested:
+ Verified error messages are being collected.

Bug: [google internal] b/193711236
Change-Id: I6c608a2af332ccd38722b7f83a82e5ac8fa143db
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/317162
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>
<entry>
<title>superproject: prepend messages with - "repo superproject"</title>
<updated>2021-08-12T16:30:26+00:00</updated>
<author>
<name>Raman Tenneti</name>
<email>rtenneti@google.com</email>
</author>
<published>2021-08-11T16:26:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=5637afcc60fdbd38fc0790ea84d5dcb901ec5959'/>
<id>urn:sha1:5637afcc60fdbd38fc0790ea84d5dcb901ec5959</id>
<content type='text'>
Changed _LogError method to _LogWarning.

Replaced 'repo error:' with "repo superproject warning:"(except IOError
message, which is still an "repo superproject error:" message)

Tested:
$ ./run_tests

Tested the errors and warnings by forcing the error/warning.
$ repo_dev sync -j 20 --use-superproject platform/packages/apps/Music
  ...
  repo superproject warning: please file a bug using go/repo-bug to report missing commit_ids for: []
  ...
  repo superproject error: cannot write manifest to : /sdc/android/src/aosp/.repo/exp-superproject/superproject_override.xml
  ...

Bug: [google internal] b/193711236

Change-Id: Ia0b6c830e04cf18dfc1a2ce325181a5b1160e054
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/314642
Tested-by: Raman Tenneti &lt;rtenneti@google.com&gt;
Reviewed-by: Raman Tenneti &lt;rtenneti@google.com&gt;
Reviewed-by: Ian Kasprzak &lt;iankaz@google.com&gt;
Reviewed-by: Xin Li &lt;delphij@google.com&gt;
</content>
</entry>
<entry>
<title>superproject: Skip updating of superproject when -l is used with sync.</title>
<updated>2021-07-28T16:12:53+00:00</updated>
<author>
<name>Raman Tenneti</name>
<email>rtenneti@google.com</email>
</author>
<published>2021-07-27T15:54:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=ae86a460222c34b2f9cd600e6d17f8fd4f467fae'/>
<id>urn:sha1:ae86a460222c34b2f9cd600e6d17f8fd4f467fae</id>
<content type='text'>
Skip updating the superproject when -l is present and use the existing
superproject, if available (this would make sync -l work as it's
intended to do), and fall back to sync without superproject when not
(this would catch the case when superproject is enabled by automatic
rollout).

Tested:
$ repo sync -j 20 -n
NOTICE: --use-superproject is in beta; report any issues to the address described in `repo version`
/usr/local/google/home/rtenneti/work/android/src/aosp/.repo/exp-superproject/925043f706ba64db713e9bf3b55987e2-superproject.git: Initial setup for superproject completed.
Fetching: 100% (1032/1032), done in 41.184s
...

$ repo_dev sync -j 20 -l
prebuilts/asuite/: discarding 1 commits
prebuilts/runtime/: discarding 1 commits
...
repo sync has finished successfully.

+ With superproject-override.xml and test it.

  $ ls -l .repo/exp-superproject/
  total 176
  drwxr-xr-x 7 rtenneti primarygroup   4096 Jul 27 14:10 925043f706ba64db713e9bf3b55987e2-superproject.git
  -rw-r--r-- 1 rtenneti primarygroup 172742 Jul 27 14:10 superproject_override.xml
  rtenneti@rtenneti:~/work/android/src/aosp$ repo_dev sync -j 20 -l
  ...
  repo sync has finished successfully.

+ Rename the file superproject-override.xml and test it.
  $ ls -l .repo/exp-superproject/
  total 176
  drwxr-xr-x 7 rtenneti primarygroup   4096 Jul 27 14:10 925043f706ba64db713e9bf3b55987e2-superproject.git
  -rw-r--r-- 1 rtenneti primarygroup 172742 Jul 27 14:10 temp.xml

  $ repo_dev sync -j 20 -l
  Checking out:  1% (12/1031) platform/external/rust/crates/fallible-streaming-iteexternal/linux-kselftest/: discarding 1 commits
  prebuilts/remoteexecution-client/: discarding 1 commits
  Checking out: 51% (536/1031) platform/prebuilts/gcc/darwin-x86/aarch64/....
  ....
  Checking out: 100% (1031/1031), done in 5.478s
  repo sync has finished successfully.

Bug: [google internal] b/184368268
Change-Id: I3aba5872e4f7c299977b92c2a39847ef28698c5a
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/312962
Reviewed-by: Mike Frysinger &lt;vapier@google.com&gt;
Reviewed-by: Jonathan Nieder &lt;jrn@google.com&gt;
Tested-by: Raman Tenneti &lt;rtenneti@google.com&gt;
</content>
</entry>
</feed>
