PSA: Please update depot_tools before running gclient sync this morning

2,356 views
Skip to first unread message

Aaron Gable

unread,
Aug 25, 2014, 2:08:57 PM8/25/14
to Chromium-dev
tl;dr Please run the script `update_depot_tools` before running
`gclient sync` to avoid unnecessary re-clones of sub-repositories

Due to an interesting sequence of commits to gclient.py during the git
migration process, there is a risk that if you run 'gclient sync' with
an outdated version of gclient, it will delete some of your
sub-repository checkouts and replace them with SVN checkouts. Which
is really not the desired outcome of the git migration :)

To avoid the problem, please run `depot_tools/update_depot_tools`
before running `gclient sync`. This is a one-time issue that will
clear itself up.

Thanks,

Aaron
on behalf of Chrome Infrastructure

Albert Bodenhamer

unread,
Aug 25, 2014, 2:11:56 PM8/25/14
to aga...@chromium.org, Chromium-dev
If, hypothetically, I ran gclient sync 5 minutes before seeing this PSA, what (if anything) should I do to fix things? :-)

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.

Chris Mumford

unread,
Aug 25, 2014, 2:18:57 PM8/25/14
to chromi...@chromium.org
Ahhh - if only to have read this message three hours ago.

Nico Weber

unread,
Aug 25, 2014, 2:27:15 PM8/25/14
to Aaron Gable, Chromium-dev
I get:

Nicos-MacBook-Pro:src thakis$ update_depot_tools 
svn: E175002: Unable to connect to a repository at URL 'http://src.chromium.org/chrome/trunk/tools/depot_tools'
svn: E175002: OPTIONS of 'http://src.chromium.org/chrome/trunk/tools/depot_tools': Could not resolve hostname `src.chromium.org': Host not found (http://src.chromium.org)

…which probably means that I already was hit by the surprise svn checkout (?). How do I recover?


--

Michael Spang

unread,
Aug 25, 2014, 2:28:48 PM8/25/14
to cmum...@chromium.org, chromium-dev
Most of my team hit this issue.

It seems to me that many people do not periodically update depot_tools, but that we depend on them doing so. Is there anything we can do to address that?

I sync my chromium checkouts, but it doesn't really occur to me to sync depot_tools unless something goes wrong.

Michael



--

David Michael

unread,
Aug 25, 2014, 2:31:35 PM8/25/14
to sp...@chromium.org, cmum...@chromium.org, chromium-dev
On Mon, Aug 25, 2014 at 12:27 PM, Michael Spang <sp...@chromium.org> wrote:
Most of my team hit this issue.

It seems to me that many people do not periodically update depot_tools, but that we depend on them doing so. Is there anything we can do to address that?

I sync my chromium checkouts, but it doesn't really occur to me to sync depot_tools unless something goes wrong.

Michael
Normally, gclient automatically checks for updates before taking any action. It sounds like this is an exceptional case where the updates might do the wrong thing. I'm sure that wasn't the intent.

Stefan Zager

unread,
Aug 25, 2014, 2:31:42 PM8/25/14
to Albert Bodenhamer, aga...@chromium.org, Chromium-dev
On Mon, Aug 25, 2014 at 11:11 AM, Albert Bodenhamer
<abod...@chromium.org> wrote:
> If, hypothetically, I ran gclient sync 5 minutes before seeing this PSA,
> what (if anything) should I do to fix things? :-)

Running 'gclient sync' a second time will clear it up, but it may take
a while to re-clone the sub-repositories.

Stefan

Nico Weber

unread,
Aug 25, 2014, 2:31:50 PM8/25/14
to Michael Spang, Chris Mumford, chromium-dev
On Mon, Aug 25, 2014 at 11:27 AM, Michael Spang <sp...@chromium.org> wrote:
Most of my team hit this issue.

It seems to me that many people do not periodically update depot_tools, but that we depend on them doing so.

(depot_tools auto-updates every time you run `gclient` unless something is broken. In this case, it sounds like the autoupdate accidentally switched depot_tools back to svn. Since this has hit many folks, maybe some change could be checked in to svn depot_tools to auto-fix this?)

Stefan Zager

unread,
Aug 25, 2014, 2:33:23 PM8/25/14
to Nico Weber, Michael Spang, Chris Mumford, chromium-dev
On Mon, Aug 25, 2014 at 11:31 AM, Nico Weber <tha...@chromium.org> wrote:
> On Mon, Aug 25, 2014 at 11:27 AM, Michael Spang <sp...@chromium.org> wrote:
>>
>> Most of my team hit this issue.
>>
>> It seems to me that many people do not periodically update depot_tools,
>> but that we depend on them doing so.
>
>
> (depot_tools auto-updates every time you run `gclient` unless something is
> broken. In this case, it sounds like the autoupdate accidentally switched
> depot_tools back to svn. Since this has hit many folks, maybe some change
> could be checked in to svn depot_tools to auto-fix this?)

Yeah, we're looking at this. Obviously, depot_tools is pretty
sensitive to changes, so we want to tread carefully.

Stefan

Ryan Sleevi

unread,
Aug 25, 2014, 2:34:28 PM8/25/14
to Michael Spang, Chris Mumford, Chromium-dev

Normally depot_tools auto-updates

This PSA is because it (temporarily) broke and requires manual action. Much like the occasion clobber PSA.

Normally It Just Works.

Stefan Zager

unread,
Aug 25, 2014, 2:35:02 PM8/25/14
to Nico Weber, Aaron Gable, Chromium-dev
On Mon, Aug 25, 2014 at 11:26 AM, Nico Weber <tha...@chromium.org> wrote:
> I get:
>
> Nicos-MacBook-Pro:src thakis$ update_depot_tools
> svn: E175002: Unable to connect to a repository at URL
> 'http://src.chromium.org/chrome/trunk/tools/depot_tools'
> svn: E175002: OPTIONS of
> 'http://src.chromium.org/chrome/trunk/tools/depot_tools': Could not resolve
> hostname `src.chromium.org': Host not found (http://src.chromium.org)
>
> …which probably means that I already was hit by the surprise svn checkout
> (?). How do I recover?

