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

Issue 437903002: Add --no-history option to fetch and gclient for shallow clones. (Closed)

Created:
6 years, 4 months ago by Primiano Tucci (use gerrit)
Modified:
6 years, 4 months ago
Reviewers:
iannucci, wtc, szager1
CC:
chromium-reviews, Dirk Pranke, cmp-cc_chromium.org, iannucci+depot_tools_chromium.org, ilevy-cc_chromium.org, hinoka, cmp, Torne
Base URL:
https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Project:
tools
Visibility:
Public.

Description

Add --no-history option to fetch and gclient for shallow clones. Many people* have complained on chromium-dev about the long times required to perform a full fetch over a DSL. This seems to be mostly due to the huge size of chromium's history (~9 GB). On the other side, not everybody is interested in downloading the full git history of the projects. The size of git packs required to fetch a working HEAD is one order of magnitude smaller (1.5 GB). This change makes it possible to perform a shallow fetch (in a way which is consistent with DEPS, leveraging git templates on clone), reducing fetch times by 80% for those not interested in the history. * See: [chromium-dev] "fetch chromium" keeps hanging/getting stuck on Windows 7 [chromium-dev] Initial checkout with git taking long [chromium-dev] Trying to get latest source code fails when fetching [chromium-dev] Gclient sync takes too long BUG=228996 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=287606

Patch Set 1 #

Total comments: 11

Patch Set 2 : Address review comments #

Total comments: 6

Patch Set 3 : != None -> is not None #

Patch Set 4 : Remove print #

Patch Set 5 : Add test to gclient_smoketest.py #

Unified diffs Side-by-side diffs Delta from patch set Stats (+85 lines, -4 lines) Patch
M fetch.py View 5 chunks +11 lines, -1 line 0 comments Download
M gclient.py View 1 2 3 4 1 chunk +3 lines, -0 lines 0 comments Download
M gclient_scm.py View 2 3 2 chunks +21 lines, -0 lines 0 comments Download
M gclient_utils.py View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M tests/gclient_scm_test.py View 1 2 3 4 3 chunks +4 lines, -3 lines 0 comments Download
M tests/gclient_smoketest.py View 1 2 3 4 1 chunk +41 lines, -0 lines 0 comments Download

Messages

