Commit Graph

100 Commits (main)

Author SHA1 Message Date
Andrew Grieve da85282643 gclient_eval.py: Add "new_usages_require_review" to DEPS file schema
Bug: 365797506
Change-Id: I332e169fd4e5756d92fd3acc2b27eef4c647cda7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5920788
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Auto-Submit: Andrew Grieve <agrieve@chromium.org>
5 months ago
Josip Sokcevic adfd994f98 [gclient] remove output_file from gcs object setdep
We now ask users to preserve the order of objects since there are now
two fields that don't need to updated (output_file and condition).

R=kimstephanie@google.com

Change-Id: Ic2e8c0b350060247458e733f14466145c2af435f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5539331
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Auto-Submit: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Stephanie Kim <kimstephanie@google.com>
10 months ago
Josip Sokcevic e6a370ee1d [gclient] Fix setdep when GCS object condition is set
If an object has condition set, gclient setdep fails with a KeyError
exception. This change allowlists properties that can change during
the setdep operation.

R=kimstephanie@google.com

Change-Id: Icde3a1c0ff3d9e7c5a4560147e8baddad397ccd6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5532302
Reviewed-by: Stephanie Kim <kimstephanie@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
10 months ago
Josip Sokcevic 96dfd2e757 [gclient] Support per-object GCS condition
llvm-build GCS dependency needs to place one GCS object based on
platform. We can't have multiple top-level GCS llvm-build dependencies
as the pathname is used as a key.

This extends object property of GCS dependency to have `condition`.
The `condition` field will be AND with the top level condition.

R=jojwang@google.com, kimstephanie@google.com

Change-Id: I06a6281140a8057d598a6eac2b07c7577f0ea86c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5527474
Reviewed-by: Stephanie Kim <kimstephanie@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
10 months ago
Stephanie Kim dec69b8882 Add getdep functionality for GCS deps
> gclient getdep -r src/third_party/js_code_coverage
[{'object_name': 'js_code_coverage/d538975c93eefc7bafd599b50f867e90c1ef17f3', 'sha256sum': '646bb00ced0a930b2eb1e4dbcfac18ebbb8f889bb80599e0254d9d6505427914', 'size_bytes': 1469185, 'generation': 1657780123604338}]

Bug: b/328065301
Change-Id: I9dabe84751905f5cc52c861e565f9adbcf0043fd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5506847
Reviewed-by: Joanna Wang <jojwang@chromium.org>
Commit-Queue: Stephanie Kim <kimstephanie@google.com>
10 months ago
Stephanie Kim 497e8167a4 Implement setdeps for GCS
The number of revision objects must match the number of current objects
for a given path. The comma separated values for a revision object
must also be in the order of object_name, sha256sum, size_bytes, and
generation.

Example usage:
gclient setdep --revision=src/third_party/js_code_coverage@myobjectname,deadbeef,1223455,9438393984/myobjectname2,deadbefeaef,1223455,9438393984

Resulting diff:
diff --git a/DEPS b/DEPS
index b40bca8cdd89d..c2186185c1db5 100644
--- a/DEPS
+++ b/DEPS
@@ -553,10 +553,10 @@ deps = {
       'bucket': 'chromium-nodejs',
       'objects': [
           {
-              'object_name': 'js_code_coverage/d538975c93eefc7bafd599b50f867e90c1ef17f3',
-              'sha256sum': '646bb00ced0a930b2eb1e4dbcfac18ebbb8f889bb80599e0254d9d6505427914',
-              'size_bytes': 1469185,
-              'generation': 1657780123604338,
+              'object_name': 'myobjectname',
+              'sha256sum': 'deadbeef',
+              'size_bytes': 1223455,
+              'generation': 9438393984,
           },
       ],
   },

Bug: b/324418194
Change-Id: Ibd824f7b51fa88f732c7197e2cc663b58de7479e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5503101
Commit-Queue: Stephanie Kim <kimstephanie@google.com>
Reviewed-by: Joanna Wang <jojwang@chromium.org>
10 months ago
Stephanie Kim 2c9e581fad Allow multiple objects per GCS dep
Allows multiple objects to use the same directory path.
This requires that each object has its own unique hash file and
unique migration file name. All object names must be unique.

Also update download_from_google_storage to check for the unique
migration file name.

Remove ConvertToGcs smoke tests since we're not converting
any git <-> gcs deps.

Example:
```
'src/third_party/llvm-build/Release+Asserts': {
  'dep_type': 'gcs',
  'condition': 'not llvm_force_head_revision',
  'bucket': 'chromium-browser-clang',
  'objects': [
      {
          'object_name': 'Linux_x64/clang-llvmorg-19-init-2941-ga0b3dbaf-22.tar.xz',
          'sha256sum': '7b33138d8592199f97d132242d7b3e10f460c5c9655d49a3ad3767218fba7a77',
          'size_bytes': 50212876,
      },
      {
         'object_name': 'Linux_x64/llvmobjdump-llvmorg-19-init-2941-ga0b3dbaf-22.tar.xz',
         'sha256sum': '14d669650cd212eb0ccb8c34a9e655338dfdee66fe2ecdaa517f6bd607c09a97',
         'size_bytes': 5302312,
       },
    ]
 },
```

TODO: update .gitignore to search for *_is_first_class and *_hash