$ cd depot_tools
$ git config remote.origin.url
https://chromium.googlesource.com/chromium/tools/depot_tools.git
$ git fetch origin && git checkout origin/master

Please report back to the thread if this fixes it for you.

Stefan

>
>
> On Mon, Aug 25, 2014 at 11:08 AM, Aaron Gable <aga...@chromium.org> wrote:
>>
>> tl;dr Please run the script `update_depot_tools` before running
>> `gclient sync` to avoid unnecessary re-clones of sub-repositories
>>
>> Due to an interesting sequence of commits to gclient.py during the git
>> migration process, there is a risk that if you run 'gclient sync' with
>> an outdated version of gclient, it will delete some of your
>> sub-repository checkouts and replace them with SVN checkouts. Which
>> is really not the desired outcome of the git migration :)
>>
>> To avoid the problem, please run `depot_tools/update_depot_tools`
>> before running `gclient sync`. This is a one-time issue that will
>> clear itself up.
>>
>> Thanks,
>>
>> Aaron
>> on behalf of Chrome Infrastructure
>>
>> --
>> --
>> Chromium Developers mailing list: chromi...@chromium.org
>> View archives, change email options, or unsubscribe:
>> http://groups.google.com/a/chromium.org/group/chromium-dev
>
>
> --
> --
> Chromium Developers mailing list: chromi...@chromium.org
> View archives, change email options, or unsubscribe:
> http://groups.google.com/a/chromium.org/group/chromium-dev
>

Stefan Zager

unread,
Aug 25, 2014, 2:35:49 PM8/25/14
to David Michael, Michael Spang, Chris Mumford, chromium-dev
On Mon, Aug 25, 2014 at 11:31 AM, David Michael <dmic...@chromium.org> wrote:
> On Mon, Aug 25, 2014 at 12:27 PM, Michael Spang <sp...@chromium.org> wrote:
>>
>> Most of my team hit this issue.
>>
>> It seems to me that many people do not periodically update depot_tools,
>> but that we depend on them doing so. Is there anything we can do to address
>> that?
>>
>> I sync my chromium checkouts, but it doesn't really occur to me to sync
>> depot_tools unless something goes wrong.
>>
>> Michael
>
> Normally, gclient automatically checks for updates before taking any action.
> It sounds like this is an exceptional case where the updates might do the
> wrong thing. I'm sure that wasn't the intent.

Yes, correct.

Dana Jansens

