as part of the Chromium checkout.
This follows the approach used by gn.
Changes include:
- in-the-PATH clang-format trampoline scripts
- clang_format.py, which finds clang-format binaries inside of Chrome
- Hook 'git cl format' to the new binaries and scripts
- Rearrange some code, for reuse between clang_format.py and gn.py
BUG=240309
TEST=presubmits (one failure on mac, but it fails on a clean checkout too)
Review URL: https://codereview.chromium.org/134313007
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@245074 0039d316-1c4b-4281-b951-d872f2087c98
This change will allow projects other than chromium to specify 'BUG_PREFIX: project_name:' in their codereview.settings file.
Currently, the change is created with 'BUG=', entering a project's bug number there will point it to chromium's issue tracker. Adding a project specific prefix will make the links point to the project's issue tracker without the developer having to know about the magic prefix.
BUG=skia:1983
Review URL: https://codereview.chromium.org/132233006
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@244801 0039d316-1c4b-4281-b951-d872f2087c98
Passing the email address used to connect to Rietveld on the command
line is useful for testing purposes, in particular with a test server.
BUG=331123
Review URL: https://codereview.chromium.org/122583003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@244017 0039d316-1c4b-4281-b951-d872f2087c98
These options have been added to the 'git cl config' subcommand.
--deactivate-update tells git cl not to update the values inside
.git/config from the codereview.settings file. --activate-update does
the opposite.
This is designed for testing/development purposes only, for example, to
be able to change the rietveld URL.
BUG=327901
Review URL: https://codereview.chromium.org/104043008
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@242943 0039d316-1c4b-4281-b951-d872f2087c98
MatchSvnGlob uses the root url to grep for existing svn commits by
matching the git-svn-id lines in the commit messages. If there is a
rewriteRoot config, then the git-svn-id lines will have the
rewritten url's, and the code should match against that.
R=blundell@chromium.org,maruel@chromium.org
Review URL: https://codereview.chromium.org/103053011
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@241043 0039d316-1c4b-4281-b951-d872f2087c98
This will also enable git cl format to be more easily runnable by
presubmit within a subdirectory.
BUG=none
Review URL: https://codereview.chromium.org/108353005
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@239821 0039d316-1c4b-4281-b951-d872f2087c98
Tell download tools/hooks/commit-msg mannually if it looks broken.
chrome-internal-reviews.googlesource.com requires
authentication to access tools/hooks/commit-msg, and
we'll get Google Sign-in page rather than expected shell script.
R=szager@chromium.org,maruel@chromium.org,ilevy@chromium.org
BUG=
Review URL: https://codereview.chromium.org/87173002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@237454 0039d316-1c4b-4281-b951-d872f2087c98
Newer versions of clang-format-diff.py now require a -i flag to
explicitely apply edits, otherwise they just print a diff, which
make "git cl format" a no-op.
This patch fixes the issue by probing the script's help text to
see if the flag is needed. If it is, it is added automatically.
BUG=NONE
R=maruel@chromium.org
Review URL: https://codereview.chromium.org/44263004
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@231020 0039d316-1c4b-4281-b951-d872f2087c98
Currently, running "git cl issue 0" in a client prints a confusing error
message if there's no issue assigned. This changes the code so that the issue
number isn't "unset" if it's not currently set.
BUG=
Review URL: https://codereview.chromium.org/32193016
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@230499 0039d316-1c4b-4281-b951-d872f2087c98
This prevents private CLs to be automatically CC-ed to public mailing lists
unintentionally.
Review URL: https://chromiumcodereview.appspot.com/24257014
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@225925 0039d316-1c4b-4281-b951-d872f2087c98
I have clang-format-3.3 installed and it appears to default to stripping one leading slash.
BUG=294188
Review URL: https://chromiumcodereview.appspot.com/24217002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@225705 0039d316-1c4b-4281-b951-d872f2087c98
This command shows the differences between local branch
and the last patch uploaded to rietveld. The idea being
that you can see what would be uploaded before you actually
upload.
This can useful when using 'git cl patch' to move changes
between checkouts and working from more than one machine at
once.
Review URL: https://chromiumcodereview.appspot.com/24276008
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@225552 0039d316-1c4b-4281-b951-d872f2087c98
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
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
Having "Description: u'Foo\nBUG=1234\nR=bar@chromium.org\nReview Url: baz'"
is not actually that useful in my experience. I'd rather be able to easily
read the final CL description that is being committed.
Review URL: https://chromiumcodereview.appspot.com/23185006
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@217834 0039d316-1c4b-4281-b951-d872f2087c98
Convert monkey patching to class inheritance for OptionParser usage in:
commit_queue.py, gclient.py and trychange.py.
Monkey patching confuses the hell out of pylint.
R=jochen@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/19552004
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@213423 0039d316-1c4b-4281-b951-d872f2087c98
Instead of as branchref. Because it's an issue. Not a branchref.
Also, add myself as owner.
BUG=none
R=maruel@chromium.org
Review URL: https://chromiumcodereview.appspot.com/19997004
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@213387 0039d316-1c4b-4281-b951-d872f2087c98
Add cache for issue properties.
Add --fast option in case the HTTP requests become an issue.
Everyone loves colors:
- White means no issue is associated with the branch.
- Red means no email was sent to request a review. Also red if the issue doesn't
exist anymore.
- Blue means the issue was not LGTM'ed yet.
- Green means the issue was LGTM'ed and is likely ready to commit or be CQ'ed.
R=iannucci@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/19967004
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@213265 0039d316-1c4b-4281-b951-d872f2087c98
Reduce the number of conditions and use more early exits to reduce the number of
code paths.
R=iannucci@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/19463011
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@213173 0039d316-1c4b-4281-b951-d872f2087c98
Git introduced a --3way argument to `apply` in version 1.7.12 [1]. This
provides a much nicer way to apply issues from Rietveld.
After this change, `git cl patch` will add --3way after checking the git
version for support.
[1] f247b10aa0
BUG=None
TEST=Ran `git cl patch <issue>` with both clean and unclean patches,
also checked behaviour of --reject is preserved.
R=maruel@chromium.org
Review URL: https://codereview.chromium.org/18966004
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@210695 0039d316-1c4b-4281-b951-d872f2087c98
--no-pager looks ugly in logs and output and makes commands harder to
read. Setting an environment variable is better.
This is a followup to https://chromiumcodereview.appspot.com/14104005/
which added --no-pager.
Review URL: https://chromiumcodereview.appspot.com/18173003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@210503 0039d316-1c4b-4281-b951-d872f2087c98
basic.sh expects "work: None", but "work: " is printed instead, which breaks
presubmit. This fixes it.
BUG=
R=dpranke@chromium.org
Review URL: https://codereview.chromium.org/17763004
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@208799 0039d316-1c4b-4281-b951-d872f2087c98
Look for either a unique prefix or for an approximation of the shortest
Levenshtein distance. So all of these will resolve to 'git cl upload':
git cl upl
git cl uplaod
These won't resolve:
git cl up # it shares prefix with 'upstream'
git cl uplao # not similar enough
Also align help against longest command instead of hard coded '10'. The help
page was distorded.
R=iannucci@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/17272002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@206820 0039d316-1c4b-4281-b951-d872f2087c98
I have a large rename change and it's impossible to upload because the size of the CC field is above the maximum 2000 characters in Reitveld.
Review URL: https://chromiumcodereview.appspot.com/16366008
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@205323 0039d316-1c4b-4281-b951-d872f2087c98
> Default to using --3way when using `git cl patch`.
>
> Resolving conflicts is much more fun this way.
>
> BUG=None
> TEST=Ran `git cl patch <issue>` with both clean and unclean patches, also checked behaviour of --reject is preserved.
> R=maruel@chromium.org
>
> Review URL: https://codereview.chromium.org/16211005TBR=tapted@chromium.org
Review URL: https://codereview.chromium.org/15786008
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@204978 0039d316-1c4b-4281-b951-d872f2087c98
Resolving conflicts is much more fun this way.
BUG=None
TEST=Ran `git cl patch <issue>` with both clean and unclean patches, also checked behaviour of --reject is preserved.
R=maruel@chromium.org
Review URL: https://codereview.chromium.org/16211005
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@204671 0039d316-1c4b-4281-b951-d872f2087c98
76 columns is fine for most patches but reverts will eat another
4 spaces in indentation. For the sake of revert clarity this reference
line is reduced to 72 columns.
Review URL: https://chromiumcodereview.appspot.com/16152005
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@203530 0039d316-1c4b-4281-b951-d872f2087c98