Bug: b/324418194
Change-Id: I89d34b06ee24f4c1aa316cd51530ad078e823143
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5420793
Commit-Queue: Stephanie Kim <kimstephanie@google.com>
Reviewed-by: Joanna Wang <jojwang@chromium.org>
11 months ago
Joanna Wang f1098b6bfe Add generation version number to GCS first-class entries.
Bug:b/328065301
Change-Id: I971c390a8f90e4f9734cd1e3d73ddb5fcf712b6c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5413954
Commit-Queue: Joanna Wang <jojwang@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
11 months ago
Stephanie Kim d71daa7bd8 Require size_bytes for first class GCS dep
GCS deps will require a size_bytes field of type `int`. If gclient
sees that the actual byte size is different than the noted size, it
will raise an exception.

Bug: b/328065441
Change-Id: If61496eae39cd372966d7e64ba4a84759708c60b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5367540
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Joanna Wang <jojwang@chromium.org>
Commit-Queue: Stephanie Kim <kimstephanie@google.com>
12 months ago
Stephanie Kim 53870d4056 Optional output_file field in GCS dep
When an 'output_file' arg is included, the downloaded object from GCS
will be downloaded in that path.

Example:
```
'src/buildtools/linux': {
  'bucket': 'bucket123',
  'object_name': 'clang-format-version123',
  'dep_type': 'gcs',
  'sha256sum': 'abcd123',
  'output_file': 'clang-format',
}
```
The GCS object will be downloaded at src/buildtools/linux/clang-format

Bug: b/324418194
Change-Id: I1049abeb09a1027c5477d955e50611d43015d0a4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5353387
Commit-Queue: Stephanie Kim <kimstephanie@google.com>
Reviewed-by: Joanna Wang <jojwang@chromium.org>
12 months ago
Stephanie Kim 63ae5028c1 Reland "Reland "Add support for GCS deps""
This is a reland of commit 46d5382f69

Whats fixed: Removed the call_google_storage refactor so
that all `import download_from_google_storage` callsites
(in depot_tools and chromium/src) won't be affected.
Instead, gclient.py will import Gsutil from download_from_google_storage.

Original change's description:
> Reland "Add support for GCS deps"
>
> This is a reland of commit 3eedee7b55
>
> Fixed more imports in download_google_storage.py
>
> Original change's description:
> > Add support for GCS deps
> >
> > Also take out GCS calling logic from download_google_storage and
> > into call_google_storage.
> >
> > GCS deps look like:
> >    'src/third_party/node/linux': {
> >        'dep_type': 'gcs',
> >        'condition': 'checkout_linux',
> >        'bucket': 'chromium-nodejs/20.11.0',
> >        'object_name': '46795170ff5df9831955f163f6966abde581c8af',
> >        'sha256sum': '887504c37404898ca41b896f448ee6d7fc24179d8fb6a4b79d028ab7e1b7153d',
> >    },
> >
> >    'src/third_party/llvm-build/Release+Asserts': {
> >        'dep_type': 'gcs',
> >        'condition': 'checkout_linux',
> >        'bucket': 'chromium-browser-clang',
> >        'object_name': 'Linux_x64/clang-llvmorg-18-init-17730-gf670112a-2.tar.xz',
> >        'sha256sum': '1e46df9b4e63c074064d75646310cb76be2f19815997a8486987189d80f991e8',
> >    },
> >
> > Example directory for src/third_party/node/linux after gclient sync:
> > - tar_file.gz is the downloaded file from GCS.
> > - node_linux_x64/ is extracted in its path.
> > - `hash` contains the sha of GCS filename.
> > ```
> > chromium/src/ ->
> >    third_party/node/linux/ ->
> >        hash, tar_file.gz, node_linux_x64/
> > ```
> >
> > Bug: b/324418194
> > Change-Id: Ibcbbff27e211f194ddb8a08494af56570a84a12b
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5299722
> > Commit-Queue: Stephanie Kim <kimstephanie@google.com>
> > Reviewed-by: Joanna Wang <jojwang@chromium.org>
>
> Bug: b/324418194
> Change-Id: Ie64265a86abcec0135408715a45c32a8bb7c7408
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5346338
> Reviewed-by: Joanna Wang <jojwang@chromium.org>
> Commit-Queue: Stephanie Kim <kimstephanie@google.com>

Bug: b/324418194
Change-Id: I8b58dadbaa740fd9da1fbaf29b3b6ff5ef67fd12
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5352896
Commit-Queue: Stephanie Kim <kimstephanie@google.com>
Reviewed-by: Joanna Wang <jojwang@chromium.org>
12 months ago
Michael Ershov 3c79cfc485 Revert "Reland "Add support for GCS deps""
This reverts commit 46d5382f69.

Reason for revert: win-presubmit builder probably started failing after this CL.
https://ci.chromium.org/ui/p/chromium/builders/ci/win-presubmit