unread,
Aug 25, 2014, 2:36:38 PM8/25/14
to Stefan Zager, Nico Weber, Aaron Gable, Chromium-dev
On Mon, Aug 25, 2014 at 2:34 PM, 'Stefan Zager' via Chromium-dev <chromi...@chromium.org> wrote:
On Mon, Aug 25, 2014 at 11:26 AM, Nico Weber <tha...@chromium.org> wrote:
> I get:
>
> Nicos-MacBook-Pro:src thakis$ update_depot_tools
> svn: E175002: Unable to connect to a repository at URL
> 'http://src.chromium.org/chrome/trunk/tools/depot_tools'
> svn: E175002: OPTIONS of
> 'http://src.chromium.org/chrome/trunk/tools/depot_tools': Could not resolve
> hostname `src.chromium.org': Host not found (http://src.chromium.org)
>
> …which probably means that I already was hit by the surprise svn checkout
> (?). How do I recover?

$ cd depot_tools
$ git config remote.origin.url
https://chromium.googlesource.com/chromium/tools/depot_tools.git
$ git fetch origin && git checkout origin/master

Please report back to the thread if this fixes it for you.

My depot_tools does not have a .git, not sure what that means.

Nico Weber

unread,
Aug 25, 2014, 2:38:52 PM8/25/14
to Stefan Zager, Aaron Gable, Chromium-dev
On Mon, Aug 25, 2014 at 11:34 AM, Stefan Zager <sza...@google.com> wrote:
On Mon, Aug 25, 2014 at 11:26 AM, Nico Weber <tha...@chromium.org> wrote:
> I get:
>
> Nicos-MacBook-Pro:src thakis$ update_depot_tools
> svn: E175002: Unable to connect to a repository at URL
> 'http://src.chromium.org/chrome/trunk/tools/depot_tools'
> svn: E175002: OPTIONS of
> 'http://src.chromium.org/chrome/trunk/tools/depot_tools': Could not resolve
> hostname `src.chromium.org': Host not found (http://src.chromium.org)
>
> …which probably means that I already was hit by the surprise svn checkout
> (?). How do I recover?

$ cd depot_tools
$ git config remote.origin.url
https://chromium.googlesource.com/chromium/tools/depot_tools.git

error: could not lock config file .git/config: No such file or directory

Stefan Zager

unread,
Aug 25, 2014, 2:39:56 PM8/25/14
to Dana Jansens, Nico Weber, Aaron Gable, Chromium-dev
On Mon, Aug 25, 2014 at 11:35 AM, Dana Jansens <dan...@chromium.org> wrote:
> On Mon, Aug 25, 2014 at 2:34 PM, 'Stefan Zager' via Chromium-dev
>>
>> $ cd depot_tools
>> $ git config remote.origin.url
>> https://chromium.googlesource.com/chromium/tools/depot_tools.git
>> $ git fetch origin && git checkout origin/master
>>
>> Please report back to the thread if this fixes it for you.
>
>
> My depot_tools does not have a .git, not sure what that means.

Ay caramba, muy malo. This should fix it:

$ git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
/tmp/depot_tools
$ rm -rf /path/to/your/existing/depot_tools
$ mv /tmp/depot_tools /path/to/your/existing/

Please report back to the thread if this works.

Thanks,

Stefan

Stefan Zager

