Help on Iceberg

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Help on Iceberg

HilaireFernandes
Hi,

I have been experimenting the contributing process for fixes. But I am
doing wrongly some steps. If I understand correctly after push a pull
request (PR) I should do a checkout of Pharo8.

This last process I did not do it. I tried yesterday but

1. Not clear from where in the UI and from which repo

2. I tried one guessed scenario and it was refused. Idea?

See: https://github.com/pharo-project/pharo/pull/4580#issuecomment-531322034

Now I should probably start with a fresh P8, but I don't want to loose
my previous fixes (I guess should be on my own repo)

Hilaire

--
Dr. Geo
http://drgeo.eu



Reply | Threaded
Open this post in threaded view
|

Re: Help on Iceberg

HilaireFernandes
What should I do next ?

I install a newer P8, point the image repo to my existing repo in the
local filesystem. Is it right?

It seems I need to repair, but I don't understand why the repair dialog
say and what option to pick up. I can't anticipate the consequences.

Glossary, please (the one linked in the doc does not exist
(https://github.com/pharo-vcs/iceberg/wiki/Iceberg-glossary)

  * Image Commit?
  * working copy?
  * local change?
  * image changes?

I would like to make proper PR, but I can't and the proposed solution
did not worked.

--
Dr. Geo
http://drgeo.eu



Reply | Threaded
Open this post in threaded view
|

Re: Help on Iceberg

HilaireFernandes
Forgot the screenshot about the repair options

--
Dr. Geo
http://drgeo.eu


WhatNext.png (158K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Help on Iceberg

ducasse
Hilaire


When you download an image (it can come from mars) so the system
does not know, where the sources are, to which commit it should point.

So this is why you should either clone again or point to the source. 

Once you have downloaded or pointed to your fork (which can be old from a couple of centuries)
the system should fetch commits from Pharo first to make sure that locally you have 
the same commits than in Pharo. 

Then it should find to which commit your image is from. 
For doing that (your image may contain changes that are not committed)
it proposes you several options:
- the first one is to create a branch in your local repository to point to the current commit of your image
so that you can come back to it (let us call it bottom-xxx). 
When you select it, it explains to you the situation and the consequences. 
I will sit with the icebergers and do a pass on the explanation to make them even more lengthly. 

So at then end of this process you should have your image knowing to which commit it is from
and you have a branch to point to this place so that you can navigate.

Now the process to commit is: (from the wiki section I added https://github.com/pharo-project/pharo/wiki/Contribute-a-fix-to-Pharo
  1. Create a branch for the issue you want to work on.
  2. Code, then commit, then push to YOUR fork
  3. Issue a PullRequest from your fork to Pharo
  4. Check out your Bottom-xxx branch and you can step 1

Is it clearer?


BTW I add a section on why we do not need to explictly sync your fork with the repo on Pharo


On 15 Sep 2019, at 09:18, Hilaire <[hidden email]> wrote:

Forgot the screenshot about the repair options

--
Dr. Geo
http://drgeo.eu

<WhatNext.png>

Reply | Threaded
Open this post in threaded view
|

Re: Help on Iceberg

ducasse

Step 6: Why you do not need to resync your fork with the pharo repo?

No you do not need to explicitly resync your fork. Why? Because when you push your commits, you push also the Pharo commits. But let us look at it in details: When you download an image (imagine that this image contains the code of commit3 and that Pharo'repository is at commit5), the repair action will fetch all the commits (up to 5) and put them in your local repository. When you create your bottom branch and later from this one create the branch for your fixes (call it myfix), it means that when you will commit your myfix branch all the commits from myfixes and then 3 down will be pushed back to your fork.

Now if you download the latest image (imagine with commit6 and that the pharo repo is at commit6 - yes this is the latest image!) when you will push your branch (which here point to commit6), automatically all the commits (6 down) will be pushed to your repo. So your fork will be in sync with Pharo's one.



On 15 Sep 2019, at 10:55, ducasse <[hidden email]> wrote:

Hilaire


When you download an image (it can come from mars) so the system
does not know, where the sources are, to which commit it should point.

So this is why you should either clone again or point to the source. 

Once you have downloaded or pointed to your fork (which can be old from a couple of centuries)
the system should fetch commits from Pharo first to make sure that locally you have 
the same commits than in Pharo. 

Then it should find to which commit your image is from. 
For doing that (your image may contain changes that are not committed)
it proposes you several options:
- the first one is to create a branch in your local repository to point to the current commit of your image
so that you can come back to it (let us call it bottom-xxx). 
When you select it, it explains to you the situation and the consequences. 
I will sit with the icebergers and do a pass on the explanation to make them even more lengthly. 

So at then end of this process you should have your image knowing to which commit it is from
and you have a branch to point to this place so that you can navigate.

Now the process to commit is: (from the wiki section I added https://github.com/pharo-project/pharo/wiki/Contribute-a-fix-to-Pharo
  1. Create a branch for the issue you want to work on.
  2. Code, then commit, then push to YOUR fork
  3. Issue a PullRequest from your fork to Pharo
  4. Check out your Bottom-xxx branch and you can step 1

Is it clearer?


BTW I add a section on why we do not need to explictly sync your fork with the repo on Pharo


On 15 Sep 2019, at 09:18, Hilaire <[hidden email]> wrote:

Forgot the screenshot about the repair options

--
Dr. Geo
http://drgeo.eu

<WhatNext.png>


Reply | Threaded
Open this post in threaded view
|

Re: Help on Iceberg

ducasse
with some copy edit

tep 6: Why you do not need to resync your fork with the pharo repo?

No you do not need to explicitly resync your fork. Why? Because when you push your commits, you push also the Pharo commits. But let us look at it in details:

  • When you download an image (imagine that this image contains the code of commit3 and that Pharo'repository is at commit5), the repair action will fetch all the commits (up to 5) and put them in your LOCAL repository.
  • When you create your bottom branch (the branch that points to the situation of your image when you downloaded) and later from this one created the branch for your fixes (call it myfix), it means that when you commit your myfix branch all the commits from myfixes and then from commit3 down to the common ancestor between your fork and your local repository will be pushed back to your fork.

Now if you downloaded the latest image (imagine for commit6 and that the pharo repository is at commit6 - yes this is the latest image!) when you push your branch (which here points to commit6), automatically all the commits (6 down to the common ancestors between your local repo to your fork) will be pushed to your fork. So your fork will be in sync with Pharo's one.

So each time you work and push to your fork from the latest image, your fork gets updated.


On 15 Sep 2019, at 10:59, ducasse <[hidden email]> wrote:

Step 6: Why you do not need to resync your fork with the pharo repo?

No you do not need to explicitly resync your fork. Why? Because when you push your commits, you push also the Pharo commits. But let us look at it in details: When you download an image (imagine that this image contains the code of commit3 and that Pharo'repository is at commit5), the repair action will fetch all the commits (up to 5) and put them in your local repository. When you create your bottom branch and later from this one create the branch for your fixes (call it myfix), it means that when you will commit your myfix branch all the commits from myfixes and then 3 down will be pushed back to your fork.

Now if you download the latest image (imagine with commit6 and that the pharo repo is at commit6 - yes this is the latest image!) when you will push your branch (which here point to commit6), automatically all the commits (6 down) will be pushed to your repo. So your fork will be in sync with Pharo's one.



On 15 Sep 2019, at 10:55, ducasse <[hidden email]> wrote:

Hilaire


When you download an image (it can come from mars) so the system
does not know, where the sources are, to which commit it should point.

So this is why you should either clone again or point to the source. 

Once you have downloaded or pointed to your fork (which can be old from a couple of centuries)
the system should fetch commits from Pharo first to make sure that locally you have 
the same commits than in Pharo. 

Then it should find to which commit your image is from. 
For doing that (your image may contain changes that are not committed)
it proposes you several options:
- the first one is to create a branch in your local repository to point to the current commit of your image
so that you can come back to it (let us call it bottom-xxx). 
When you select it, it explains to you the situation and the consequences. 
I will sit with the icebergers and do a pass on the explanation to make them even more lengthly. 

So at then end of this process you should have your image knowing to which commit it is from
and you have a branch to point to this place so that you can navigate.

Now the process to commit is: (from the wiki section I added https://github.com/pharo-project/pharo/wiki/Contribute-a-fix-to-Pharo
  1. Create a branch for the issue you want to work on.
  2. Code, then commit, then push to YOUR fork
  3. Issue a PullRequest from your fork to Pharo
  4. Check out your Bottom-xxx branch and you can step 1

Is it clearer?


BTW I add a section on why we do not need to explictly sync your fork with the repo on Pharo


On 15 Sep 2019, at 09:18, Hilaire <[hidden email]> wrote:

Forgot the screenshot about the repair options

--
Dr. Geo
http://drgeo.eu

<WhatNext.png>



Reply | Threaded
Open this post in threaded view
|

Re: Help on Iceberg

HilaireFernandes
In reply to this post by ducasse
Question: What is exactly "current commits of your image". I understand
it in two ways:

1. Sync the local repo with the commits to match with the code in this
image (I think it is this one)

2. Sync local repo with the current commits (yes latest) for this image
in its remote repo

Thanks

Hilaire

Le 15/09/2019 à 10:55, ducasse a écrit :
> - the first one is to create a branch in your local repository to
> point to the current commit of your image
> so that you can come back to it (let us call it bottom-xxx). 

--
Dr. Geo
http://drgeo.eu



Reply | Threaded
Open this post in threaded view
|

Re: Help on Iceberg

ducasse


> On 15 Sep 2019, at 13:31, Hilaire <[hidden email]> wrote:
>
> Question: What is exactly "current commits of your image". I understand
> it in two ways:


The image you download is somewhere based on a commit from Pharo.
You may have got some extra changes in addition (for example if we have run
a code that dirtied a package).


> 1. Sync the local repo with the commits to match with the code in this
> image (I think it is this one)
>
> 2. Sync local repo with the current commits (yes latest) for this image
> in its remote repo
>
> Thanks
>
> Hilaire
>
> Le 15/09/2019 à 10:55, ducasse a écrit :
>> - the first one is to create a branch in your local repository to
>> point to the current commit of your image
>> so that you can come back to it (let us call it bottom-xxx).
>
> --
> Dr. Geo
> http://drgeo.eu
>
>
>