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

Issue 289863012: Handle branch or commit refs in the url for unmanaged git solutions (Closed)

Created:
6 years, 7 months ago by Romain Pokrzywka
Modified:
6 years, 3 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
Visibility:
Public.

Description

Handle branch or commit refs in the url for unmanaged git solutions This allows having a git repo cloned on a specific branch or commit, similar to what's possible for svn solutions by specifying a url like svnrepo/branches/foo Having the possibility to check the code out on a specific branch makes the initial code checkout workflow simpler, and allows specifying all the relevant info directly in the fetch recipe, instead of having to deal with branches manually afterwards (which is the whole purpose of recipes in the first place) So with this change, I'm able to do the following in my custom fetch recipe: solution = { 'name' : 'src', 'url' : 'git@github.snei.sony.com:SNEI/chromium.git@refs/heads/custombranch', <following lines skipped> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=273675

Patch Set 1 #

Total comments: 7

Patch Set 2 : split long line, reuse deps_revision #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+184 lines, -7 lines) Patch
M gclient_scm.py View 1 2 chunks +6 lines, -6 lines 0 comments Download
M tests/gclient_scm_test.py View 2 chunks +178 lines, -1 line 1 comment Download

Messages

Total messages: 18 (1 generated)
Romain Pokrzywka
Hi Aaron & al., Thanks for the reply to my email earlier, here's the matching ...
6 years, 7 months ago (2014-05-21 20:28:24 UTC) #1
Romain Pokrzywka
On 2014/05/21 20:28:24, Romain Pokrzywka wrote: > Hi Aaron & al., > > Thanks for ...
6 years, 7 months ago (2014-05-23 16:56:15 UTC) #2
M-A Ruel
On 2014/05/23 16:56:15, Romain Pokrzywka wrote: > On 2014/05/21 20:28:24, Romain Pokrzywka wrote: > > ...
6 years, 7 months ago (2014-05-23 17:13:57 UTC) #3
Romain Pokrzywka
On 2014/05/23 17:13:57, M-A Ruel wrote: > On 2014/05/23 16:56:15, Romain Pokrzywka wrote: > > ...
6 years, 7 months ago (2014-05-23 18:00:48 UTC) #4
iannucci
https://codereview.chromium.org/289863012/diff/1/gclient_scm.py File gclient_scm.py (right): https://codereview.chromium.org/289863012/diff/1/gclient_scm.py#newcode334 gclient_scm.py:334: # Check again for a revision in case an ...
6 years, 7 months ago (2014-05-23 18:06:58 UTC) #5
iannucci
Sorry for the lag on this review, there's been a lot of interrupts this week.
6 years, 7 months ago (2014-05-23 18:07:44 UTC) #6
Romain Pokrzywka
Thanks for the comments iannucci, no worries I understand you guys have a lot to ...
6 years, 7 months ago (2014-05-23 21:15:44 UTC) #7
iannucci
https://codereview.chromium.org/289863012/diff/1/gclient_scm.py File gclient_scm.py (right): https://codereview.chromium.org/289863012/diff/1/gclient_scm.py#newcode824 gclient_scm.py:824: self._Run(['checkout', '--quiet', revision.replace('refs/heads/', '')], On 2014/05/23 21:15:45, Romain Pokrzywka ...
6 years, 7 months ago (2014-05-23 21:17:49 UTC) #8
Romain Pokrzywka
On 2014/05/23 21:17:49, iannucci wrote: > https://codereview.chromium.org/289863012/diff/1/gclient_scm.py > File gclient_scm.py (right): > > https://codereview.chromium.org/289863012/diff/1/gclient_scm.py#newcode824 > ...
6 years, 7 months ago (2014-05-23 23:30:58 UTC) #9
Romain Pokrzywka
On 2014/05/23 23:30:58, Romain Pokrzywka wrote: > On 2014/05/23 21:17:49, iannucci wrote: > > https://codereview.chromium.org/289863012/diff/1/gclient_scm.py ...
6 years, 6 months ago (2014-05-29 17:50:10 UTC) #10
iannucci
lgtm. There's no trybots for this, but CQ is enabled.
6 years, 6 months ago (2014-05-30 00:00:45 UTC) #11
iannucci
On 2014/05/30 00:00:45, iannucci wrote: > lgtm. There's no trybots for this, but CQ is ...
6 years, 6 months ago (2014-05-30 00:01:16 UTC) #12
Romain Pokrzywka
The CQ bit was checked by romain.pokrzywka@gmail.com
6 years, 6 months ago (2014-05-30 00:03:11 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/romain.pokrzywka@gmail.com/289863012/20001
6 years, 6 months ago (2014-05-30 00:04:24 UTC) #14
commit-bot: I haz the power
Change committed as 273675
6 years, 6 months ago (2014-05-30 00:06:08 UTC) #15
Romain Pokrzywka
On 2014/05/30 00:01:16, iannucci wrote: > On 2014/05/30 00:00:45, iannucci wrote: > > lgtm. There's ...
6 years, 6 months ago (2014-05-30 00:12:26 UTC) #16
Michael Moss
6 years, 3 months ago (2014-09-08 20:24:01 UTC) #18
Message was sent while issue was closed.
https://codereview.chromium.org/289863012/diff/20001/tests/gclient_scm_test.py
File tests/gclient_scm_test.py (right):

https://codereview.chromium.org/289863012/diff/20001/tests/gclient_scm_test.p...
tests/gclient_scm_test.py:1526: def testUpdateCloneOnBranchHead(self):
(Dredging up this old CL because this test is causing a failure in some code I'm
trying to add)

I don't understand the intended difference between testUpdateCloneOnBranchHead()
and testUpdateCloneOnDetachedBranch(). It looks like you expect
@refs/remotes/origin/feature to behave differently from @refs/heads/feature, but
I'm not sure why. I assume they are both meant to refer to the 'feature' branch
in the remote repo, but one is specified from the POV of the mirror
(refs/remotes/origin) and one is specified from the POV of the original
(refs/heads/). Why do you expect or want gclient to check this out detached in
one instance, but not detached in the other? I think synonyms for the same
remote should be checked out in the same way (or just treated as the same thing
in general, which is what my code tries to do).

If your intent is that 'refs/heads/feature' doesn't actually refer to the
remote, but rather to a local branch (hopefully based on that remote), well, I'm
not sure specifying local branches is something that really makes sense for DEPS
files.

Powered by Google App Engine
This is Rietveld 408576698