unread,
Aug 25, 2014, 2:40:54 PM8/25/14
to Nico Weber, Aaron Gable, Chromium-dev
On Mon, Aug 25, 2014 at 11:38 AM, Nico Weber <tha...@chromium.org> wrote:
> On Mon, Aug 25, 2014 at 11:34 AM, Stefan Zager <sza...@google.com> wrote:
>>
>> On Mon, Aug 25, 2014 at 11:26 AM, Nico Weber <tha...@chromium.org> wrote:
>> > I get:
>> >
>> > Nicos-MacBook-Pro:src thakis$ update_depot_tools
>> > svn: E175002: Unable to connect to a repository at URL
>> > 'http://src.chromium.org/chrome/trunk/tools/depot_tools'
>> > svn: E175002: OPTIONS of
>> > 'http://src.chromium.org/chrome/trunk/tools/depot_tools': Could not
>> > resolve
>> > hostname `src.chromium.org': Host not found (http://src.chromium.org)
>> >
>> > …which probably means that I already was hit by the surprise svn
>> > checkout
>> > (?). How do I recover?
>>
>> $ cd depot_tools
>> $ git config remote.origin.url
>> https://chromium.googlesource.com/chromium/tools/depot_tools.git
>
>
> $ git config remote.origin.url
> https://chromium.googlesource.com/chromium/tools/depot_tools.git
> error: could not lock config file .git/config: No such file or directory

Try this:

Chase Phillips

unread,
Aug 25, 2014, 2:49:25 PM8/25/14
to Stefan Zager, Nico Weber, Aaron Gable, Chromium-dev
Git-based depot_tools should be the default.  I'm not sure that we've done anything to make that explicit for any existing SVN-based depot_tools users, so +1 to converting anyone that has a SVN-based depot_tools over to a Git-based depot_tools.  The depot_tools.zip archive and depot_tools docs were updated to be Git-based 1-2+ years ago.

We probably need to modify update_depot_tools at some point to auto-convert any SVN-based depot_tools to be Git-based.


Biao She

unread,
Aug 25, 2014, 4:36:23 PM8/25/14
to c...@google.com, Stefan Zager, Nico Weber, Aaron Gable, Chromium-dev
My gclient version is 0.7 after I run update_depot_tools. But I am still seeing this error message after "gclient sync":
Error: 
The chromium code repository has migrated completely to git.
Your SVN-based checkout is now obsolete; you need to create a brand-new
git checkout by following these instructions:

http://www.chromium.org/developers/how-tos/get-the-code
I have also tried "gelient sync -R" and got the same error message. I am not sure if I update gclient successfully. It didn't show anything in the console after I ran the script. what's the expected gclient version after update?

Chase Phillips

unread,
Aug 25, 2014, 4:47:42 PM8/25/14
to Biao She, Stefan Zager, Nico Weber, Aaron Gable, Chromium-dev
gclient will be careful not to completely remove your Chromium checkout (which according to this output is SVN-based).  The Get the Code docs will tell you to run "fetch --nohooks chromium" in a new directory.  This will fetch a whole new Chromium src.git repo onto your system.

Before doing this, complete any in-progress changes.  You could also save any in-progress changes to patches, then after getting a new Chromium checkout apply the patches and continue working on them from Git.

Biao She

unread,
Aug 25, 2014, 5:47:28 PM8/25/14
to Chase Phillips, Stefan Zager, Nico Weber, Aaron Gable, Chromium-dev
I switched to git work flow a few weeks ago. The problem seems that I still have the following entry in my gclient file:
{ "name": "cros_deps",
}
Remove the entry seems to solve the gclient problem for me.

David Michael

unread,
Aug 26, 2014, 12:27:24 PM8/26/14
to bs...@chromium.org, Chase Phillips, Stefan Zager, Nico Weber, Aaron Gable, Chromium-dev
On Mon, Aug 25, 2014 at 3:47 PM, Biao She <bs...@chromium.org> wrote:
I switched to git work flow a few weeks ago. The problem seems that I still have the following entry in my gclient file:
{ "name": "cros_deps",
}
Remove the entry seems to solve the gclient problem for me.
I ran in to the same thing. Would it be possible to make the error message more specific about what part is SVN?

I've been on the git workflow for a very long time, but given the change over the weekend, I really thought I had to start over because my checkout was associated with git-svn or something.

charles quarra

unread,
Aug 26, 2014, 1:04:28 PM8/26/14
to chromi...@chromium.org

I did this, in fact I clone depot_tools again and ran update_depot_tools. Fortunately didn't do anything before reading this post.
After I ran 'gclient sync' I got these errors:



Checked out revision 1289.
WARNING: subprocess '"git" "-c" "core.deltaBaseCacheLimit=2g" "fetch" "origin" "--prune"' in /media/projects/src/media/cdm/ppapi/api failed; will retry after a short nap...
Syncing projects:  10% ( 9/88) src/media/cdm/ppapi/api

src/chrome/test/data/perf/canvas_bench (ERROR)
----------------------------------------
[0:00:00] Started.
----------------------------------------
Error: Command git remote update returned non-zero exit status 1 in /media/projects/src/chrome/test/data/perf/canvas_bench
Fetching origin

fatal: remote error: Git repository not found
error: Could not fetch origin



Warnings:
Conflicting directory /media/projects/src/breakpad/src moved to /media/projects/_bad_scm/src/breakpad/srcwjbwqd.
Conflicting directory /media/projects/src/chrome/test/data/perf/third_party/octane moved to /media/projects/_bad_scm/src/chrome/test/data/perf/third_party/octaneK9LJmG.
Conflicting directory /media/projects/src/chrome/test/data/extensions/api_test/permissions/nacl_enabled/bin moved to /media/projects/_bad_scm/src/chrome/test/data/extensions/api_test/permissions/nacl_enabled/binWTG5u_.

 
Reply all
Reply to author
Forward
0 new messages