roll-dep.py helpfully trims both trailing '/' and trailing '\'
characters, however it then fails if there are any '\' characters
embedded in the path. We can make this script friendlier for Windows
users by replacing '\' with '/'.
This was manually tested with a deps-roll of src\native_client.
Change-Id: I8fbd3395364612c85db39b234ee7dcbda705d0b7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2260997
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
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>
The CL https://crrev.com/c/chromium/tools/depot_tools/+/2031104 used
the full hash when calling "git log" to fix the roll on some bot. It
however resulted in the full hash visible in the commit message.
Fix the command included in the commit message while still using the
full hash in the command invoked.
Bug: none
Change-Id: I454e600fc34e554c1186ae9488ea4b0f7e7df310
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2031105
Auto-Submit: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Some bots run roll-dep.py and fail while generating the commit message
with the following error:
src/ios/third_party/material_components_ios/src: Rolling from 54fd1dac39 to 5aaf54801f
fatal: ambiguous argument '54fd1dac3..5aaf54801': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
As "Rolling from 54fd1dac39 to 5aaf54801f" is printed, this mean that
the bot was able to resolve both HEAD and roll_to before invoking this
function, thus the corresponding hashes exists in the repository.
It is unlikely that shortening the hash to just the first nine chars
results in a collision, but there is no reason to use a short hash
when invoking git anyway, so use a separate variable to construct the
header of the commit with short hashes while invoking git with the
full hashes.
Also pass '--' after all the parameters to force git to interpret the
hash range as a range and not as a path.
This is a speculative fix.
Change-Id: Iaa2888610dcf8e20f9edc115a719791d573b83ac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2031104
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
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>
I know that sometimes imports can have side-effects,
so unused imports shouldn't always be removed, but these
ones look like they could be.
Change-Id: Iea9f82afa99b0ea35f29a28f20ce0493b579cfee
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1819860
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Quinten Yearsley <qyearsley@chromium.org>
Ran "2to3 -w -n -f print ./" and manually added imports.
Ran "^\s*print " and "\s+print " to find batch/shell scripts, comments and the like with embedded code, and updated them manually.
Also manually added imports to files, which used print as a function, but were missing the import.
The scripts still work with Python 2.
There are no intended behaviour changes.
Bug: 942522
Change-Id: Id777e4d4df4adcdfdab1b18bde89f235ef491b9f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1595684
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@chromium.org>
Auto-Submit: Raul Tambre <raul@tambre.ee>
- It uses a different commit subject than recipe roller.
- Switch from looking up for magic strings to use a regexp instead. Document the
source of each string, to help keep up when the source diverge.
Tested manually.
Change-Id: I76fc6b6692508c615a0e76c4b6b403f8c513dd31
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1564938
Commit-Queue: Marc-Antoine Ruel <maruel@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Trimming at the bottom looses an important datapoint: which is the
oldest commit. To fix this problem, use Middle Out Compression™️ to
creates a better DEPS roll CL description.
Change-Id: I290073d25989b6880a4b608cd2b8f26a300cc3a1
Reviewed-on: https://chromium-review.googlesource.com/c/1415430
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Auto-Submit: Marc-Antoine Ruel <maruel@chromium.org>
Use gclient setdep/getdep instead of evaluating the contents of the
DEPS file, so we don't have to deal with builtin_variables.
Bug: 906114
Change-Id: I2082d4a3feb84d15c251b7d99056fd4c6f925453
Reviewed-on: https://chromium-review.googlesource.com/c/1347450
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
This is the more modern syntax and everything should already work with
it.
R=tandrii@chromium.org
Change-Id: I7acbe6cc7c663e03e9a72c2b6c155a7982477146
Reviewed-on: https://chromium-review.googlesource.com/c/1289233
Auto-Submit: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
This is a reland of ff62224443
should_process was set to None in the previous attempt, so CIPD dependencies were not processed.
This CL fixed that.
Original change's description:
> Reland "Expand variables in gclient flattened output."
>
> This is a reland of a32f98e652
>
> Original change's description:
> > Expand variables in gclient flattened output.
> >
> > Bug: 848990
> > Change-Id: I0ad7e4f965973edbc5a335bd30f9cbd7b04abff2
> > Reviewed-on: https://chromium-review.googlesource.com/1085996
> > Reviewed-by: Michael Moss <mmoss@chromium.org>
> > Reviewed-by: Aaron Gable <agable@chromium.org>
> > Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
>
> Tbr: agable@chromium.org
> Bug: 848990
> Change-Id: I7843544b79b2ab7e2046c187d13ea3eb65fc1b7d
> Reviewed-on: https://chromium-review.googlesource.com/1085975
> Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
> Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Bug: 848990
Change-Id: Ic804be1b84bf8402a741a4189b60372075dfb6f3
Reviewed-on: https://chromium-review.googlesource.com/1087368
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
gclient calls into update_depot_tools, where gclient.py does not.
Change-Id: Idabf0fd613ee241460fbeb6b897a79b084bbc4e2
Reviewed-on: https://chromium-review.googlesource.com/1000786
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Eric Boren <borenet@chromium.org>
In some cases, gclient root is not the parent directory, it might be two
levels above.
This fixes it by asking gclient for the real root directory.
Bug: 760633
Change-Id: I82d754f1c53259a111a74628f784d1bc461c18ef
Reviewed-on: https://chromium-review.googlesource.com/999971
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Change-Id: I7580c3b890d0c5a9e926e1354bd9e0a44ac20f31
Reviewed-on: https://chromium-review.googlesource.com/997972
Reviewed-by: Aaron Gable <agable@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Eric Boren <borenet@chromium.org>
Adds support for when the URL of the dependency is inside a dictionary.
R=agable@chromium.org
Bug: 760633
Change-Id: Idfdff0bdf27f0e3031f0cd17de2864da54ce65ac
Reviewed-on: https://chromium-review.googlesource.com/994416
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Now we no longer care what revision was actually checked out in disk.
R=agable@chromium.org
Bug: 760633
Change-Id: If18081808a8b8be2d4be8dd8dcca9e084ee2b7ef
Reviewed-on: https://chromium-review.googlesource.com/990784
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
Currently the BUG= line is being concatenated at the end, preventing
Bugdroid from picking it up and bugs from being updated.
BUG=797444
Change-Id: I7242db76a9552658d94fda10ec564b230f4f0037
Reviewed-on: https://chromium-review.googlesource.com/843014
Commit-Queue: Marc-Antoine Ruel <maruel@chromium.org>
Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>
The way it is done is by switching to a multiple phases model:
- Gather data
- Calculate actions
- Execute
Rolling multiple dependencies simultaneously is occasionally needed.
This will permit to supersede roll-deps.py in infra.git.
R=agable@chromium.org
Bug:
Change-Id: Ibdc7883268b2b08c8a0db1637a9601ffce943c48
Reviewed-on: https://chromium-review.googlesource.com/817616
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Marc-Antoine Ruel <maruel@chromium.org>
This is hampering Skia's ability to easily diagnose failures introduced
by ANGLE rolls.
Bug:skia:6998
Change-Id: I646200b691be0a07051e9ae1f7feaf2cd1c0671a
Reviewed-on: https://chromium-review.googlesource.com/638070
Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>
Commit-Queue: Eric Boren <borenet@chromium.org>
Otherwise it can make the log overwhelming when the number of rolls is higher
than the number of meaningful commits.
R=iannucci@chromium.org
BUG=620765
Change-Id: Iec0b41304d50091498d43abc4883e522b8cc9a2c
Reviewed-on: https://chromium-review.googlesource.com/448676
Commit-Queue: Marc-Antoine Ruel <maruel@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
If you specify a directory incorrectly to roll_dep then it may not be
obvious why it cannot be found. For instance, "roll-dep tools\gyp" vs.
"roll-dep src\tools\gyp". This change prints the full directory.
This change also clarifies what is meant by a clean tree to make that
error message easier to understand.
R=maruel@chromium.org
Review URL: https://codereview.chromium.org/1507623003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@297875 0039d316-1c4b-4281-b951-d872f2087c98
Otherwise it makes CL description like foo/bar// which is ugly.
R=vadimsh@chromium.org
BUG=
Review URL: https://codereview.chromium.org/1468183002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@297670 0039d316-1c4b-4281-b951-d872f2087c98
BUG=554638
TBR=maruel
TESTED=locally verified that two deps can be rolled
Review URL: https://codereview.chromium.org/1445833003 .
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@297553 0039d316-1c4b-4281-b951-d872f2087c98
- Create logs URL for both gitiles and github.
- Include the number of commits being rolled in in the commit subject, which is
always useful.
- Make the log inclusion conditional on the repository being rolled in and the
number of commits.
- Checkout the new commit when using this script, otherwise this is surprising
to users.
- Add flags to support more use cases.
- Use --quiet when calling git to reduce noise in the output.
R=spang@chromium.org,jochen@chromium.org
BUG=
Review URL: https://codereview.chromium.org/1366493003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296924 0039d316-1c4b-4281-b951-d872f2087c98
Reason for revert:
Blink merge is done, blink people won't have to use it anymore.
Original issue's description:
> roll_dep: Avoid large commit messages by providing the log as a link
>
> The majority of chromium projects are on googlesource.com, which can
> display a range of commits on the web. Use this feature instead of
> dumping logs into the commit message.
>
> Particularly, this avoids creating large commit messages as these logs
> sometimes contain upwards of 50 commits.
>
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=296184
TBR=jochen@chromium.org,spang@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/1364763002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296840 0039d316-1c4b-4281-b951-d872f2087c98
The majority of chromium projects are on googlesource.com, which can
display a range of commits on the web. Use this feature instead of
dumping logs into the commit message.
Particularly, this avoids creating large commit messages as these logs
sometimes contain upwards of 50 commits.
Review URL: https://codereview.chromium.org/1257233006
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296184 0039d316-1c4b-4281-b951-d872f2087c98