You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openoffice.apache.org by eric b <er...@free.fr> on 2011/08/19 08:21:31 UTC

A point on the OOo code

Hi,


My starting point was : I'm used to the OOo source code, but I do not  
know how to retrieve an old cws. In fact, I don't know at all what do ..

We suppose that I currently got an hg blob, containing until  
DEV300_m93 (which is sufficient for my needs / tests). Add that I  
know how to extract a milestone, compile it, and create diffs.


Q1 : is it possible to explain a dummy like me :

- how to download the current code (the OOo milestone we'll take as  
starting point), using svn  (only the instruction with the right URL  
is ok for me)

Note : even if the tree is not complete, but what is the command, or  
what will be the command  ?

Q2 : how to connect the hg code to the svn one ?

Q3 : how to retrieve an old cws and extract the diff ?  I read the  
wiki, and found nothing usefull on the mercurial side, and be able to  
retrieve something in the history is essential.


Action Item : I'm volunteer to make a summary and add the information  
on the Apache OpenOffice.org wiki.


Thanks in advance for any help !
Eric

-- 
qɔᴉɹə
Education Project:
http://wiki.services.openoffice.org/wiki/Education_Project
Projet OOo4Kids : http://wiki.ooo4kids.org/index.php/Main_Page
L'association EducOOo : http://www.educoo.org
Blog : http://eric.bachard.org/news






Re: A point on the OOo code

Posted by Mathias Bauer <Ma...@gmx.net>.
On 19.08.2011 08:21, eric b wrote:

> Hi,
> 
> 
> My starting point was : I'm used to the OOo source code, but I do not  
> know how to retrieve an old cws. In fact, I don't know at all what do ..
> 
> We suppose that I currently got an hg blob, containing until  
> DEV300_m93 (which is sufficient for my needs / tests). Add that I  
> know how to extract a milestone, compile it, and create diffs.
> 
> 
> Q1 : is it possible to explain a dummy like me :
> 
> - how to download the current code (the OOo milestone we'll take as  
> starting point), using svn  (only the instruction with the right URL  
> is ok for me)
> 
> Note : even if the tree is not complete, but what is the command, or  
> what will be the command  ?
> 
> Q2 : how to connect the hg code to the svn one ?
> 
> Q3 : how to retrieve an old cws and extract the diff ?  I read the  
> wiki, and found nothing usefull on the mercurial side, and be able to  
> retrieve something in the history is essential.

I would wait until the first svn import is done and the source can be
retrieved via svn.

Working with cws is possible in several ways, my plan to bring my
existing cws to Apache is as follows:

I use the cws hg repo I still have on my hard disk (I hope that we soon
can move them all to Apache-extras). If possible, I will try to convert
the cws commits (get a list of them by using "hg outgoing" against a
trunk repo) into an "mq" patch queue. If that fails because I already
had merge commits in my cws, I will just take all other change sets,
create diffs from them using "hg diff -c" and take these as patch queue.

Then I try to apply all patches manually to an OOO340_m1 branch,
eventually adjusting the change sets in case of conflicts. The result
should be a patch queue that - when applied to OOO340_m1 - gives what
the cws contained. This will require some code reviewing and testing
after applying each patch, but IMHO we have to review the existing cws
anyway so that this isn't much more work than necessary.

Now I can create a new svn branch, apply the patches one by one (this
way I preserve the full cws history in svn!) and do the merge in svn
once the branch/cws is considered worth an integration.

Regards,
Mathias

Re: A point on the OOo code

Posted by eric b <er...@free.fr>.
Hi Michael,

Le 19 août 11 à 12:36, Michael Stahl a écrit :

> On 19.08.2011 08:21, eric b wrote:
>> Hi,
>>
>>
>> My starting point was : I'm used to the OOo source code, but I do not
>> know how to retrieve an old cws. In fact, I don't know at all what  
>> do ..
>>
>> We suppose that I currently got an hg blob, containing until  
>> DEV300_m93
>> (which is sufficient for my needs / tests). Add that I know how to
>> extract a milestone, compile it, and create diffs.
>>
>>
>> Q1 : is it possible to explain a dummy like me :
>>
>> - how to download the current code (the OOo milestone we'll take as
>> starting point), using svn (only the instruction with the right  
>> URL is
>> ok for me)
>>
>> Note : even if the tree is not complete, but what is the command, or
>> what will be the command ?
>
> don't know (AFAIK code is not yet imported?)


I followed the instructions I found : http://incubator.apache.org/ 
openofficeorg/source.html

It is written svn co ... ooo

Well, this command line indeed dowloads an ooo directory (change the  
name if you want another one), but at the end, there are only several  
scripts + some ext files inside :

truc:~/Desktop/ooo/tools/dev ericb$ ls
cws-list.txt            fetch-all-web.sh        single-hg.sh
fetch-all-cws.sh        kenai2website.sh        web-list.txt


cws-lists.txt contains a list of child workspaces.

