Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(118)

Issue 11270056: Add gclient grep for git repos (Closed)

Created:
8 years, 1 month ago by Isaac (away)
Modified:
8 years, 1 month ago
Reviewers:
M-A Ruel
CC:
chromium-reviews, Dirk Pranke, cmp+cc_chromium.org, M-A Ruel
Base URL:
https://git.chromium.org/chromium/tools/depot_tools.git@master
Visibility:
Public.

Description

Add gclient grep for git repos - Adds a gclient grep command to search through git repos. - Not done: print the cwd for each dep that has output. R=maruel@chromium.org BUG=157950

Patch Set 1 #

Total comments: 8

Patch Set 2 : #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+26 lines, -2 lines) Patch
M gclient.py View 1 1 chunk +26 lines, -2 lines 8 comments Download

Messages

Total messages: 7 (0 generated)
Isaac (away)
8 years, 1 month ago (2012-10-26 00:55:31 UTC) #1
M-A Ruel
I think a gclient fetch would be nice too. https://chromiumcodereview.appspot.com/11270056/diff/1/gclient.py File gclient.py (right): https://chromiumcodereview.appspot.com/11270056/diff/1/gclient.py#newcode1252 gclient.py:1252: ...
8 years, 1 month ago (2012-10-26 12:45:42 UTC) #2
Isaac (away)
>> I think a gclient fetch would be nice too. This is already done - ...
8 years, 1 month ago (2012-11-05 07:08:48 UTC) #3
M-A Ruel
On 2012/11/05 07:08:48, Isaac wrote: > >> I think a gclient fetch would be nice ...
8 years, 1 month ago (2012-11-05 13:51:14 UTC) #4
Isaac (away)
https://chromiumcodereview.appspot.com/11270056/diff/5001/gclient.py File gclient.py (right): https://chromiumcodereview.appspot.com/11270056/diff/5001/gclient.py#newcode1277 gclient.py:1277: # We can't use optparse because it will try ...
8 years, 1 month ago (2012-11-05 17:09:53 UTC) #5
M-A Ruel
lgtm with the proper Usage print. https://chromiumcodereview.appspot.com/11270056/diff/5001/gclient.py File gclient.py (right): https://chromiumcodereview.appspot.com/11270056/diff/5001/gclient.py#newcode1274 gclient.py:1274: print 'Usage [-j ...
8 years, 1 month ago (2012-11-05 17:39:05 UTC) #6
Isaac (away)
8 years, 1 month ago (2012-11-07 07:13:53 UTC) #7
There's an issue with base url here (I uploaded from non git-svn).  So
abandoning this CL and moving to
https://chromiumcodereview.appspot.com/11312116/

Please put new comments on the other CL.

https://chromiumcodereview.appspot.com/11270056/diff/5001/gclient.py
File gclient.py (right):

https://chromiumcodereview.appspot.com/11270056/diff/5001/gclient.py#newcode1274
gclient.py:1274: print 'Usage [-j <N>] git-grep args...'
On 2012/11/05 17:39:05, Marc-Antoine Ruel wrote:
> print >> sys.stderr, 'Usage: git cl grep [-j <N>] <git-grep args>...'
> or:
> parser.remove('--help')
> parser.help()
> 
> but I'm not sure it'd work properly either. So I'm fine with just printing
usage
> to stderr.

Done.

https://chromiumcodereview.appspot.com/11270056/diff/5001/gclient.py#newcode1277
gclient.py:1277: # We can't use optparse because it will try to parse arguments
sent
On 2012/11/05 17:39:05, Marc-Antoine Ruel wrote:
> On 2012/11/05 17:09:53, Isaac wrote:
> > On 2012/11/05 13:51:14, Marc-Antoine Ruel wrote:
> > > You can, you need to use parser.disable_interspersed_args()
> > 
> > That does not allow users to pass arguments to git grep. 
> > i.e. gclient grep -i foo to call git grep with -i. 
> 
> Ok, I always used -- naturally but I agree it's user hostile.

SG.  Some git commands also use -- so prefer not to confuse people.

https://chromiumcodereview.appspot.com/11270056/diff/5001/gclient.py#newcode1285
gclient.py:1285: 
On 2012/11/05 17:39:05, Marc-Antoine Ruel wrote:
> You also lose support for -h and --help. But it's not much a big deal.

I fixed this w/ a regex -- see new review.

Powered by Google App Engine
This is Rietveld 408576698