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

Issue 497053002: Use a regex instead of shlex.split() to get remote url (Closed)

Created:
6 years, 4 months ago by hinoka
Modified:
6 years, 4 months ago
CC:
chromium-reviews, Dirk Pranke, cmp-cc_chromium.org, iannucci+depot_tools_chromium.org, ilevy-cc_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Project:
tools
Visibility:
Public.

Description

Use a regex instead of shlex.split() to get remote url shlex.spit(), in addition to doing str.split(' '), also strips out '\\' from windows paths, which causes the cache_dir check to fail and Gclient to think that we're not in cache_dir mode even if we are. Instead of using shlex to strip data from a stdout log, I think regex is more suited for this job. BUG=405973 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=291446

Patch Set 1 #

Patch Set 2 : s/re.match/re.search/ #

Total comments: 1

Patch Set 3 : Failing example #

Patch Set 4 : Passing example #

Total comments: 1

Patch Set 5 : moar tests #

Patch Set 6 : Fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+37 lines, -7 lines) Patch
M gclient_scm.py View 1 2 3 4 5 3 chunks +10 lines, -7 lines 0 comments Download
M tests/gclient_scm_test.py View 1 2 3 4 1 chunk +27 lines, -0 lines 0 comments Download

Messages

Total messages: 20 (0 generated)
Ryan Tseng
6 years, 4 months ago (2014-08-22 12:31:23 UTC) #1
tandrii(chromium)
lgtm
6 years, 4 months ago (2014-08-22 12:46:15 UTC) #2
kjellander_chromium
I guess it would be a good idea to add a test for GetActualRemoteURL? I ...
6 years, 4 months ago (2014-08-22 13:24:19 UTC) #3
iannucci
Also agree that this should have a simple unittest to repro the current problem and ...
6 years, 4 months ago (2014-08-22 16:59:00 UTC) #4
Ryan Tseng
About waistdeep in gclient_scm_tests.py right now, tests coming soon :)
6 years, 4 months ago (2014-08-22 17:06:42 UTC) #5
Ryan Tseng
So for the record I tested this on the failing windows bot and it fixes ...
6 years, 4 months ago (2014-08-22 17:17:17 UTC) #6
iannucci
On 2014/08/22 17:17:17, Ryan T. (EMEA time) wrote: > So for the record I tested ...
6 years, 4 months ago (2014-08-22 17:21:46 UTC) #7
hinoka
Added super duper simple tests, see PS3 for the emulated failure, PS4 passes.
6 years, 4 months ago (2014-08-22 17:41:08 UTC) #8
iannucci
lgtm https://codereview.chromium.org/497053002/diff/60001/tests/gclient_scm_test.py File tests/gclient_scm_test.py (right): https://codereview.chromium.org/497053002/diff/60001/tests/gclient_scm_test.py#newcode96 tests/gclient_scm_test.py:96: REMOTE_STRINGS = [('remote.origin.url E:\\foo\\bar', 'E:\\foo\\bar'), oh, can you ...
6 years, 4 months ago (2014-08-22 17:43:46 UTC) #9
iannucci
On 2014/08/22 17:43:46, iannucci wrote: > lgtm > > https://codereview.chromium.org/497053002/diff/60001/tests/gclient_scm_test.py > File tests/gclient_scm_test.py (right): > ...
6 years, 4 months ago (2014-08-22 17:45:04 UTC) #10
Ryan Tseng
On 2014/08/22 17:45:04, iannucci wrote: > On 2014/08/22 17:43:46, iannucci wrote: > > lgtm > ...
6 years, 4 months ago (2014-08-22 17:48:11 UTC) #11
iannucci
On 2014/08/22 17:48:11, Ryan T. (EMEA time) wrote: > On 2014/08/22 17:45:04, iannucci wrote: > ...
6 years, 4 months ago (2014-08-22 17:50:30 UTC) #12
Ryan Tseng
done
6 years, 4 months ago (2014-08-22 17:56:36 UTC) #13
Ryan Tseng
The CQ bit was checked by hinoka@google.com
6 years, 4 months ago (2014-08-22 17:56:47 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hinoka@chromium.org/497053002/80001
6 years, 4 months ago (2014-08-22 17:57:05 UTC) #15
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-22 17:58:59 UTC) #16
commit-bot: I haz the power
Presubmit check for 497053002-80001 failed and returned exit status 1. Running presubmit commit checks ...
6 years, 4 months ago (2014-08-22 17:59:00 UTC) #17
Ryan Tseng
The CQ bit was checked by hinoka@google.com
6 years, 4 months ago (2014-08-22 18:06:43 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hinoka@chromium.org/497053002/100001
6 years, 4 months ago (2014-08-22 18:07:01 UTC) #19
commit-bot: I haz the power
6 years, 4 months ago (2014-08-22 18:08:56 UTC) #20
Message was sent while issue was closed.
Committed patchset #6 (100001) as 291446

Powered by Google App Engine
This is Rietveld 408576698