List:Internals« Previous MessageNext Message »
From:Guilhem Bichot Date:May 24 2010 8:45am
Subject:(followup) Important for users of Bazaar branches of MySQL Server code
from Launchpad
View as plain text  
Hello,

Please, read this email if you are using Bazaar branches of MySQL Server 
code located on Launchpad (at https://code.launchpad.net/mysql-server ).

Continuation of my email of yesterday sent to the same lists.

It seems that Launchpad has finished converting at least the main 
branches (mysql-4.1, mysql-5.0, mysql-5.1, mysql-trunk, mysql-next-mr).

So now there is a format mismatch between any local branch you may have 
on your computer (likely they are in format 1.9 or 1.14) and Launchpad's 
  branches (now in format 2a). You will not be able to "bzr pull" from 
Launchpad into your local branches: this will complain about "different 
rich-root support" (format-2a revisions cannot be pulled into 
older-format branches, there is an incompatibility).

The simple solution is to follow the steps below.

First make sure to have installed bzr version 2.x.

** Case A - you are NOT developing MySQL code **

i.e. you only use branches at https://code.launchpad.net/mysql-server to 
download and browse code; your locally copied branches don't contain 
anything which isn't available in the ones on Launchpad
- Delete those old branches
- If you were using a shared repository, delete this shared repository, 
initialize a new one (let's call it /data/new):
  bzr init-repo --2a /data/new
  cd /data/new
- Download converted branches from Launchpad, for example MySQL 5.1:
  bzr branch lp:mysql-server/5.1 mysql-5.1

** Case B - you are developing MySQL code **

In your local branches you have work which you need to save:
- Initialize a new shared repository:
  bzr init-repo --2a /data/new
  cd /data/new
- Assuming your work is based on trunk, download a converted trunk 
branch from Launchpad:
  bzr branch lp:mysql-server/trunk mysql-trunk
- Search your old repository (let's call it /data/old) for your work to 
be saved, and port this work to the new repository; assuming this work 
in a branch named myworkbranch:
  bzr branch /data/old/myworkbranch /data/new
this will port all committed revisions. But maybe the work is also in 
the form of uncommitted changes? Detect them with:
  bzr diff /data/old/myworkbranch
and if there is some diff, port it with "patch".
Note, "bzr diff" does not show uncommitted new files which haven't been 
"bzr add"-ed yet. Find those files with
  bzr status /data/old/myworkbranch
in the "unknown" category, and port them too by copying.

Question: why did we download trunk above? I had it locally already!
Answer: when you branch myworkbranch into /data/new, all revisions of 
myworkbranch not yet in /data/new are propagated to /data/new and thus 
need to be converted to format 2a; this conversion's time is 
proportional to the number of revisions to convert. If /data/new is 
empty at that moment, all revisions of myworkbranch (the entire MySQL 
history) need to be propagated and are going to be converted, taking 
roughly a day. That's why we first branch trunk from Launchpad:
- Launchpad has trunk in 2a so this download does no conversion so is fast
- it injects trunk revisions into /data/new; when you then branch 
myworkbranch into /data/new, only revisions which are in myworkbranch 
and not in trunk have to be converted (the ones in trunk are already in 
/data/new's shared repository), which means few revisions, which convert 
fast (minutes).

That's it. Thanks for reading. Ask if you have trouble.

-- 
Mr. Guilhem Bichot <guilhem@stripped>
Sun Microsystems / MySQL, Lead Software Engineer
Bordeaux, France
www.sun.com / www.mysql.com
Thread
(followup) Important for users of Bazaar branches of MySQL Server codefrom LaunchpadGuilhem Bichot24 May