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

Issue 61623008: If the destination directory doesn't contain the desired repo, delete it (Closed)

Created:
7 years, 1 month ago by borenet
Modified:
6 years, 11 months ago
CC:
chromium-reviews, Dirk Pranke, cmp-cc_chromium.org, M-A Ruel, iannucci+depot_tools_chromium.org, ilevy-cc_chromium.org, reed1
Base URL:
https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Visibility:
Public.

Description

If the destination directory doesn't contain the desired repo, delete it Basic functionality - this may not be in quite the right place. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=245404

Patch Set 1 #

Patch Set 2 : Rebase #

Total comments: 16

Patch Set 3 : Add prompt when used in interactive mode without --force, address comments #

Total comments: 7

Patch Set 4 : Use raw_input(prompt) instead of print #

Patch Set 5 : Remove print() #

Patch Set 6 : Error out if the conflicting directory isn't deleted. #

Total comments: 10

Patch Set 7 : Address GetRemoteURL comments #

Total comments: 8

Patch Set 8 : Remove URL rewriting #

Patch Set 9 : Remove no-longer-used function #

Total comments: 4

Patch Set 10 : Address comments from meeting #

Patch Set 11 : Address comments from meeting (first upload failed) #

Total comments: 8

Patch Set 12 : Guard with CHROME_HEADLESS #

Patch Set 13 : Guard with CHROME_HEADLESS (retry upload) #

