Commit Graph

11 Commits (690ba8f98dece747ebe9b8263a5ac482df87b74d)

Author SHA1 Message Date
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
Edward Lemur 1c3b4bec47 subcommand: Add tests.
Change-Id: I730f364f30b0d211c2db6da0d6bb4f5ff3c948da
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1999280
Reviewed-by: Anthony Polito <apolito@google.com>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
5 years ago
Edward Lemur 921f6a1751 depot_toools: Make subcommand Python 3 compatible.
Bug: 984182
Change-Id: I5d1b5626eb799975539560ca1508af92df326d47
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1721916
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Auto-Submit: Edward Lesmes <ehmaldonado@chromium.org>
6 years ago
Michael Achenbach 7f8c775571 Revert "gclient: return non-zero exit code on unknown command"
This reverts commit 2c199e1ec4.

Reason for revert: This makes calls to gclient that have the only intention of updating gclient fail, like:
https://cs.chromium.org/chromium/src/v8/tools/try_perf.py?l=93

Reverting for now to give time to clean up such scripts before reland.

Original change's description:
> gclient: return non-zero exit code on unknown command
> 
> Bug: none
> Change-Id: I447f66765679b7b66b5748af1cf1f501610603bf
> Reviewed-on: https://chromium-review.googlesource.com/504408
> Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
> Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
> 

TBR=iannucci@chromium.org,phajdan.jr@chromium.org,dpranke@chromium.org,tandrii@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Bug: none

Change-Id: I9496f7192dfde1e38c186a94ac985190b76b2438
Reviewed-on: https://chromium-review.googlesource.com/506563
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
8 years ago
Paweł Hajdan, Jr 2c199e1ec4 gclient: return non-zero exit code on unknown command
Bug: none
Change-Id: I447f66765679b7b66b5748af1cf1f501610603bf
Reviewed-on: https://chromium-review.googlesource.com/504408
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
maruel@chromium.org 6dc64d3781 Automatically upgrade '_' to '-' when finding the right command.
This doesn't change the automatic command finder, so it really only helps
increase match hit rate in case of low confidence level delta between the 2 top
hits. For example, given commands 'set-commit' and 'dcommit', a user typing
'set_commit' would hit:
- 'set-commit': 90%
- 'dcommit': 70.5%

Since subcommand.py uses a 30% minimum confidence level between the two top hit
to automatically select a command, it will err on the side of safety and will
abort instead of selecting 'set-commit'.

This change fixes this specific case but won't trigger on partial matches, e.g.
'set_commi' for 'set-commit'.

R=stip@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1066923003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294700 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
maruel@chromium.org 9f7fd12112 Formalizes support for '-' in command names.
This officially drops support for '_' in command names, which is ugly as hell.
'_' was very rarely used so it shouldn't affect too much users.

Refactor the code to be more readable.

R=stip@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1040503003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294660 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
maruel@chromium.org 29404b59d2 Add git cl lol.
Because everyone needs humour.

Fix a small bug in subcommands.py with undocumented commands.

R=stip@chromium.org
BUG=

Review URL: https://codereview.chromium.org/554123003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291867 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
maruel@chromium.org 89f91d417f Add transparent dash support to commands.
This makes it easier to type without using the shift-key, so an user can type
'git cl set-commit' and it'll find CMDset_commit.

R=xusydoc@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/22918019

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@219054 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
maruel@chromium.org 39c0b22fd3 Convert gclient to use subcommand.py
Update subcommand to support examples, always disable format_description and
format_epilog and add colors when enabled.

R=iannucci@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/22824018

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@218180 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
maruel@chromium.org 0633fb4ff2 Split generic subcommand code off its own module.
Use the code in git_cl.py, since it was the more evolved. Add documentation
and clean up the structure along the way.

This makes it possible to easily reuse the generic subcommand handling code.

As a first step, only git_cl.py is using it. Eventually, gclient and gcl could
be switch over.

R=iannucci@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/23250002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@218072 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago