This reverts commit 80cc67cc00.
Reason for revert: Not +1'd by anyone from owning team.
Original change's description:
> Add --no-squash argument to git rebase-update
>
> --no-squash makes it faster to run rebase-update when there are merge
> conflicts and you know that squashing will not help. For example, I
> store all of my branches in one commit each, so I know that squashing
> isn't even possible because they are already squashed.
>
> Change-Id: I2679a855ad79d602a6d1ee09c140f2fd27ae20c5
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2904096
> Reviewed-by: Dirk Pranke <dpranke@google.com>
> Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
> Commit-Queue: Joey Arhar <jarhar@chromium.org>
Change-Id: I0b577b053a3e6c7514e28cde4cb7849f50ecd64f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4411905
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Joanna Wang <jojwang@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
--no-squash makes it faster to run rebase-update when there are merge
conflicts and you know that squashing will not help. For example, I
store all of my branches in one commit each, so I know that squashing
isn't even possible because they are already squashed.
Change-Id: I2679a855ad79d602a6d1ee09c140f2fd27ae20c5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2904096
Reviewed-by: Dirk Pranke <dpranke@google.com>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Joey Arhar <jarhar@chromium.org>
This change also updates version of git documentation to match one used in
depot_tools, asciidoc, and ansi2html. It also fixes reset signal.
R=gavinmak@google.com
Bug: 1357152
Change-Id: I998e7434dde8d82b491376b47a5993c6d91d64a8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3856830
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
When using alias, we no longer can't nor need to prefix command with
git. This change updates all [alias] blocks and removes git from it.
Change-Id: Id89142ef86935e04e21872ce61fb63a511ed40a7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3244473
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
Auto-Submit: Josip Sokcevic <sokcevic@google.com>
Relevant change is in make_docs.sh, all other files were generated.
R=iannucci@chromium.org
Changes:
* upgrade to latest asciidoc, ansi2html and git
* disable interactive git editor (happens during rebase)
* minor tweaks
Change-Id: Ie4b19aa12b8a76826f66e3088c985b99e55164c7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3000882
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@google.com>
This change adds documentation and demos missing for the flag
--inject_current used in git new-branch.
Bug: 1167943
Change-Id: Id6305b876ade2c47eb7435a5edd055ae4fe2f323
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2648615
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
Currently, for a given branch, map-branches displays the number of
commits ahead and behind it is. This change replaces ahead with
commits, representing the number of commits a branch has, starting from
its base commit, and more accurately reflects the state of a repo.
Bug:1128716
Change-Id: I7c070b4efd452d82d878e1cfb7c20d1c80f38ec7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2412991
Commit-Queue: Gavin Mak <gavinmak@google.com>
Reviewed-by: Josip Sokcevic <sokcevic@google.com>
"here" is not a nice name for the link, and the footnote generated for
the man page. Replace it by a properly named link.
Note that some of the changes in the generated files are unrelated.
Those files have not been updated since May 2019, and it seems like some
previous changes were not reflected yet.
R=ehmaldonado@chromium.org
Change-Id: I31c784e7eb649bcaa74ba223027fb2c142f52838
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2346371
Reviewed-by: Dirk Pranke <dpranke@google.com>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
For development in V8, and I guess also in Chrome, it is important that
depot_tools are at the beginning of $PATH. This was explicitly mentioned
in the original tutorial. However, it seems like a cleanup CL changed
this recently, see https://crrev.com/c/1593820. This CL changes the
order in $PATH back to the original order.
CC=marja@chromium.org, dmcardle@chromium.orgR=iannucci@chromium.org
Change-Id: Idaed3ada05cddd666734c03a25503fe5dc481e3a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2124657
Auto-Submit: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@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>
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>
Python (prior to 3.8) treats meaningless string escape sequences as if
they were a slash followed by the character. That is, '\w' == '\\w'.
Python 3.8 rejects this, and it's confusing. This change fixes seven of these
regex strings found in depot_tools (through a regex search, natch). Most of
the fixes don't actually change the value of the strings, and this was
manually verified:
>>> '(/c(/.*/\+)?)?/(\d+)(/(\d+)?/?)?$' == r'(/c(/.*/\+)?)?/(\d+)(/(\d+)?/?)?$'
True
>>> '#\s*OWNERS_STATUS\s+=\s+(.+)$' == r'#\s*OWNERS_STATUS\s+=\s+(.+)$'
True
>>> 'COM\d' == r'COM\d'
True
>>> '^\s+Change-Id:\s*(\S+)$' == r'^\s+Change-Id:\s*(\S+)$'
True
>>> 'ETag:\s+([a-z0-9]{32})' == r'ETag:\s+([a-z0-9]{32})'
True
Two exceptions were the regex expressions in filter_demo_output.py and scm.py.
These were turned into raw strings despite this changing the value of the
string passed to re. This works because re supports the \x, \d, \w, \t, and
other escape sequences needed to make this work.
TL;DR - use raw strings for regex to avoid melting your brain. If bulk changing
regex strings to raw watch out for double-slashes.
Bug: 958138
Change-Id: Ic45264cfc63e8bae9cfcffe2cd88a57c2d3dcdae
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1590534
Commit-Queue: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Include verbose output of `git map-branches` to make visible what the
state of the different branches is.
R=iannucci@chromium.org
Change-Id: I4af03ef15b39e4ba84a41c01d1ec801e7bb4bbd6
Reviewed-on: https://chromium-review.googlesource.com/c/1360711
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
This reverts commit ba83229a73.
Reason for revert: After mail discussion we came to the conclusion that the old behavior makes more sense.
Original change's description:
> Fix semantics of git new-branch --upstream
>
> Currently, the "--upstream A" option for new-branch behaves totally
> different than "--upstream_current". While "--upstream A" checks out
> branch A and then creates a new branch which tracks A,
> "--upstream_current" creates a new branch for the current HEAD and sets
> the upstream to the previously checked out branch.
>
> As the documentation does not mention that any of the options changes
> the currently-checked-out commit (HEAD), this CL changes the semantics
> of "git new-branch --upstream A B" to be identical to "git checkout -b B
> && git branch --set-upstream-to A".
>
> It also slightly extends the documentation to mention that in any case
> the new branch is based on HEAD.
>
> R=iannucci@chromium.org
>
> Change-Id: Ic335d2caf27cb6afca1b8bc5a008424c0e880fca
> Reviewed-on: https://chromium-review.googlesource.com/c/1350748
> Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
> Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
> Auto-Submit: Clemens Hammacher <clemensh@chromium.org>
TBR=iannucci@chromium.org,tandrii@chromium.org,clemensh@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: I7463935af172f0801c7da94d2de106a02fc4c42e
Reviewed-on: https://chromium-review.googlesource.com/c/1362972
Reviewed-by: Sergiy Belozorov <sergiyb@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Currently, the "--upstream A" option for new-branch behaves totally
different than "--upstream_current". While "--upstream A" checks out
branch A and then creates a new branch which tracks A,
"--upstream_current" creates a new branch for the current HEAD and sets
the upstream to the previously checked out branch.
As the documentation does not mention that any of the options changes
the currently-checked-out commit (HEAD), this CL changes the semantics
of "git new-branch --upstream A B" to be identical to "git checkout -b B
&& git branch --set-upstream-to A".
It also slightly extends the documentation to mention that in any case
the new branch is based on HEAD.
R=iannucci@chromium.org
Change-Id: Ic335d2caf27cb6afca1b8bc5a008424c0e880fca
Reviewed-on: https://chromium-review.googlesource.com/c/1350748
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Auto-Submit: Clemens Hammacher <clemensh@chromium.org>
89734301bc introduced a new useful feature
to `git upstream-diff`, but unfortunately also regressed the behavior
of the tool when used with additional arguments for `git diff`.
This adds some additional documentation to demonstrate the intended
original feature (and fixes some of the bit-rot in the documentation
pipeline).
R=agable@chromium.org, mattm@chromium.org
Change-Id: I3ae48db3232c1ac84a7edbfe2225a17cda391a1e
Reviewed-on: https://chromium-review.googlesource.com/1107491
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
Adding it to the end caused issues since a cpplint.py version comes
preinstalled on the system at /usr/bin/cpplint.py, that is actually a symlink to
a bash script.
When the presubmit script is run, it uses python to run this bash script, causing it to fail.
Change-Id: Ib12cbdf20265c14e7252f30c268b5b4a9ce32193
Reviewed-on: https://chromium-review.googlesource.com/999595
Commit-Queue: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
The most important git subcommand in depot_tools never had a man
page until today. And now "git help cl" and "git cl --help" will
work.
BUG=695623
Change-Id: Ic0d05fa8d70d2ef6e71d58e0d7d3e7adc4a2fa32
Reviewed-on: https://chromium-review.googlesource.com/447216
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
This affects a bunch of files, but only changes comments,
and shouldn't make any difference to behavior.
The purpose is to slightly improve readability of pylint
disable comments.
Change-Id: Ic6cd0f8de792b31d91c6125f6da2616450b30f11
Reviewed-on: https://chromium-review.googlesource.com/420412
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Quinten Yearsley <qyearsley@chromium.org>
Specifically, this CL was made by running codespell
(https://github.com/lucasdemarchi/codespell), manually filtering
for changes in non-third-party files that appear correct.
Change-Id: Ia16c1b29483d777744450d7bea45a178cf877a25
Reviewed-on: https://chromium-review.googlesource.com/420871
Commit-Queue: Quinten Yearsley <qyearsley@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
The old depot_tools instructions insisted that depot_tools be the last
entry in the PATH environment variable, for reasons that are unclear and
may only have applied to Linux. Meanwhile, there is a gn issue that can
cause unnecessary building if depot_tools is not near the front of the
path - ahead of other Python installs. This change alters the
instructions for Windows.
This also removes some obsolete instructions regarding building Chrome
on Windows XP - Chrome doesn't even *run* on Windows XP anymore.
BUG=611087
Review-Url: https://codereview.chromium.org/2371333002
That recipe no longer exists, as of
e0cc9e4949
Referring to it in the tutorial is misleading. It seems that the docs scripts
haven't been run in awhile, so there are some unrelated changes as well.
Review-Url: https://codereview.chromium.org/2162223003
Added --ignore-file argument, so you can specify ignored commits in a
file rather than as raw command-line arguments. Also, automatically
searches for a file called .git-blame-ignore-revs, which is
automatically used as an ignore list by default.
Also, specifying an unknown revision (either on the command line or in a
file) now generates a warning, not an error.
Notes on some decisions:
- The file is called .git-blame-ignore-revs (not mentioning hyper-blame)
because we may use the same list in tools other than hyper-blame in
the future.
- We look at the *currently checked out* version of
.git-blame-ignore-revs (not the version at the specified revision) for
consistency with .git-ignore. Because we only expect revisions to be
added (not deleted), it should be fine to use an ignore list from a
newer version than the revision being blamed.
- We considered using git notes for the ignore list so that you could
add a revision to the ignore list without needing a follow-up CL.
However, there are some problems with this approach. git notes is not
automatically synced with git clone/pull. Also the Chromium infra
tools (Reitveld, CQ) are not set up to allow modification of git
notes, nor are changes to git notes subject to OWNERS checks. Using a
regular file ensures all users synced to a particular revision are
using the same ignore list.
BUG=574290
Review URL: https://codereview.chromium.org/1697423004
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298897 0039d316-1c4b-4281-b951-d872f2087c98
Previously, when a commit was skipped, it would be blamed on the line
number the line had *after* the skipped commit. This could mean a
totally unrelated commit gets blamed. Now, a heuristic analyses the diff
of the skipped commit to discover approximately what line number the
line had *before* the skipped commit, so it can hopefully be blamed on
the right commit.
BUG=574290
Review URL: https://codereview.chromium.org/1629253002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298609 0039d316-1c4b-4281-b951-d872f2087c98
Currently, the script requires you to pass the unwanted commits on the
command line, but eventually, you could configure it with a file
(checked into the repo) that provides a fixed set of commits to always
skip (such as commits that do a huge amount of renaming and nothing
else).
BUG=574290
Review URL: https://codereview.chromium.org/1559943003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298544 0039d316-1c4b-4281-b951-d872f2087c98
Currently, git-drover gives up and cleans up if the cherry-pick fails.
This change allows the user to manually resolve conflicts when using
git-drover.
BUG=404755
Review URL: https://codereview.chromium.org/1397313002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@297429 0039d316-1c4b-4281-b951-d872f2087c98
This uses the same trick as git-new-workdir to reuse an existing git
checkout without interfering with it. However, this makes it only usable
on platforms where os.symlink exists.
BUG=404755
Review URL: https://codereview.chromium.org/1342383002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296920 0039d316-1c4b-4281-b951-d872f2087c98