There is no sb111 inside, so does it mean it was already integrated ?  
fetch-all-cws.sh does probably download existing cws mentionned in  
the cws-list.txt file.

Now, I'm maybe wondering about the OOO340 tree, but it does not exist  
yet ?



>
>> Q2 : how to connect the hg code to the svn one ?
>
> what do you mean by "connect"?

Link ? Means, use one DEV300 milestone extracted form the hg blob,  
the svn one, and check for diffs changes ..and so on ?



> how to migrate the not-yet-integrated code in CWSes?
>

Yes, e.g.


>> Q3 : how to retrieve an old cws and extract the diff ? I read the  
>> wiki,
>> and found nothing usefull on the mercurial side, and be able to  
>> retrieve
>> something in the history is essential.
>
> i always do something like "hg log | less" and then search for the  
> CWS name; the first commit that is found is usually the merge  
> commit that integrates the CWS into the master.
>
> you can get all the changes that were made in the CWS by doing a  
> "hg diff" of this commit against the parent that corresponds to the  
> master (in almost all cases this is the first parent).
>
> for example for sb111 the integration merge is 019ac597e5e0.


Impotant information, thanks a lot !


BTW:  where is Opengrok ( http://svn.service.openoffice.org/ 
opengrok ? ) And what happened to http://hg.services.openoffice.org ?

We'll need a new Opengrok too.


>
> the -c option to diff uses the first parent as base revision, so  
> you can get all of the changes introduced by the CWS by "hg diff -c  
> 019ac597e5e0".
>

I'll try to extract the whole changeset (I did that zillion of times  
previously)



> if it's the second parent then i guess you would need something  
> like "hg diff -r $second_parent_id -r $child_id".
>

Ok.

> if you want to see the individual commits that were introduced by  
> the CWS then it's a bit more complicated; at OOo we have always  
> used the convention to put the CWS name into the commit message, so  
> the easiest way is to just search in the log for the CWS name, that  
> should find all commits.
>


Ineed, should be enough (imho)


> there are also GUI tools that make this kind of thing more  
> convenient; i've only used "hgview" so far, it's a bit slow on our  
> big repo and eats lots of RAM but it is very useful.
> http://www.logilab.org/project/hgview


Interesting : I'll give it a try too :-)



Thank you very much for the all very good information you provided me !

Eric

-- 
qɔᴉɹə
Education Project:
http://wiki.services.openoffice.org/wiki/Education_Project
Projet OOo4Kids : http://wiki.ooo4kids.org/index.php/Main_Page
L'association EducOOo : http://www.educoo.org
Blog : http://eric.bachard.org/news






Re: A point on the OOo code

Posted by Michael Stahl <ms...@openoffice.org>.
On 19.08.2011 08:21, eric b wrote:
> Hi,
>
>
> My starting point was : I'm used to the OOo source code, but I do not
> know how to retrieve an old cws. In fact, I don't know at all what do ..
>
> We suppose that I currently got an hg blob, containing until DEV300_m93
> (which is sufficient for my needs / tests). Add that I know how to
> extract a milestone, compile it, and create diffs.
>
>
> Q1 : is it possible to explain a dummy like me :
>
> - how to download the current code (the OOo milestone we'll take as
> starting point), using svn (only the instruction with the right URL is
> ok for me)
>
> Note : even if the tree is not complete, but what is the command, or
> what will be the command ?

don't know (AFAIK code is not yet imported?)

> Q2 : how to connect the hg code to the svn one ?

what do you mean by "connect"?
how to migrate the not-yet-integrated code in CWSes?

> Q3 : how to retrieve an old cws and extract the diff ? I read the wiki,
> and found nothing usefull on the mercurial side, and be able to retrieve
> something in the history is essential.

i always do something like "hg log | less" and then search for the CWS 
name; the first commit that is found is usually the merge commit that 
integrates the CWS into the master.

you can get all the changes that were made in the CWS by doing a "hg 
diff" of this commit against the parent that corresponds to the master 
(in almost all cases this is the first parent).

for example for sb111 the integration merge is 019ac597e5e0.

the -c option to diff uses the first parent as base revision, so you can 
get all of the changes introduced by the CWS by "hg diff -c 019ac597e5e0".

if it's the second parent then i guess you would need something like "hg 
diff -r $second_parent_id -r $child_id".

if you want to see the individual commits that were introduced by the 
CWS then it's a bit more complicated; at OOo we have always used the 
convention to put the CWS name into the commit message, so the easiest 
way is to just search in the log for the CWS name, that should find all 
commits.

there are also GUI tools that make this kind of thing more convenient; 
i've only used "hgview" so far, it's a bit slow on our big repo and eats 
lots of RAM but it is very useful.
http://www.logilab.org/project/hgview

> Action Item : I'm volunteer to make a summary and add the information on
> the Apache OpenOffice.org wiki.
>
>
> Thanks in advance for any help !
> Eric
>