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

Issue 13743002: Add non-git-svn checkout to fetch.py. (Closed)

Created:
7 years, 8 months ago by agable
Modified:
7 years, 8 months ago
Reviewers:
Dirk Pranke, iannucci
CC:
chromium-reviews, Dirk Pranke, cmp-cc_chromium.org, M-A Ruel, iannucci+depot_tools_chromium.org
Visibility:
Public.

Description

Add non-git-svn checkout to fetch.py. Also modify the chromium and blink recipes to only use the gclient-git checkout method if the user specifies --anonymous=True on the command line. A better command-line parsing system is coming in the near future, so don't worry about the "if props.get('anonymous', 'False') != 'True'" too much. R=dpranke@chromium.org,iannucci@chromium.org

Patch Set 1 #

Total comments: 11
Unified diffs Side-by-side diffs Delta from patch set Stats (+65 lines, -34 lines) Patch
M fetch View 1 chunk +1 line, -3 lines 1 comment Download
M fetch.py View 5 chunks +35 lines, -14 lines 9 comments Download
M recipes/blink.py View 1 chunk +10 lines, -8 lines 1 comment Download
M recipes/chromium.py View 1 chunk +19 lines, -9 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
agable
Here's the --anonymous=True change.
7 years, 8 months ago (2013-04-06 00:41:34 UTC) #1
iannucci
lgtm w/ comments https://codereview.chromium.org/13743002/diff/1/fetch.py File fetch.py (right): https://codereview.chromium.org/13743002/diff/1/fetch.py#newcode70 fetch.py:70: return os.path.exists(os.path.join(os.getcwd(), self.root)) Let's make self.root ...
7 years, 8 months ago (2013-04-06 01:38:18 UTC) #2
Dirk Pranke
7 years, 8 months ago (2013-04-06 01:45:25 UTC) #3
On the description: 

If you can, it's best to lead with what the user-visible changes are, and then
discuss what (how/why) the changes are that implement this, e.g.:

Add support for anonymous/non-committers to 'fetch'

Currently the recipes expect you to be a committer, but not everyone is. This
gives non-committers an easy option as well. 

To do that, we add a 'GclientGitCheckout' class to fetch.py and the following
parameters [...] to the recipes to support this"

Or something like the above.

We should also document the format of the recipes somewhere (e.g., in
recipe_util.Recipe) so it can be clear what all of the supported parameters are.

And we still need tests. Given that people are actually using this command now,
we should probably have them here (at least minimal smoke tests to ensure that
the command line arguments don't cause crashes).

https://codereview.chromium.org/13743002/diff/1/fetch
File fetch (left):

https://codereview.chromium.org/13743002/diff/1/fetch#oldcode10
fetch:10: fi
NIt: ideally I would've cleaned this up in a separate patch

https://codereview.chromium.org/13743002/diff/1/fetch.py
File fetch.py (right):

https://codereview.chromium.org/13743002/diff/1/fetch.py#newcode69
fetch.py:69: def exists(self):
I know this name was already chosen, but it's not very good :) Can we rename
this to CheckoutAlreadyExists() or something? We should also consider checking
if a '.gclient' file exists in the cwd.

https://codereview.chromium.org/13743002/diff/1/fetch.py#newcode118
fetch.py:118: class GclientGitSvnCheckout(GclientCheckout, GitCheckout,
SvnCheckout):
Should this inherit from GclientGitCheckout instead of GclientCheckout and
GitCheckout?

https://codereview.chromium.org/13743002/diff/1/fetch.py#newcode194
fetch.py:194: """ % os.path.basename(sys.argv[0]))
Since we're hacking here, we should add in a comment about --anonymous=true here
for now, and fix this down the road w/ proper arg parsing (which would not
require the '=true' part). Please make sure the usage mentions something about 
non-committer or non-commit so that it's clearer that anonymous is also for
people who are contributors who might have accounts but aren't yet committers.

https://codereview.chromium.org/13743002/diff/1/recipes/blink.py
File recipes/blink.py (right):

https://codereview.chromium.org/13743002/diff/1/recipes/blink.py#newcode17
recipes/blink.py:17: if props.get('anonymous', 'False') != 'True':
I saw the comment, but clearly at some point this should end up as something
like "if not props.get('anonymous'):"

Powered by Google App Engine
This is Rietveld 408576698