Original change's description:
> Reland "Add support for GCS deps"
>
> This is a reland of commit 3eedee7b55
>
> Fixed more imports in download_google_storage.py
>
> Original change's description:
> > Add support for GCS deps
> >
> > Also take out GCS calling logic from download_google_storage and
> > into call_google_storage.
> >
> > GCS deps look like:
> >    'src/third_party/node/linux': {
> >        'dep_type': 'gcs',
> >        'condition': 'checkout_linux',
> >        'bucket': 'chromium-nodejs/20.11.0',
> >        'object_name': '46795170ff5df9831955f163f6966abde581c8af',
> >        'sha256sum': '887504c37404898ca41b896f448ee6d7fc24179d8fb6a4b79d028ab7e1b7153d',
> >    },
> >
> >    'src/third_party/llvm-build/Release+Asserts': {
> >        'dep_type': 'gcs',
> >        'condition': 'checkout_linux',
> >        'bucket': 'chromium-browser-clang',
> >        'object_name': 'Linux_x64/clang-llvmorg-18-init-17730-gf670112a-2.tar.xz',
> >        'sha256sum': '1e46df9b4e63c074064d75646310cb76be2f19815997a8486987189d80f991e8',
> >    },
> >
> > Example directory for src/third_party/node/linux after gclient sync:
> > - tar_file.gz is the downloaded file from GCS.
> > - node_linux_x64/ is extracted in its path.
> > - `hash` contains the sha of GCS filename.
> > ```
> > chromium/src/ ->
> >    third_party/node/linux/ ->
> >        hash, tar_file.gz, node_linux_x64/
> > ```
> >
> > Bug: b/324418194
> > Change-Id: Ibcbbff27e211f194ddb8a08494af56570a84a12b
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5299722
> > Commit-Queue: Stephanie Kim <kimstephanie@google.com>
> > Reviewed-by: Joanna Wang <jojwang@chromium.org>
>
> Bug: b/324418194
> Change-Id: Ie64265a86abcec0135408715a45c32a8bb7c7408
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5346338
> Reviewed-by: Joanna Wang <jojwang@chromium.org>
> Commit-Queue: Stephanie Kim <kimstephanie@google.com>

Bug: b/324418194
Change-Id: Ic4517f6c9e05aea3f3f052d2a44865733236998b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5352167
Auto-Submit: Michael Ershov <miersh@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Michael Ershov <miersh@google.com>
12 months ago
Stephanie Kim 46d5382f69 Reland "Add support for GCS deps"
This is a reland of commit 3eedee7b55

Fixed more imports in download_google_storage.py

Original change's description:
> Add support for GCS deps
>
> Also take out GCS calling logic from download_google_storage and
> into call_google_storage.
>
> GCS deps look like:
>    'src/third_party/node/linux': {
>        'dep_type': 'gcs',
>        'condition': 'checkout_linux',
>        'bucket': 'chromium-nodejs/20.11.0',
>        'object_name': '46795170ff5df9831955f163f6966abde581c8af',
>        'sha256sum': '887504c37404898ca41b896f448ee6d7fc24179d8fb6a4b79d028ab7e1b7153d',
>    },
>
>    'src/third_party/llvm-build/Release+Asserts': {
>        'dep_type': 'gcs',
>        'condition': 'checkout_linux',
>        'bucket': 'chromium-browser-clang',
>        'object_name': 'Linux_x64/clang-llvmorg-18-init-17730-gf670112a-2.tar.xz',
>        'sha256sum': '1e46df9b4e63c074064d75646310cb76be2f19815997a8486987189d80f991e8',
>    },
>
> Example directory for src/third_party/node/linux after gclient sync:
> - tar_file.gz is the downloaded file from GCS.
> - node_linux_x64/ is extracted in its path.
> - `hash` contains the sha of GCS filename.
> ```
> chromium/src/ ->
>    third_party/node/linux/ ->
>        hash, tar_file.gz, node_linux_x64/
> ```
>
> Bug: b/324418194
> Change-Id: Ibcbbff27e211f194ddb8a08494af56570a84a12b
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5299722
> Commit-Queue: Stephanie Kim <kimstephanie@google.com>
> Reviewed-by: Joanna Wang <jojwang@chromium.org>

Bug: b/324418194
Change-Id: Ie64265a86abcec0135408715a45c32a8bb7c7408
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5346338
Reviewed-by: Joanna Wang <jojwang@chromium.org>
Commit-Queue: Stephanie Kim <kimstephanie@google.com>
12 months ago
Stephanie Kim 93d5662c1d Revert "Reland "Add support for GCS deps""
This reverts commit d94a03f21e.

Reason for revert: PLATFORM_MAPPING import issue

Original change's description:
> Reland "Add support for GCS deps"
>
> This is a reland of commit 3eedee7b55
>
> Original change's description:
> > Add support for GCS deps
> >
> > Also take out GCS calling logic from download_google_storage and
> > into call_google_storage.
> >
> > GCS deps look like:
> >    'src/third_party/node/linux': {
> >        'dep_type': 'gcs',
> >        'condition': 'checkout_linux',
> >        'bucket': 'chromium-nodejs/20.11.0',
> >        'object_name': '46795170ff5df9831955f163f6966abde581c8af',
> >        'sha256sum': '887504c37404898ca41b896f448ee6d7fc24179d8fb6a4b79d028ab7e1b7153d',
> >    },
> >
> >    'src/third_party/llvm-build/Release+Asserts': {
> >        'dep_type': 'gcs',
> >        'condition': 'checkout_linux',
> >        'bucket': 'chromium-browser-clang',
> >        'object_name': 'Linux_x64/clang-llvmorg-18-init-17730-gf670112a-2.tar.xz',
> >        'sha256sum': '1e46df9b4e63c074064d75646310cb76be2f19815997a8486987189d80f991e8',
> >    },
> >
> > Example directory for src/third_party/node/linux after gclient sync:
> > - tar_file.gz is the downloaded file from GCS.
> > - node_linux_x64/ is extracted in its path.
> > - `hash` contains the sha of GCS filename.
> > ```
> > chromium/src/ ->
> >    third_party/node/linux/ ->
> >        hash, tar_file.gz, node_linux_x64/
> > ```
> >
> > Bug: b/324418194
> > Change-Id: Ibcbbff27e211f194ddb8a08494af56570a84a12b
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5299722
> > Commit-Queue: Stephanie Kim <kimstephanie@google.com>
> > Reviewed-by: Joanna Wang <jojwang@chromium.org>
>
> Bug: b/324418194
> Change-Id: I8b960f6dd3534658a9ee0b7688e68eaa15df1444
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5334791
> Commit-Queue: Stephanie Kim <kimstephanie@google.com>
> Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
> Reviewed-by: Joanna Wang <jojwang@chromium.org>

