PSA: fetch chromium now uses git unmanaged mode

Showing 1-12 of 12 messages
PSA: fetch chromium now uses git unmanaged mode Paweł Hajdan, Jr. 8/22/13 4:03 PM
TL;DR: 'fetch chromium' now uses git unmanaged mode

If you’re using a Chromium git checkout using instructions from https://code.google.com/p/chromium/wiki/UsingGit, this change may affect you. There are important changes related to having “managed” and “unmanaged” checkout modes.

In the Chrome Infrastructure team we’ve come to the conclusion that managed mode was actually a bad idea. It was supposed to be an easier workflow for people new to git, but it turned out to be full of surprising behaviors. The unmanaged mode is actually more consistent and predictable, and the document mentioned above has been updated to strongly recommend unmanaged mode.

The main difference is that with the managed mode local branches track local master branch instead of origin/master, and gclient “manages” the branches so that they stay in sync. In practice this leads to a situation where there are two master branches (local master and origin/master) that go out of sync and prevent further uploads/commits. With the unmanaged mode you always have only one master: origin/master. The local master still exists but is not treated in any special way by the tools.

The change I just made today is that the “fetch chromium” command will use the unmanaged mode. I also recommend everyone using managed mode to switch to unmanaged mode by editing the .gclient file and changing “managed”: True to “managed”: False.

Paweł
Re: [chromium-dev] PSA: fetch chromium now uses git unmanaged mode Jeffrey Yasskin 8/22/13 4:06 PM
In unmanaged mode, is the instruction at
https://code.google.com/p/chromium/wiki/UsingGit#Updating_the_code
still true? If not, could you change it until it is?
> --
> --
> Chromium Developers mailing list: chromi...@chromium.org
> View archives, change email options, or unsubscribe:
> http://groups.google.com/a/chromium.org/group/chromium-dev
Re: [chromium-dev] PSA: fetch chromium now uses git unmanaged mode Paweł Hajdan, Jr. 8/22/13 5:07 PM
AFAIK the instructions are correct. Here's an example of my gclient sync with unmanaged mode on a local branch:

D:\src\chromium-git\src>gclient sync

_____ src at refs/heads/master
Error: 1> Background task requires input. Rerun gclient with --jobs=1 so that
1> interaction is possible.

D:\src\chromium-git\src>gclient sync --jobs=1

_____ src at refs/heads/master
Cannot fast-forward merge, attempt to rebase? (y)es / (q)uit / (s)kip :

It actually updated origin/master and rebased the current branch on top of it (and also synced DEPS).

Paweł
Re: [chromium-dev] PSA: fetch chromium now uses git unmanaged mode Adam Barth 8/22/13 7:10 PM
Does this change affect "fetch blink" as well?

Adam

Re: [chromium-dev] PSA: fetch chromium now uses git unmanaged mode Paweł Hajdan, Jr. 8/23/13 2:49 PM
Yes I think it does - "fetch blink" appears to also use chromium recipe.

I'm going to send a similar PSA to blink-dev.

Paweł
Re: [chromium-dev] PSA: fetch chromium now uses git unmanaged mode Paweł Hajdan, Jr. 8/23/13 6:04 PM
Actually Jeffrey, my previous test was invalid (it was done on a managed checkout by mistake).

With unmanaged checkout you need git pull --rebase or just git pull and then gclient sync.

I've updated the docs to reflect that. There may be further updates.

If there is more discussion about the instructions and getting them right, please fork a separate thread - this was a PSA, you can continue using managed mode for now, just the default for new checkouts has been switched.

I appreciate how these announcements have been received and I'm working on your questions and feedback.

Paweł
Re: [chromium-dev] PSA: fetch chromium now uses git unmanaged mode Jeffrey Yasskin 8/25/13 5:03 PM
On Fri, Aug 23, 2013 at 6:04 PM, Paweł Hajdan, Jr.
<phajd...@chromium.org> wrote:
> Actually Jeffrey, my previous test was invalid (it was done on a managed
> checkout by mistake).
>
> With unmanaged checkout you need git pull --rebase or just git pull and then
> gclient sync.
>
> I've updated the docs to reflect that. There may be further updates.

Thanks for double-checking. Before making this sort of change in the
future, could you and the rest of the infrastructure team go over the
instructions and update them to match the new state of the world?
Re: [chromium-dev] PSA: fetch chromium now uses git unmanaged mode Paweł Hajdan, Jr. 8/26/13 10:34 AM
I agree this could be better reviewed, will remember to do that.

Thank you for feedback.

Paweł
Re: [chromium-dev] PSA: fetch chromium now uses git unmanaged mode Daniel Bratell 8/28/13 3:00 AM
Den 2013-08-23 01:03:54 skrev Paweł Hajdan, Jr. <phajd...@chromium.org>:

> TL;DR: 'fetch chromium' now uses git unmanaged mode

Which I like. The managed gclient did a little too much magic for my taste.

But there are still places in the documentation that needs updating.

http://code.google.com/p/chromium/wiki/UsingGit#Managing_src.git_yourself

says:

"WARNING: The following workflow is UNSUPPORTED. If you need support, do  
not use it."

And doing what it says about keeping in sync:

gclient recurse -s git git fetch --all

will result in python errors (at least for me on my Windows machine; might  
be something I've broken locally).

/Daniel
Re: [chromium-dev] PSA: fetch chromium now uses git unmanaged mode Paweł Hajdan, Jr. 12/2/13 5:05 PM
Just to close the loop here, new instructions are at https://sites.google.com/a/chromium.org/dev/developers/how-tos/get-the-code

Please report any inaccuracies.

Paweł




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

Re: [chromium-dev] PSA: fetch chromium now uses git unmanaged mode Thiago Farina 12/6/13 7:33 PM
Pawel,

My blink checkout does not sync anymore.

my .gclient looks like:

solutions = [
{
        u'managed': True,
        u'name': u'src',
        u'url': u'https://chromium.googlesource.com/chromium/src.git',
        u'custom_deps': {},
        u'deps_file': u'.DEPS.git',
        u'safesync_url': u'',
        u'custom_vars': {u'webkit_rev': u''}
}]

My dumb script that I use to sync does just:

$ gclient sync --reset --manually_grab_svn_rev --force
--delete_unversioned_trees

It is stuck at:

________ running 'git reset --hard HEAD' in '/home/tfarina/blink/src'
HEAD is now at 357af72 SVN changes up to revision 239063

--
Thiago
Re: [chromium-dev] PSA: fetch chromium now uses git unmanaged mode Thiago Farina 12/6/13 7:46 PM
I followed the instructions:

Switched from Managed to Unmanaged mode (sigh! will have to train my
memory muscles again and edit my toy scripts).

cd "$CHROMIUM_DIR" && git pull origin master
cd "$BLINK_DIR" && git pull origin master
gclient sync

It is syncing now. I will report back if something else appears.
--
Thiago