Commit Graph

155 Commits (2d1ee9ec79f05eb1f9cf448fe2cf0b49b7f73658)

Author SHA1 Message Date
marq@chromium.org e5e5900f49 Fix spelling error in help text.
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@226611 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
tyoshino@chromium.org 99918abbe7 Ignore CC_LIST when private flag is specified.
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
12 years ago
adam.treat@samsung.com 16d2ad682e Add a flag for clang-format that instructs the tool to strip 0 leading slashes from the file names.
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
12 years ago
sbc@chromium.org 87b9bf026a Add 'git cl diff' command.
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
12 years ago
ikarienator@chromium.org faf3fdf736 An interactive tool to help find owners covering current change list.
BUG=77248

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@224264 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
agable@chromium.org 42c2079a1e Fix R= line rewriter to handle TBRs well.
R=maruel@chromium.org, thakis@chromium.org
BUG=253589

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@222801 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
agable@chromium.org eec3ea3534 Pretty-print the CL description during commit.
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
12 years ago
ilevy@chromium.org 36e420ba8b Always use latest patchset in git-cl try
Rietveld rejects tryjobs from non-latest patchsets anyway,
change logic to always use latest patchset.

R=iannucci@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@216023 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
mdempsky@google.com c3b3dc0183 allow running "git cl format" from subdirectories
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@215724 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
maruel@chromium.org 911fce143c Explicitly convert issue and patchset to int.
upload.py returns them as string, eventually leading to a crash.

R=iannucci@chromium.org
BUG=265546

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@214247 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
maruel@chromium.org 885f65199c Disable colors if not a tty.
Otherwise this breaks git cl unit tests.

Update references to 'git cl' in git cl smoke tests to $GIT_CL.

TBR=ilevy@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@214019 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
iannucci@chromium.org d9c1b20095 Revert "Revert "Improve description layout. Improve coloring and add legend in help.""
This reverts commit c0594f37a1.

Because I reverted the wrong thing >_<

TBR=maruel@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@213551 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
iannucci@chromium.org c0594f37a1 Revert "Improve description layout. Improve coloring and add legend in help."
This reverts commit 44a82fa84b.

Broke git cl apply <issue>

TBR=maruel@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@213545 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
maruel@chromium.org 44a82fa84b Improve description layout. Improve coloring and add legend in help.
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
12 years ago
jochen@chromium.org a26e04734b Correctly pass the issue number as "issue" parameter to Changelist ctor
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
12 years ago
maruel@chromium.org 1033efd0da Add color support to git cl and fetch issue properties in parallel.
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
12 years ago
maruel@chromium.org e25c75b0ba Cleanup 'git cl status' in preparation to add new features.
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
12 years ago
maruel@chromium.org cf0877805e Simplify code; no need to pass issue arg to GetApprovingReviewers().
The class already knows the issue number.

R=iannucci@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@213083 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
ilevy@chromium.org cc56ee4cac Fix pylint presubmit failure
Caused by crrev.com/210695

TBR=maruel@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@210949 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
tapted@chromium.org 6a0b07c12a Default to using --3way when using `git cl patch` with git >= 1.7.12
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
12 years ago
bratell@opera.com 82b91cd1a8 Replace --no-pager with GIT_PAGER=cat
--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
12 years ago
hinoka@google.com 55c05c94c6 Fixes depot_tools presubmit
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
12 years ago
dbeam@chromium.org 015fd3d953 Make git cl status spit out URLs instead of just Rietveld issue numbers.
R=maruel@chromium.org
BUG=none
TEST=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@207048 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
maruel@chromium.org 967c0a8f79 Make git cl smarter about subcommands typos.
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
12 years ago
brettw@chromium.org b65c43c671 Add the option to bypass watchlists.
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
12 years ago
tapted@chromium.org 0bdc2650d4 Revert 204671 "Default to using --3way when using `git cl patch`."
> 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/16211005

TBR=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
12 years ago
tapted@chromium.org 61aa0aec1b 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/16211005

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@204671 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
alancutter@chromium.org bd1073ebe6 Change to 72 column reference in git cl upload message
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
12 years ago
alancutter@chromium.org 63a4d7fce1 Add 76 column reference in git cl upload message
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
12 years ago
enne@chromium.org 90d30c6065 Fix git cl format misunderstanding b/ diff prefixes
R=digit@chromium.org, maruel@chromium.org
BUG=244602

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@202879 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
tyoshino@chromium.org c1737d0609 Add --private option to git_cl.py
TEST=tests/git_cl_test.py

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@202865 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
rogerta@chromium.org afadfca503 Remove hack to make --message argument act like --title argument in the
git_cl.py script.  See http://goo.gl/JGg0Z for details.

BUG=None

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@202864 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
rsesek@chromium.org eec76591d5 Add |git cl description| to allow you to change the description in your favorite $EDITOR.
R=maruel@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@201094 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
digit@chromium.org 29e47275ee Fix 'git cl format'
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
12 years ago
maruel@chromium.org 2e23ce3ecb Add colors to git cl comments.
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
12 years ago
agable@chromium.org fab8f82da3 Adding 'git cl format' command for clang-format.
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
12 years ago
jbroman@chromium.org 615a262dcb Make git-cl more accurately imitate git's editor selection process, and respect $VISUAL.
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
12 years ago
bratell@opera.com f267b0e55c Fix 236148: Avoid triggering a pager in internal git commands.
BUG=236148

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@197872 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
maruel@chromium.org e52678e0ed Update the R= line with the actual list of reviewers that approved the CL.
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
12 years ago
maruel@chromium.org c6f60e8906 Fix R= line handling when there is no value and improve presubmit TAG line regex
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
12 years ago
janx@chromium.org 104b2db2a0 Add missing word "be" in CL description comments
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
12 years ago
zimmerle@gmail.com 3cdcf56c58 Ensures that local git config is used while checking if it is a Git-svn repo.
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
12 years ago
rogerta@chromium.org 4a6cd04c87 Remove trailing '\n' from last-upload-hash branch property.
BUG=None

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@193943 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
maruel@chromium.org 78936cbc80 Switch ChangeDescription usage to be stricter.
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
12 years ago
maruel@chromium.org eb52a5caec Make git-cl accepts multiple --reviewers and --cc arguments.
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
12 years ago
koz@chromium.org c71927873f Make warning for mismatched local and remote patchset more clear.
Review URL: https://chromiumcodereview.appspot.com/13956002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@193257 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
pdr@chromium.org 98ca6624fc Change "git cl patch" to say "Committed patch locally."
Currently, if "git cl patch" succeeds it prints:
Committed patch.
This patch changes "git cl patch" to print:
Committed patch locally.

BUG=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@193206 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
maruel@chromium.org b021b32ac6 Do not systematically update the description on CL close.
This is not always necessary, like for "git cl set_close".

R=dpranke@chromium.org
BUG=


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

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