Bug: b/324418194
Change-Id: I28bc0ba838a1135ff882cd88b77dbb2cb4b85b82
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5345022
Reviewed-by: Joanna Wang <jojwang@chromium.org>
Commit-Queue: Stephanie Kim <kimstephanie@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
1 year ago
Stephanie Kim d94a03f21e Reland "Add support for GCS deps"
This is a reland of commit 3eedee7b55

Original change's description:
> Add support for GCS deps
>
> Also take out GCS calling logic from download_google_storage and
> into call_google_storage.
>
> GCS deps look like:
>    'src/third_party/node/linux': {
>        'dep_type': 'gcs',
>        'condition': 'checkout_linux',
>        'bucket': 'chromium-nodejs/20.11.0',
>        'object_name': '46795170ff5df9831955f163f6966abde581c8af',
>        'sha256sum': '887504c37404898ca41b896f448ee6d7fc24179d8fb6a4b79d028ab7e1b7153d',
>    },
>
>    'src/third_party/llvm-build/Release+Asserts': {
>        'dep_type': 'gcs',
>        'condition': 'checkout_linux',
>        'bucket': 'chromium-browser-clang',
>        'object_name': 'Linux_x64/clang-llvmorg-18-init-17730-gf670112a-2.tar.xz',
>        'sha256sum': '1e46df9b4e63c074064d75646310cb76be2f19815997a8486987189d80f991e8',
>    },
>
> Example directory for src/third_party/node/linux after gclient sync:
> - tar_file.gz is the downloaded file from GCS.
> - node_linux_x64/ is extracted in its path.
> - `hash` contains the sha of GCS filename.
> ```
> chromium/src/ ->
>    third_party/node/linux/ ->
>        hash, tar_file.gz, node_linux_x64/
> ```
>
> Bug: b/324418194
> Change-Id: Ibcbbff27e211f194ddb8a08494af56570a84a12b
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5299722
> Commit-Queue: Stephanie Kim <kimstephanie@google.com>
> Reviewed-by: Joanna Wang <jojwang@chromium.org>

Bug: b/324418194
Change-Id: I8b960f6dd3534658a9ee0b7688e68eaa15df1444
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5334791
Commit-Queue: Stephanie Kim <kimstephanie@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Joanna Wang <jojwang@chromium.org>
1 year ago
Stephanie Kim 064e03aa1c Revert "Add support for GCS deps"
This reverts commit 3eedee7b55.

Reason for revert: https://buganizer.corp.google.com/issues/324418194#comment7

Original change's description:
> Add support for GCS deps
>
> Also take out GCS calling logic from download_google_storage and
> into call_google_storage.
>
> GCS deps look like:
>    'src/third_party/node/linux': {
>        'dep_type': 'gcs',
>        'condition': 'checkout_linux',
>        'bucket': 'chromium-nodejs/20.11.0',
>        'object_name': '46795170ff5df9831955f163f6966abde581c8af',
>        'sha256sum': '887504c37404898ca41b896f448ee6d7fc24179d8fb6a4b79d028ab7e1b7153d',
>    },
>
>    'src/third_party/llvm-build/Release+Asserts': {
>        'dep_type': 'gcs',
>        'condition': 'checkout_linux',
>        'bucket': 'chromium-browser-clang',
>        'object_name': 'Linux_x64/clang-llvmorg-18-init-17730-gf670112a-2.tar.xz',
>        'sha256sum': '1e46df9b4e63c074064d75646310cb76be2f19815997a8486987189d80f991e8',
>    },
>
> Example directory for src/third_party/node/linux after gclient sync:
> - tar_file.gz is the downloaded file from GCS.
> - node_linux_x64/ is extracted in its path.
> - `hash` contains the sha of GCS filename.
> ```
> chromium/src/ ->
>    third_party/node/linux/ ->
>        hash, tar_file.gz, node_linux_x64/
> ```
>
> Bug: b/324418194
> Change-Id: Ibcbbff27e211f194ddb8a08494af56570a84a12b
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5299722
> Commit-Queue: Stephanie Kim <kimstephanie@google.com>
> Reviewed-by: Joanna Wang <jojwang@chromium.org>

Bug: b/324418194
Change-Id: Ie74df90065c1fea087b240d98005b9d9b4f44411
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5336079
Commit-Queue: Stephanie Kim <kimstephanie@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
1 year ago
Stephanie Kim 3eedee7b55 Add support for GCS deps
Also take out GCS calling logic from download_google_storage and
into call_google_storage.