Total messages: 29 (0 generated)
Primiano Tucci (use gerrit)
Can somebody PTAL? I just tried on my 8M DSL in a land forgotten by ...
6 years, 4 months ago (2014-08-02 07:22:35 UTC) #1
Primiano Tucci (use gerrit)
6 years, 4 months ago (2014-08-02 07:26:15 UTC) #2
iannucci
On 2014/08/02 07:26:15, Primiano Tucci wrote: When you say 9GB, I'm assuming you mean chromium ...
6 years, 4 months ago (2014-08-02 18:27:19 UTC) #3
iannucci
On 2014/08/02 18:27:19, iannucci wrote: > On 2014/08/02 07:26:15, Primiano Tucci wrote: > > When ...
6 years, 4 months ago (2014-08-02 18:31:00 UTC) #4
Primiano Tucci (use gerrit)
On 2014/08/02 18:27:19, iannucci wrote: > On 2014/08/02 07:26:15, Primiano Tucci wrote: > > When ...
6 years, 4 months ago (2014-08-02 18:35:35 UTC) #5
iannucci
On 2014/08/02 18:35:35, Primiano Tucci wrote: > On 2014/08/02 18:27:19, iannucci wrote: > > On ...
6 years, 4 months ago (2014-08-02 18:38:27 UTC) #6
Primiano Tucci (use gerrit)
> Also, the http://googlesource.com has a fast-path optimization for doing full clones v. > shallow ...
6 years, 4 months ago (2014-08-02 19:20:23 UTC) #7
Primiano Tucci (use gerrit)
> ^^^ That is a huge issue. One thing that we do for the bots ...
6 years, 4 months ago (2014-08-02 19:31:19 UTC) #8
iannucci
in general lgtm. I tried this patch on my laptop over 11Mbps DSL: * with ...
6 years, 4 months ago (2014-08-02 21:22:15 UTC) #9
iannucci
https://codereview.chromium.org/437903002/diff/1/fetch.py File fetch.py (right): https://codereview.chromium.org/437903002/diff/1/fetch.py#newcode227 fetch.py:227: while len(argv) >= 2: this should really be using ...
6 years, 4 months ago (2014-08-02 21:36:32 UTC) #10
wtc
Drive-by review comments on patch set 1: Primiano: thank you very much for writing this ...
6 years, 4 months ago (2014-08-03 04:12:49 UTC) #11
iannucci
On 2014/08/03 04:12:49, wtc wrote: > Drive-by review comments on patch set 1: > > ...
6 years, 4 months ago (2014-08-03 15:28:26 UTC) #12
Primiano Tucci (use gerrit)
Thanks all for the comments, see replies inline. https://codereview.chromium.org/437903002/diff/1/fetch.py File fetch.py (right): https://codereview.chromium.org/437903002/diff/1/fetch.py#newcode227 fetch.py:227: while ...
6 years, 4 months ago (2014-08-03 17:43:35 UTC) #13
szager1
lgtm, we need this. https://codereview.chromium.org/437903002/diff/20002/gclient_utils.py File gclient_utils.py (right): https://codereview.chromium.org/437903002/diff/20002/gclient_utils.py#newcode89 gclient_utils.py:89: return re.match('^[a-fA-F0-9]{6,40}$', revision) != None ...
6 years, 4 months ago (2014-08-04 21:15:24 UTC) #14
wtc
https://codereview.chromium.org/437903002/diff/20002/gclient_scm.py File gclient_scm.py (right): https://codereview.chromium.org/437903002/diff/20002/gclient_scm.py#newcode865 gclient_scm.py:865: gclient_utils.rmtree(template_dir) What I suggested was: if template_dir: if os.listdir(template_dir): ...
6 years, 4 months ago (2014-08-04 22:32:50 UTC) #15
Primiano Tucci (use gerrit)
https://codereview.chromium.org/437903002/diff/20002/gclient_scm.py File gclient_scm.py (right): https://codereview.chromium.org/437903002/diff/20002/gclient_scm.py#newcode865 gclient_scm.py:865: gclient_utils.rmtree(template_dir) On 2014/08/04 22:32:50, wtc wrote: > So, if ...
6 years, 4 months ago (2014-08-04 23:00:25 UTC) #16
Primiano Tucci (use gerrit)
https://codereview.chromium.org/437903002/diff/20002/gclient_scm.py File gclient_scm.py (right): https://codereview.chromium.org/437903002/diff/20002/gclient_scm.py#newcode865 gclient_scm.py:865: gclient_utils.rmtree(template_dir) > I'd be tempted to remove lines 863-865 ...
6 years, 4 months ago (2014-08-04 23:01:52 UTC) #17
wtc
https://codereview.chromium.org/437903002/diff/20002/gclient_scm.py File gclient_scm.py (right): https://codereview.chromium.org/437903002/diff/20002/gclient_scm.py#newcode865 gclient_scm.py:865: gclient_utils.rmtree(template_dir) On 2014/08/04 23:01:52, Primiano Tucci wrote: > I'd ...
6 years, 4 months ago (2014-08-05 00:11:56 UTC) #18
Primiano Tucci (use gerrit)
The CQ bit was checked by primiano@chromium.org
6 years, 4 months ago (2014-08-05 07:45:30 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/primiano@chromium.org/437903002/110001
6 years, 4 months ago (2014-08-05 07:46:29 UTC) #20
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-05 07:48:21 UTC) #21
commit-bot: I haz the power
Presubmit check for 437903002-110001 failed and returned exit status 1. Running presubmit commit checks ...
6 years, 4 months ago (2014-08-05 07:48:22 UTC) #22
Primiano Tucci (use gerrit)
Sorry for the 2nd pass. I added another small patchset. The original code itself is ...
6 years, 4 months ago (2014-08-05 19:19:43 UTC) #23
iannucci
lgtm, thanks for the smoke test :)
6 years, 4 months ago (2014-08-05 21:22:16 UTC) #24
Primiano Tucci (use gerrit)
The CQ bit was checked by primiano@chromium.org
6 years, 4 months ago (2014-08-05 21:46:45 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/primiano@chromium.org/437903002/230001
6 years, 4 months ago (2014-08-05 21:47:35 UTC) #26
commit-bot: I haz the power
Change committed as 287606
6 years, 4 months ago (2014-08-05 21:50:46 UTC) #27
Primiano Tucci (use gerrit)
A revert of this CL has been created in https://codereview.chromium.org/440263002/ by primiano@chromium.org. The reason for ...
6 years, 4 months ago (2014-08-05 23:14:48 UTC) #28
Primiano Tucci (use gerrit)
6 years, 4 months ago (2014-08-08 11:29:07 UTC) #29
Message was sent while issue was closed.
Relanded in https://codereview.chromium.org/440273002

Powered by Google App Engine
This is Rietveld 408576698