Patch Set 14 : Guard with CHROME_HEADLESS (retry #2) #

Patch Set 15 : Rebase, fix conflicts, remove unused variable #

Total comments: 16

Patch Set 16 : Move some logic into functions #

Patch Set 17 : Move some logic into functions (retry upload) #

Total comments: 13

Patch Set 18 : Address maruel's comments #

Patch Set 19 : Fix failing tests #

Total comments: 8

Patch Set 20 : Fix line length #

Unified diffs Side-by-side diffs Delta from patch set Stats (+184 lines, -160 lines) Patch
M gclient.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +34 lines, -0 lines 0 comments Download
M gclient_scm.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 8 chunks +15 lines, -109 lines 0 comments Download
M tests/gclient_scm_test.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 15 chunks +56 lines, -48 lines 0 comments Download
M tests/gclient_smoketest.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 5 chunks +79 lines, -3 lines 0 comments Download

Messages

Total messages: 45 (0 generated)
borenet
https://codereview.chromium.org/61623008/diff/20001/gclient.py File gclient.py (right): https://codereview.chromium.org/61623008/diff/20001/gclient.py#newcode644 gclient.py:644: This may not be in the right place. Any ...
7 years, 1 month ago (2013-11-12 19:33:37 UTC) #1
iannucci
This looks good to me, though I'm still thinking through the potential impact on bots/developers. ...
7 years, 1 month ago (2013-11-13 06:26:30 UTC) #2
borenet
Uploaded patch set 3. https://codereview.chromium.org/61623008/diff/20001/gclient.py File gclient.py (right): https://codereview.chromium.org/61623008/diff/20001/gclient.py#newcode644 gclient.py:644: On 2013/11/13 06:26:30, iannucci wrote: ...
7 years, 1 month ago (2013-11-13 19:12:24 UTC) #3
iannucci
https://codereview.chromium.org/61623008/diff/80001/gclient.py File gclient.py (right): https://codereview.chromium.org/61623008/diff/80001/gclient.py#newcode662 gclient.py:662: usr_input = raw_input() raw_input() takes a prompt, which would ...
7 years, 1 month ago (2013-11-14 07:38:15 UTC) #4
borenet
Uploaded patch set 5. https://codereview.chromium.org/61623008/diff/80001/gclient.py File gclient.py (right): https://codereview.chromium.org/61623008/diff/80001/gclient.py#newcode662 gclient.py:662: usr_input = raw_input() On 2013/11/14 ...
7 years, 1 month ago (2013-11-14 18:31:21 UTC) #5
iannucci
https://codereview.chromium.org/61623008/diff/80001/gclient.py File gclient.py (right): https://codereview.chromium.org/61623008/diff/80001/gclient.py#newcode673 gclient.py:673: On 2013/11/14 18:31:21, borenet wrote: > On 2013/11/14 07:38:15, ...
7 years, 1 month ago (2013-11-14 18:45:25 UTC) #6
borenet
Uploaded patch set 6. https://codereview.chromium.org/61623008/diff/80001/gclient.py File gclient.py (right): https://codereview.chromium.org/61623008/diff/80001/gclient.py#newcode673 gclient.py:673: On 2013/11/14 18:45:25, iannucci wrote: ...
7 years, 1 month ago (2013-11-15 13:46:47 UTC) #7
iannucci
Sorry i didn't look closely at the remote url methods before :( https://codereview.chromium.org/61623008/diff/260001/gclient.py File gclient.py ...
7 years, 1 month ago (2013-11-15 18:25:25 UTC) #8
borenet
Sorry for the delay - I've been preoccupied by the office move. https://codereview.chromium.org/61623008/diff/260001/gclient.py File gclient.py ...
7 years ago (2013-11-25 13:55:41 UTC) #9
borenet
Friendly ping
7 years ago (2013-12-02 17:42:11 UTC) #10
iannucci
lgtm. Isaac/cmp: Do you think this would be worth manually pushing to bots on a ...
7 years ago (2013-12-02 19:43:55 UTC) #11
cmp
On 2013/12/02 19:43:55, iannucci wrote: > lgtm. > > Isaac/cmp: Do you think this would ...
7 years ago (2013-12-03 15:04:39 UTC) #12
Isaac (away)
https://chromiumcodereview.appspot.com/61623008/diff/20001/gclient.py File gclient.py (right): https://chromiumcodereview.appspot.com/61623008/diff/20001/gclient.py#newcode655 gclient.py:655: gclient_utils.rmtree(dest_dir) On 2013/11/12 19:33:37, borenet wrote: > Alternatively, we ...
7 years ago (2013-12-03 18:25:04 UTC) #13
Isaac (away)
https://chromiumcodereview.appspot.com/61623008/diff/20001/gclient.py File gclient.py (right): https://chromiumcodereview.appspot.com/61623008/diff/20001/gclient.py#newcode655 gclient.py:655: gclient_utils.rmtree(dest_dir) Ignore this comment, it's stale.
7 years ago (2013-12-03 18:25:49 UTC) #14
borenet
If we still have any high-level concerns or arguments against this approach, let's please meet ...
7 years ago (2013-12-03 21:12:02 UTC) #15
Isaac (away)
> Apologies for my lack of familiarity with gclient, but how would using root dirs ...
7 years ago (2013-12-04 03:29:19 UTC) #16
borenet
https://codereview.chromium.org/61623008/diff/320001/gclient_scm.py File gclient_scm.py (right): https://codereview.chromium.org/61623008/diff/320001/gclient_scm.py#newcode392 gclient_scm.py:392: if (current_url != url and On 2013/12/04 03:29:19, Isaac ...
7 years ago (2013-12-04 16:58:41 UTC) #17
borenet
Uploaded patch sets 6 and 7 to delete the URL rewriting logic. Isaac tells me ...
7 years ago (2013-12-05 21:49:23 UTC) #18
Isaac (away)
https://chromiumcodereview.appspot.com/61623008/diff/360001/gclient.py File gclient.py (right): https://chromiumcodereview.appspot.com/61623008/diff/360001/gclient.py#newcode650 gclient.py:650: url, _ = gclient_utils.SplitUrlRevision(parsed_url) make sure this has substitions ...
7 years ago (2013-12-09 21:45:58 UTC) #19
borenet
A couple of notes: For svn, syncing backwards across the Skia DEPS change only works ...
7 years ago (2013-12-10 18:48:26 UTC) #20
Isaac (away)
> For svn, syncing backwards across the Skia DEPS change only works with --force. > ...
7 years ago (2013-12-11 03:17:32 UTC) #21
borenet
Uploaded patch sets 12-14. Robbie, can you comment on the svn url rewriting? https://codereview.chromium.org/61623008/diff/400001/gclient.py File ...
7 years ago (2013-12-11 20:42:19 UTC) #22
borenet
Friendly ping. Robbie, any comments on the svn URL rewriting?
7 years ago (2013-12-13 16:41:28 UTC) #23
borenet
ping
6 years, 11 months ago (2014-01-07 20:27:44 UTC) #24
iannucci
omg, sorry I thought I had published this weeks ago :( lgtm https://chromiumcodereview.appspot.com/61623008/diff/400001/gclient_scm.py File gclient_scm.py ...
6 years, 11 months ago (2014-01-07 22:23:27 UTC) #25
borenet
Thanks Robbie. Uploaded patch set 15. Marc-Antoine, this change has a couple of conflicts with ...
6 years, 11 months ago (2014-01-08 18:25:32 UTC) #26
M-A Ruel
https://codereview.chromium.org/61623008/diff/500001/gclient.py File gclient.py (right): https://codereview.chromium.org/61623008/diff/500001/gclient.py#newcode678 gclient.py:678: socket.gethostname() in ('vm859-m1', 'build1-m1', 'vm630-m1') and Extract this in ...
6 years, 11 months ago (2014-01-10 16:41:47 UTC) #27
borenet
Uploaded patch set 17. https://codereview.chromium.org/61623008/diff/500001/gclient.py File gclient.py (right): https://codereview.chromium.org/61623008/diff/500001/gclient.py#newcode678 gclient.py:678: socket.gethostname() in ('vm859-m1', 'build1-m1', 'vm630-m1') ...
6 years, 11 months ago (2014-01-10 19:27:22 UTC) #28
M-A Ruel
+ Morrita for why mercurial checkout should be ignored. I don't know why. https://codereview.chromium.org/61623008/diff/500001/gclient.py File ...
6 years, 11 months ago (2014-01-13 17:31:38 UTC) #29
borenet
Uploaded patch set 18. There are some failing tests which I will address if the ...
6 years, 11 months ago (2014-01-13 18:17:56 UTC) #30
M-A Ruel
lgtm but please try to delete enable_deletion_of_conflicting_checkouts() ASAP, likely in less than 72 hours.
6 years, 11 months ago (2014-01-14 20:09:49 UTC) #31
borenet
On 2014/01/14 20:09:49, M-A Ruel wrote: > lgtm but please try to delete enable_deletion_of_conflicting_checkouts() ASAP, ...
6 years, 11 months ago (2014-01-14 20:16:34 UTC) #32
borenet
Uploaded patch set 19 to fix the failing tests. They failed because: - We're no ...
6 years, 11 months ago (2014-01-14 21:49:44 UTC) #33
iannucci
https://codereview.chromium.org/61623008/diff/940001/tests/gclient_smoketest.py File tests/gclient_smoketest.py (right): https://codereview.chromium.org/61623008/diff/940001/tests/gclient_smoketest.py#newcode1350 tests/gclient_smoketest.py:1350: socket.gethostname() in ('vm859-m1', 'build1-m1', 'vm630-m1')): On 2014/01/14 21:49:45, borenet ...
6 years, 11 months ago (2014-01-14 22:40:01 UTC) #34
M-A Ruel
lgtm https://codereview.chromium.org/61623008/diff/940001/gclient.py File gclient.py (right): https://codereview.chromium.org/61623008/diff/940001/gclient.py#newcode697 gclient.py:697: ' %s' % (dest_dir, url, dest_dir)) BTW in ...
6 years, 11 months ago (2014-01-14 22:46:08 UTC) #35
borenet
https://codereview.chromium.org/61623008/diff/940001/tests/gclient_smoketest.py File tests/gclient_smoketest.py (right): https://codereview.chromium.org/61623008/diff/940001/tests/gclient_smoketest.py#newcode1350 tests/gclient_smoketest.py:1350: socket.gethostname() in ('vm859-m1', 'build1-m1', 'vm630-m1')): On 2014/01/14 22:46:09, M-A ...
6 years, 11 months ago (2014-01-15 13:53:26 UTC) #36
iannucci
Yeah, ok, LGTM and then when it's confirmed to work, we'll remove the hacks
6 years, 11 months ago (2014-01-15 20:36:26 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/borenet@google.com/61623008/940001
6 years, 11 months ago (2014-01-17 01:02:24 UTC) #38
commit-bot: I haz the power
Presubmit check for 61623008-940001 failed and returned exit status 1. Running presubmit commit checks ...
6 years, 11 months ago (2014-01-17 01:04:21 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/borenet@google.com/61623008/1060001
6 years, 11 months ago (2014-01-17 01:07:05 UTC) #40
commit-bot: I haz the power
Change committed as 245404
6 years, 11 months ago (2014-01-17 01:08:41 UTC) #41
Nico
A revert of this CL has been created in https://codereview.chromium.org/141633005/ by thakis@chromium.org. The reason for ...
6 years, 11 months ago (2014-01-17 16:55:11 UTC) #42
iannucci
On 2014/01/17 16:55:11, Nico wrote: > A revert of this CL has been created in ...
6 years, 11 months ago (2014-01-17 19:30:45 UTC) #43
borenet
On 2014/01/17 19:30:45, iannucci wrote: > On 2014/01/17 16:55:11, Nico wrote: > > A revert ...
6 years, 11 months ago (2014-01-17 19:33:11 UTC) #44
borenet
6 years, 11 months ago (2014-01-17 20:19:34 UTC) #45
Message was sent while issue was closed.
On 2014/01/17 19:33:11, borenet wrote:
> On 2014/01/17 19:30:45, iannucci wrote:
> > On 2014/01/17 16:55:11, Nico wrote:
> > > A revert of this CL has been created in
> > > https://codereview.chromium.org/141633005/ by mailto:thakis@chromium.org.
> > > 
> > > The reason for reverting is: This breaks `gclient sync` for me. Before
this
> > > patch:
> > > ________ found .git directory; skipping src
> > > 
> > > After this patch:
> > > Error: 1> Can't update/checkout /Volumes/MacintoshHD2/src/chrome-git/src
if
> an
> > > unversioned directory is present. Delete the directory and try again.
> > > .
> > 
> > Hm, interesting... src isn't in your .gclient? Hunh?
> > 
> > How did you set up your checkout?
> 
> This looks to be a problem with all git-svn checkouts.  GetRemoteURL returns
> None in these cases, and we're no longer returning early when we find an
> unexpected .git directory, so gclient thinks the directory is unversioned. 
I'm
> working on a fix now.

Uploaded CL to re-land + fix: https://codereview.chromium.org/131743022/

Powered by Google App Engine
This is Rietveld 408576698