GCS deps look like:
   'src/third_party/node/linux': {
       'dep_type': 'gcs',
       'condition': 'checkout_linux',
       'bucket': 'chromium-nodejs/20.11.0',
       'object_name': '46795170ff5df9831955f163f6966abde581c8af',
       'sha256sum': '887504c37404898ca41b896f448ee6d7fc24179d8fb6a4b79d028ab7e1b7153d',
   },

   'src/third_party/llvm-build/Release+Asserts': {
       'dep_type': 'gcs',
       'condition': 'checkout_linux',
       'bucket': 'chromium-browser-clang',
       'object_name': 'Linux_x64/clang-llvmorg-18-init-17730-gf670112a-2.tar.xz',
       'sha256sum': '1e46df9b4e63c074064d75646310cb76be2f19815997a8486987189d80f991e8',
   },

Example directory for src/third_party/node/linux after gclient sync:
- tar_file.gz is the downloaded file from GCS.
- node_linux_x64/ is extracted in its path.
- `hash` contains the sha of GCS filename.
```
chromium/src/ ->
   third_party/node/linux/ ->
       hash, tar_file.gz, node_linux_x64/
```

Bug: b/324418194
Change-Id: Ibcbbff27e211f194ddb8a08494af56570a84a12b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5299722
Commit-Queue: Stephanie Kim <kimstephanie@google.com>
Reviewed-by: Joanna Wang <jojwang@chromium.org>
1 year ago
Gavin Mak edba22d4eb Fix multiline comment formatting
Many incorrectly formatted comments exist from the switch to
4 space indent: https://crrev.com/c/4836379

Bug: 1514505
Change-Id: I6366f9da812919bd35b999f18fa8a49b7a66c09b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5153633
Commit-Queue: Gavin Mak <gavinmak@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
1 year ago
Gavin Mak 7f5b53ff8d Remove last py2 workarounds
python3 is the only supported version of python in depot_tools.

Changes include:
  * updating python version requirements
  * removing third_party/six

Bug: 1475402
Change-Id: Ib86231413fcac494ceb27d1783e53b9d86533c26
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4845292
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Gavin Mak <gavinmak@google.com>
2 years ago
Mike Frysinger 124bb8e53c switch to 4 space indent
Leave the recipes/ code at 2 space to match the rest of the recipes
project in other repos.

Reformatted using:
files=( $(
	git ls-tree -r --name-only HEAD | \
		grep -Ev -e '^(third_party|recipes)/' | \
		grep '\.py$';
	git grep -l '#!/usr/bin/env.*python' | grep -v '\.py$'
) )
parallel ./yapf -i -- "${files[@]}"
~/chromiumos/chromite/contrib/reflow_overlong_comments "${files[@]}"

The files that still had strings that were too long were manually
reformatted because they were easy and only a few issues.
autoninja.py
clang_format.py
download_from_google_storage.py
fix_encoding.py
gclient_utils.py
git_cache.py
git_common.py
git_map_branches.py
git_reparent_branch.py
gn.py
my_activity.py
owners_finder.py
presubmit_canned_checks.py
reclient_helper.py
reclientreport.py
roll_dep.py
rustfmt.py
siso.py
split_cl.py
subcommand.py
subprocess2.py
swift_format.py
upload_to_google_storage.py

These files still had lines (strings) that were too long, so the pylint
warnings were suppressed with a TODO.
auth.py
gclient.py
gclient_eval.py
gclient_paths.py
gclient_scm.py
gerrit_util.py
git_cl.py
presubmit_canned_checks.py
presubmit_support.py
scm.py

Change-Id: Ia6535c4f2c48d46b589ec1e791dde6c6b2ea858f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4836379
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
Auto-Submit: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
2 years ago
Gavin Mak 65c49b18b9 Drop py2 support in gclient and related files
python3 is the only supported version of python in depot_tools.

Bug: 1475402
Change-Id: I17174d7252b5cbf698700333d3cd561c6591d0a1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4809190
Reviewed-by: Aravind Vasudevan <aravindvasudev@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
2 years ago
Aravind Vasudevan b6eaed26fc Add git_dependencies flag to DEPS
This change adds `git_dependencies` flag to the DEPS. This will be used to track the submodule migration state.

Design Doc: go/depot-tools-on-submodules
Change-Id: I547ad8ebbce2535960d4b6e00c0b14c00118f544
Bug: 1429149
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4591777
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
2 years ago
Bruce Dawson 03af44a516 Fix roll-dep commit message on Windows and add suggestions
roll-dep would confidently print "Commit message:" but then on Windows
would only actually give the first line of the message to git. This is
because multi-line command-lines don't actually work on all shells. This
change passes the commit message using a temporary file so that the full
message is retained on all operating systems.

This change also teaches roll-dep to give suggestions when a specified
dependency is not quite correct. This is particularly helpful if a
leading or trailing directory name is used. For instance, this command
seems plausible:

  roll-dep third_party/openh264

But in fact it is wrong and a new user has to realize that a src prefix
is needed (in general) and in this specific case a src suffix is needed
as well. Prior to this change the error message would be:

    KeyError: 'Could not find any dependency called third_party/openh264.'

But after this message it will instead say:

    KeyError: 'Could not find any dependency called third_party/openh264. Did you mean src/third_party/openh264/src'

Past me wishes I'd done this years ago.

Change-Id: I6e0d6c703906b1c1ec947788fa259bae7b7520cf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4120534
Reviewed-by: Joanna Wang <jojwang@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
2 years ago
Yuki Shiino a042264949 Allow 'noparent' in DEPS
In case of PartitionAlloc project in Chromium, there is a case that
it's useful to declare 'noparent' in the DEPS due to the situation
that a sub directory is exported to a standalone git project.

