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
Adds an extra line to the default text description to help judge whether the
76 character recommended limit is being passed.
Review URL: https://chromiumcodereview.appspot.com/15670012
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@203314 0039d316-1c4b-4281-b951-d872f2087c98
This patch fixes the implementation as follows:
1/ Fix '--full' option to check for all changes in the
current branch relative to upstream. The old code only
considered currently modified files, which made little
sense.
2/ Fix '--full' option to apply Chromium style too.
3/ Use a proper source file filter. The original code used
".*.cc .*.cpp .*.h" as the filter, which didn't catch anything !?
4/ Add --no-ext-diff to make it work with custom "git diff" handlers.
R=agable@chromium.org, maruel@chromium.org, pliard@chromium.org
BUG=NONE
Review URL: https://chromiumcodereview.appspot.com/14942012
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@200832 0039d316-1c4b-4281-b951-d872f2087c98
Helps scanning faster. colorma is already slightly used by gclient but wasn't
by git-cl yet.
Update a unit test to be stricter, it was caught in the cross fire as colorma
hooks sys.stdout and stderr.
R=iannucci@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/15025003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@198689 0039d316-1c4b-4281-b951-d872f2087c98
As per the discussion in
https://groups.google.com/a/chromium.org/forum/?fromgroups=#!topic/chromium-dev/Hl2QPNQ9E5o,
this CL adds a 'git cl format' command. Users may use it at their own
discretion. By default, it generates a diff against the local tracking
(upstream) branch and runs clang-format-diff on that diff. When given the
'--full' flag, it instead identifies all .cc, .cpp, and .h files in the diff and
runs clang-format on the entirety of each of those files.
Review URL: https://chromiumcodereview.appspot.com/14629012
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@198477 0039d316-1c4b-4281-b951-d872f2087c98
It is somewhat surprising when git-cl, which acts as a git subcommand, launches
a different editor. In particular, git has a config option (core.editor) which
specifies the editor that should be used. Since we already respect $GIT_EDITOR,
it makes sense for git-cl to respect core.editor and $VISUAL as well.
R=maruel@chromium.org
BUG=237504
Review URL: https://chromiumcodereview.appspot.com/14854003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@198101 0039d316-1c4b-4281-b951-d872f2087c98
This makes the commit logs much more useful for a build sheriff. Not only he
sees who committed the CL but see who approved it directly at the log. This
should help build sheriffs when they fail to contact the author and want to
fallback on the reviewer for quick questions.
R=dpranke@chromium.org
BUG=76730
Review URL: https://chromiumcodereview.appspot.com/13800021
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@196786 0039d316-1c4b-4281-b951-d872f2087c98
Make it more consistent across the tool. Using \s also includes \n, which
confuses the tool.
Add more tests.
R=iannucci@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/14265007
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@195214 0039d316-1c4b-4281-b951-d872f2087c98
s/This will displayed/This will be displayed/g
BUG=
Review URL: https://chromiumcodereview.appspot.com/13811053
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@194907 0039d316-1c4b-4281-b951-d872f2087c98
If no `--local` option is passed to git config command line tool, it will relies
on the local repository and then to the user configuration ($HOME/.gitconfig).
In case the user has - for some reason - a svn repository configured in this
user configuration, the checking: `git config --get-regexp ^svn-remote\.` will
accuse that there is svn repo and so the `git cl tool`. This patch just add
the option `--local` to the git config command line tool, avoiding this
situation.
R=maruel@chromium.org,dpranke@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/13884014
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@193987 0039d316-1c4b-4281-b951-d872f2087c98
Include all the preparatory work to eventually update the R= line to match the
actual reviewers.
The goal here is that ChangeDescription becomes the official implementation for
handling and modifying commit messages accross git-cl, gcl and the commit queue.
This change does slightly tweak the spacing between the hot lines.
It is done on purpose to make them consistent.
R=dpranke@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/13741015
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@193514 0039d316-1c4b-4281-b951-d872f2087c98
It makes sure the resulting options.reviewers and options.cc are internally
consistent by splitting comma separated items.
R=iannucci@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/13843002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@193496 0039d316-1c4b-4281-b951-d872f2087c98