//base/allocator/partition_allocator/ (sub directory) is exported to
https://chromium.googlesource.com/chromium/src/base/allocator/partition_allocator.git

Change-Id: Ic51b6cd3928002962f25620b4d8797bed7802d1e
Bug: chromium:1151236
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3802719
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Yuki Shiino <yukishiino@chromium.org>
Reviewed-by: Joanna Wang <jojwang@chromium.org>
3 years ago
Aravind Vasudevan c5f0cbb865 Use pylint 2.7 for depot_tools
This includes a few fixes for specific errors, and disables several new
warnings introduced in this version, in order to allow for an incremental migration.

Bug:1262286
Change-Id: I4b8f8fc521386419a3121bbb07edc8ac83170a94
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3413679
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
3 years ago
Josip Sokcevic 42c5bbbc96 Revert "Use pylint 2.7 for depot_tools"
This reverts commit 22bf605bb6.

Reason for revert: breaks gclient sync

Original change's description:
> Use pylint 2.7 for depot_tools
>
> This includes a few fixes for specific errors, and disables several new
> warnings introduced in this version, in order to allow for an incremental migration.
>
> Bug:1262286
> Change-Id: Ie97d686748c9c952e87718a65f401c5f6f80a5c9
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3400616
> Reviewed-by: Gavin Mak <gavinmak@google.com>
> Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>

Bug: 1262286
Change-Id: Ieb946073c7886c7bf056ce843a5a48e82becf7a5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3413672
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
3 years ago
Aravind Vasudevan 22bf605bb6 Use pylint 2.7 for depot_tools
This includes a few fixes for specific errors, and disables several new
warnings introduced in this version, in order to allow for an incremental migration.

Bug:1262286
Change-Id: Ie97d686748c9c952e87718a65f401c5f6f80a5c9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3400616
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
3 years ago
Michael Spang 0e99b9be0a Revert "Remove use_relative_hooks now that all deprecated uses are removed."
This reverts commit 4de6cfa5a9.

Reason for revert: Breaks syncing old versions.

Original change's description:
> Remove use_relative_hooks now that all deprecated uses are removed.
> 
> Bug: chromium:1107325
> Change-Id: Iac1ff8ef9426c8f57b6e12783de0ffbb0625ef2b
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2349170
> Reviewed-by: Josip Sokcevic <sokcevic@google.com>
> Commit-Queue: Corentin Wallez <cwallez@chromium.org>

TBR=cwallez@chromium.org,ehmaldonado@chromium.org,infra-scoped@luci-project-accounts.iam.gserviceaccount.com,sokcevic@google.com

Change-Id: I91229c64486fe328341d1951a0b8d4dc33ee8810
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:1107325
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2352090
Auto-Submit: Michael Spang <spang@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
5 years ago
Corentin Wallez 4de6cfa5a9 Remove use_relative_hooks now that all deprecated uses are removed.
Bug: chromium:1107325
Change-Id: Iac1ff8ef9426c8f57b6e12783de0ffbb0625ef2b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2349170
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
5 years ago
Dirk Pranke fdd2cd6e5f Reland "Add a Str() function to gclient for use in DEPS files."
This relands c7eed83 with a fix to the way variables are
propagated from parent dependencies into child dependencies.

The original CL description from c7eed83 was:
> gclient's existing functionality for handling variables is
> ambiguous: the value of a variable can either be a string literal
> or an expression fragment. The implementation is required to
> parse a value as an expression, and, if it is legal, treat it
> as an expression instead of a literal. This means that
>
>   gclient_gn_args_file = 'src/build/args.gni'
>   gclient_gn_args = ['xcode_version']
>   vars = {
>     'xcode_version': 'xcode-12'
>   }
>
> would cause a problem because gclient would try to parse the
> variable as an expression, and 'xcode' would not be defined.
>
> This patch adds a workaround for this, where you can instead
> use the Str() function to explicitly tell gclient to treat the
> value as a string and not a potential expression.
>
> The above example would be changed to:
>
>   gclient_gn_args_file = 'src/build/args.gni'
>   gclient_gn_args = ['xcode_version']
>   vars = {
>     'xcode_version': Str('xcode-12')
>   }
>
> The variable may still be used in every context where it was legal
> to be used before.
>
This reverts commit 84431987dd384c79c84515004d19db67345a1c00.

Bug: 1099242
TBR=ehmaldonado@chromium.org

Change-Id: I047b871df47c367c1f34a3985e5813504e3c5c6f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2274152
Commit-Queue: Dirk Pranke <dpranke@google.com>
Reviewed-by: Ben Pastene <bpastene@chromium.org>
5 years ago
Dirk Pranke ac93e6d567 Revert "Add a Str() function to gclient for use in DEPS files."
This reverts commit c7eed83f96.

Reason for revert: I'm getting reports of internal iOS checkouts being broken. Reverting while I reproduce / debug it.

Original change's description:
> Add a Str() function to gclient for use in DEPS files.
> 
> gclient's existing functionality for handling variables is
> ambiguous: the value of a variable can either be a string literal
> or an expression fragment. The implementation is required to
> parse a value as an expression, and, if it is legal, treat it
> as an expression instead of a literal. This means that
> 
>   gclient_gn_args_file = 'src/build/args.gni'
>   gclient_gn_args = ['xcode_version']
>   vars = {
>     'xcode_version': 'xcode-12'
>   }
> 
> would cause a problem because gclient would try to parse the
> variable as an expression, and 'xcode' would not be defined.
> 
> This patch adds a workaround for this, where you can instead
> use the Str() function to explicitly tell gclient to treat the
> value as a string and not a potential expression.
> 
> The above example would be changed to:
> 
>   gclient_gn_args_file = 'src/build/args.gni'
>   gclient_gn_args = ['xcode_version']
>   vars = {
>     'xcode_version': Str('xcode-12')
>   }
> 
> The variable may still be used in every context where it was legal
> to be used before.
> 
> Bug: 1099242
> 
> Change-Id: Ic2a17eea5f7098113bdba0557fe29e1a931a74b8
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2268406
> Reviewed-by: Ben Pastene <bpastene@chromium.org>
> Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
> Commit-Queue: Dirk Pranke <dpranke@google.com>

TBR=thakis@chromium.org,dpranke@google.com,ehmaldonado@chromium.org,bpastene@chromium.org,apolito@google.com,infra-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: Iac2b003f32acdbca15a19f821b61423e34b3466c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1099242
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2273978
Reviewed-by: Dirk Pranke <dpranke@google.com>
Commit-Queue: Dirk Pranke <dpranke@google.com>
5 years ago
Dirk Pranke c7eed83f96 Add a Str() function to gclient for use in DEPS files.
gclient's existing functionality for handling variables is
ambiguous: the value of a variable can either be a string literal
or an expression fragment. The implementation is required to
parse a value as an expression, and, if it is legal, treat it
as an expression instead of a literal. This means that

  gclient_gn_args_file = 'src/build/args.gni'
  gclient_gn_args = ['xcode_version']
  vars = {
    'xcode_version': 'xcode-12'
  }

would cause a problem because gclient would try to parse the
variable as an expression, and 'xcode' would not be defined.

This patch adds a workaround for this, where you can instead
use the Str() function to explicitly tell gclient to treat the
value as a string and not a potential expression.

The above example would be changed to:

  gclient_gn_args_file = 'src/build/args.gni'
  gclient_gn_args = ['xcode_version']
  vars = {
    'xcode_version': Str('xcode-12')
  }

The variable may still be used in every context where it was legal
to be used before.

Bug: 1099242

Change-Id: Ic2a17eea5f7098113bdba0557fe29e1a931a74b8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2268406
Reviewed-by: Ben Pastene <bpastene@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@google.com>
5 years ago
Ayu Ishii 0985861970 CodeInclusion: Rename whitelist/blacklist -> allowlist/blocklist
Migrate to more inclusive terminology.

Bug: 1097674
Change-Id: I387b385ff36c7766682c06af34ed5fc6115119d1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2268403
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Ayu Ishii <ayui@chromium.org>
5 years ago
Quinten Yearsley 925cedba7b Run spellchecker on depot_tools
This was made by running `codespell` and `scspell`
and then checking the results.

Change-Id: I169fd5b40294f83015075b4a899fbca263821f25
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2144602
Commit-Queue: Quinten Yearsley <qyearsley@chromium.org>
Auto-Submit: Quinten Yearsley <qyearsley@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Josip Sokcevic b3e593c1ba Escape AST string before writing to tokens
This patch enables more unit tests on Windows.

R=ehmaldonado@chromium.org

Change-Id: I8667777fc6eef11568aa2aead9850f7e37757e58
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2123808
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
5 years ago
Edward Lemur 3c11794956 gclient_eval: Raise an error on implicitly concatenated strings.
Implicitly concatenated strings are not supported when setting new
revisions, so raise an error when attempting to do se.

Bug: 1060772
Change-Id: I74d39b9eb8dcc420e9b7787c90bee642beb783cc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2099407
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Edward Lemur c00ac8de89 gclient: Don't allow duplicate entries on deps
Bug: 809671
Change-Id: I74103304651417e6b6889cb713fe494c95279d69
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2088422
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Edward Lemur 67cabcd71f gclient: Remove syntax validation flags.
Change-Id: I7215335eb4592cba80d31595b3bac75f55372dee
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2083589
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Raul Tambre 6693d0929f gclient_eval, gclient_utils: Fix Python 3.9 removal of collections members
Various collections module members were removed in Python 3.9 after being deprecated and moved to collections.abc in earlier Python 3 versions.
For accessing these members alias collections_abc as:
* collections.abc on Python 3
* collections on Python 2

Traceback (most recent call last):
  File "C:\Google\depot_tools\gclient.py", line 107, in <module>
    import gclient_eval
  File "C:\Google\depot_tools\gclient_eval.py", line 11, in <module>
    import gclient_utils
  File "C:\Google\depot_tools\gclient_utils.py", line 1201, in <module>
    class FrozenDict(collections.Mapping):
AttributeError: module 'collections' has no attribute 'Mapping'

Traceback (most recent call last):
  File "C:\Google\depot_tools\gclient.py", line 107, in <module>
    import gclient_eval
  File "C:\Google\depot_tools\gclient_eval.py", line 25, in <module>
    class _NodeDict(collections.MutableMapping):
AttributeError: module 'collections' has no attribute 'MutableMapping'

Bug: 984182
Change-Id: I7a4417978b93e29397e63764e4570a598c075bc0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2043879
Auto-Submit: Raul Tambre <raul@tambre.ee>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Marc-Antoine Ruel 8e57b4bc55 python3 improvements
Ran:
  vi $(git grep --name-only iteritems | grep -v third_party)
  vi $(git grep --name-only itervalues | grep -v third_party)
  vi $(git grep --name-only 'print ' | grep -v third_party)

and edited the files quickly with adhoc macros. Then ran in recipes/:
  ./recipes.py test train

There was only a small subset of files that had been updated to use
six.iteritems() and six.itervalues(). Since the dataset size that is
being used in gclient is small (pretty much always below 200 items),
it's better to just switch to .items() right away and take the temporary
performance hit, so that we don't need to come back to rewrite the code.

Recipe-Nontrivial-Roll: build
Bug: 984182
Change-Id: I5faf11486b66b0d73c9098ab0f2ce1b15a45c53e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1854900
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Auto-Submit: Marc-Antoine Ruel <maruel@chromium.org>
5 years ago
Anthony Polito 2ae039a065 Add support for multi argument ands and ors, and the same precedence with
left to right grouping

Bug: 905740
Change-Id: I6a0b971556ab66bec841004fbbe8760b9136f216
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1793775
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Anthony Polito <apolito@google.com>
6 years ago
Edward Lemur bfcde3c5b8 gclient_eval: Make compatible with Python 3.
A new-line token is being added on Python 3, so add it explicitly
so that it also appears on Python 2.

Bug: 984182
Change-Id: I3bfb6ca83d94b6a3452b938f35f5a3174fe85903
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1764465
Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
6 years ago
James Darpinian f994d87e56 Revert "Reland "depot_tools: Move six to depot_tools' .vpython""
This reverts commit d52b306f84.

Reason for revert: Broke ANGLE CQ with "ImportError: No module named six"
Example: https://ci.chromium.org/p/angle/builders/try/mac-dbg/6758

Original change's description:
> Reland "depot_tools: Move six to depot_tools' .vpython"
> 
> This is a reland of 3a98df0bdd
> 
> Original change's description:
> > depot_tools: Move six to depot_tools' .vpython
> > 
> > Bug: 984182
> > Change-Id: I34a242c8607624beb0f06a27c563e413dec99790
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1717492
> > Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
> > Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
> > Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
> > Reviewed-by: Michael Moss <mmoss@chromium.org>
> 
> Bug: 984182
> Change-Id: Ibf7034201e65a18f833cf1e7432f81a903a99aae
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1732880
> Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>

TBR=iannucci@chromium.org,mmoss@chromium.org,tandrii@chromium.org,ehmaldonado@chromium.org

Change-Id: Id4488249b607441df9f00aa51f4a1f2bc4ad5cfd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 984182
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1739582
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
6 years ago
Edward Lemur d52b306f84 Reland "depot_tools: Move six to depot_tools' .vpython"
This is a reland of 3a98df0bdd

Original change's description:
> depot_tools: Move six to depot_tools' .vpython
> 
> Bug: 984182
> Change-Id: I34a242c8607624beb0f06a27c563e413dec99790
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1717492
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
> Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
> Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
> Reviewed-by: Michael Moss <mmoss@chromium.org>

Bug: 984182
Change-Id: Ibf7034201e65a18f833cf1e7432f81a903a99aae
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1732880
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
6 years ago
Edward Lemur ba1b1f7ab6 gclient_eval: Make compatible with Python 3.
Bug: 984182
Change-Id: I9485614658efa0ea9d50ea666210af63c3b97adc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1716131
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
6 years ago
Ben Pastene a541b28d4e Add 'X in tuple()' support to gclient conditionals.
This is purely so I can land:
https://chromium-review.googlesource.com/c/chromium/src/+/1625812
instead of:
https://chromium-review.googlesource.com/c/chromium/src/+/1625813

That is, the former is a slightly cleaner version of the latter. However,
it doesn't work w/o this patch.

Bug: 947531
Change-Id: If8e7f8080ba5f40408680b598fed511df89be8bb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1626479
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Ben Pastene <bpastene@chromium.org>
6 years ago
Aaron Gable ac9b0f3786 Restore py2/py3 compatibility with basestring
A previous CL replaced "basestring" with "str", because basestring
does not exist in Python 3. However, this broke Python 2's ability
to interoperate with unicode strings. This CL introduces a workaround
(defining basestring to be equivalent to string, if it doesn't exist
already), and restores the references to basestring. This workaround
can be fixed when we're 100% on Python 3.

It also undoes some unnecessary and harder-to-read formatting changes.

Bug: 942522
Change-Id: I4a31ee46dc048134c2e4832b6c44ea00ce341899
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1572441
Commit-Queue: Aaron Gable <agable@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
6 years ago
Raul Tambre b946b2389c Improve gclient Python 3 compatibility
This enables gclient sync and gclient runhooks to run, barring hook script failures.
git cl upload also now works.

The scripts still work with Python 2.
There are no intended behaviour changes.

Bug: 942522
Change-Id: I2ac587b5f803ba7f5bb5e412337ce049f4b1a741
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1524583
Commit-Queue: Raul Tambre <raul@tambre.ee>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
6 years ago
Edward Lemur fb8c1a203d gclient eval: Replace monorail with crbug.com in error message.
Tbr: tandrii@chromium.org
Bug: 914712
Change-Id: Iff8aecff346692ef36fd653f226b48270fefa304
Reviewed-on: https://chromium-review.googlesource.com/c/1380972
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
6 years ago
Edward Lemur a1e4d48a10 setdep: Add support for variables when setting CIPD vars.
Bug: 914712
Change-Id: I13db57af519bb254389bc6bd1f1f81ad1d497e42
Reviewed-on: https://chromium-review.googlesource.com/c/1377295
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
6 years ago