Hi,
What does the "Adopt commit" mean? It seems like a rebase, but I'm not sure. I often have ongoing changes in my image, and also changes in the filesystem (css, js, Dockerfile, etc.). So what I do is to commit on the filesystem, and then "adopt" the recently created commit, and then commit in Iceberg (and probably push). Is this okay? Is there any risk in doing this? Regards! Esteban A. Maringolo |
Hi,
the adopt commit operation has nothing to do with the rebase. It sets the reference commit of the image to the given commit. It does not affect the git repository. The image knows at any moment the commit it has loaded (or it supposed to have loaded). The adopt operation overrides the reference commit with the selected one, it does not affect the loaded code. There is risk of doing so, it changes the commit in the image but without changing the repository nor the loaded code. So, it can produce a detached working-copy, and also it affects the records of changes the image has. On Thu, Aug 20, 2020 at 5:16 AM Esteban Maringolo <[hidden email]> wrote: > > Hi, > > What does the "Adopt commit" mean? > > It seems like a rebase, but I'm not sure. > > I often have ongoing changes in my image, and also changes in the > filesystem (css, js, Dockerfile, etc.). So what I do is to commit on > the filesystem, and then "adopt" the recently created commit, and then > commit in Iceberg (and probably push). > > Is this okay? Is there any risk in doing this? > > Regards! > > Esteban A. Maringolo > -- Pablo Tesone. [hidden email] |
Hi Pablo,
Thanks for the answer. So my workflow of editing files outside of Pharo, committing them, and then adopting the latest commit would be safe? (as long I don't modify files modified by Pharo). Best regards! Esteban A. Maringolo On Thu, Aug 20, 2020 at 6:46 AM [hidden email] <[hidden email]> wrote: > > Hi, > the adopt commit operation has nothing to do with the rebase. It > sets the reference commit of the image to the given commit. It does > not affect the git repository. > The image knows at any moment the commit it has loaded (or it supposed > to have loaded). > The adopt operation overrides the reference commit with the selected > one, it does not affect the loaded code. > There is risk of doing so, it changes the commit in the image but > without changing the repository nor the loaded code. So, it can > produce a detached working-copy, and also it affects the records of > changes the image has. > > On Thu, Aug 20, 2020 at 5:16 AM Esteban Maringolo <[hidden email]> wrote: > > > > Hi, > > > > What does the "Adopt commit" mean? > > > > It seems like a rebase, but I'm not sure. > > > > I often have ongoing changes in my image, and also changes in the > > filesystem (css, js, Dockerfile, etc.). So what I do is to commit on > > the filesystem, and then "adopt" the recently created commit, and then > > commit in Iceberg (and probably push). > > > > Is this okay? Is there any risk in doing this? > > > > Regards! > > > > Esteban A. Maringolo > > > > > -- > Pablo Tesone. > [hidden email] > |
Yes, it should work. The same if you repair the repository doing a
checkout loading the changes from the repository (there should not be changes) Tell us if you have any questions Thanks! On Thu, Aug 20, 2020 at 2:21 PM Esteban Maringolo <[hidden email]> wrote: > > Hi Pablo, > > Thanks for the answer. > > So my workflow of editing files outside of Pharo, committing them, and > then adopting the latest commit would be safe? (as long I don't modify > files modified by Pharo). > > Best regards! > > > Esteban A. Maringolo > > On Thu, Aug 20, 2020 at 6:46 AM [hidden email] <[hidden email]> wrote: > > > > Hi, > > the adopt commit operation has nothing to do with the rebase. It > > sets the reference commit of the image to the given commit. It does > > not affect the git repository. > > The image knows at any moment the commit it has loaded (or it supposed > > to have loaded). > > The adopt operation overrides the reference commit with the selected > > one, it does not affect the loaded code. > > There is risk of doing so, it changes the commit in the image but > > without changing the repository nor the loaded code. So, it can > > produce a detached working-copy, and also it affects the records of > > changes the image has. > > > > On Thu, Aug 20, 2020 at 5:16 AM Esteban Maringolo <[hidden email]> wrote: > > > > > > Hi, > > > > > > What does the "Adopt commit" mean? > > > > > > It seems like a rebase, but I'm not sure. > > > > > > I often have ongoing changes in my image, and also changes in the > > > filesystem (css, js, Dockerfile, etc.). So what I do is to commit on > > > the filesystem, and then "adopt" the recently created commit, and then > > > commit in Iceberg (and probably push). > > > > > > Is this okay? Is there any risk in doing this? > > > > > > Regards! > > > > > > Esteban A. Maringolo > > > > > > > > > -- > > Pablo Tesone. > > [hidden email] > > > -- Pablo Tesone. [hidden email] |
Administrator
|
In reply to this post by tesonep@gmail.com
[hidden email] wrote
> It sets the reference commit of the image to the given commit. It does > not affect the git repository...The adopt operation overrides the > reference commit with the selected > one, it does not affect the loaded code. Ah, good to know! I didn't know this was available and think it would've come in handy a few times :) [hidden email] wrote > The image knows at any moment the commit it has loaded (or it supposed > to have loaded). For posterity, that info can be accessed via e.g. `anIceLibgitRepository workingCopy referenceCommit shortId` ----- Cheers, Sean -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
Cheers,
Sean |
On Thu, Aug 20, 2020 at 10:48 AM Sean P. DeNigris <[hidden email]> wrote:
> > The image knows at any moment the commit it has loaded (or it supposed > > to have loaded). > > For posterity, that info can be accessed via e.g. `anIceLibgitRepository > workingCopy referenceCommit shortId` This comes really handy, so I add how do I get the IceLibgitRepository instance? (given I provide the name). Regards! Esteban A. Maringolo |
In reply to this post by tesonep@gmail.com
pablo may be we should add this in a class comment or fly by help somewhere.
S
-------------------------------------------- Stéphane Ducasse 03 59 35 87 52 Assistant: Aurore Dalle FAX 03 59 57 78 50 TEL 03 59 35 86 16 S. Ducasse - Inria 40, avenue Halley, Parc Scientifique de la Haute Borne, Bât.A, Park Plaza Villeneuve d'Ascq 59650 France |
I did a PR, with small adjustments. Pierre On 20/08/2020 21:00, Stéphane Ducasse
wrote:
pablo may be we should add this in a class comment or fly by help somewhere. |
Administrator
|
In reply to this post by Esteban A. Maringolo
Esteban A. Maringolo wrote
> so I add how do I get the IceLibgitRepository > instance? (given I provide the name). I got it via Iceberg contextMenu -> Extra -> Inspect, which works via the UI but maybe you're looking for a programmatic way? ----- Cheers, Sean -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
Cheers,
Sean |
You can always get the registered repositories through:
IceRepository registry But take care that the API is not intended to be stable through versions as it is always intended to be used by the UI. So, script it as you wish, we can answer whatever doubt you have, but I have warn you :D! On Fri, Aug 21, 2020 at 3:44 PM Sean P. DeNigris <[hidden email]> wrote: > > Esteban A. Maringolo wrote > > so I add how do I get the IceLibgitRepository > > instance? (given I provide the name). > > I got it via Iceberg contextMenu -> Extra -> Inspect, which works via the UI > but maybe you're looking for a programmatic way? > > > > ----- > Cheers, > Sean > -- > Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html > -- Pablo Tesone. [hidden email] |
In reply to this post by tesonep@gmail.com
Hi Pablo,
I did the following: 1. Have Pharo with no changes in the current branch. 2. Edit an external file (foo.txt) and commit just modifying this file. 3. Go to Pharo, select the recently created commit and do an "Adopt commit" command on it. 4. Make some change and commit in Iceberg The changes in foo.txt are gone, the file is back to the state of step 1. I would have done a "Checkout existing branch" from 3, but then the local "master" is not available. So... rephrasing the question... What is the recommended way to work with external files in the same repository as these of Tonel? Regards! Esteban A. Maringolo On Thu, Aug 20, 2020 at 9:34 AM [hidden email] <[hidden email]> wrote: > > Yes, it should work. The same if you repair the repository doing a > checkout loading the changes from the repository (there should not be > changes) > > Tell us if you have any questions > > Thanks! > > On Thu, Aug 20, 2020 at 2:21 PM Esteban Maringolo <[hidden email]> wrote: > > > > Hi Pablo, > > > > Thanks for the answer. > > > > So my workflow of editing files outside of Pharo, committing them, and > > then adopting the latest commit would be safe? (as long I don't modify > > files modified by Pharo). > > > > Best regards! > > > > > > Esteban A. Maringolo > > > > On Thu, Aug 20, 2020 at 6:46 AM [hidden email] <[hidden email]> wrote: > > > > > > Hi, > > > the adopt commit operation has nothing to do with the rebase. It > > > sets the reference commit of the image to the given commit. It does > > > not affect the git repository. > > > The image knows at any moment the commit it has loaded (or it supposed > > > to have loaded). > > > The adopt operation overrides the reference commit with the selected > > > one, it does not affect the loaded code. > > > There is risk of doing so, it changes the commit in the image but > > > without changing the repository nor the loaded code. So, it can > > > produce a detached working-copy, and also it affects the records of > > > changes the image has. > > > > > > On Thu, Aug 20, 2020 at 5:16 AM Esteban Maringolo <[hidden email]> wrote: > > > > > > > > Hi, > > > > > > > > What does the "Adopt commit" mean? > > > > > > > > It seems like a rebase, but I'm not sure. > > > > > > > > I often have ongoing changes in my image, and also changes in the > > > > filesystem (css, js, Dockerfile, etc.). So what I do is to commit on > > > > the filesystem, and then "adopt" the recently created commit, and then > > > > commit in Iceberg (and probably push). > > > > > > > > Is this okay? Is there any risk in doing this? > > > > > > > > Regards! > > > > > > > > Esteban A. Maringolo > > > > > > > > > > > > > -- > > > Pablo Tesone. > > > [hidden email] > > > > > > > > -- > Pablo Tesone. > [hidden email] > |
Administrator
|
Esteban A. Maringolo wrote
> So... rephrasing the question... What is the recommended way to work > with external files in the same repository as these of Tonel? Here is what I do (although I'm not sure if it's "the" way). This is off the top of my head because I'm not in front of an image right now: 1. Change external files 2. Commit via command line 3. In Pharo, "repair" from Iceberg 4. Choose discard image changes and load repository version 5. Select "DO NOT CHECK OUT ANY PACKAGES" **Important if you have changes in image you don't want to lose** Since you didn't check out any packages, the code loaded in Pharo didn't change. In essence, you just synced Iceberg with the filesystem/git ----- Cheers, Sean -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
Cheers,
Sean |
Thanks Sean, I switched to use that, I didn't know about the "DO NOT
CHECK OUT..." option. This sequence is so convenient it might be worth having as a single click option (repair > discard > do not checkout). Regards! Esteban A. Maringolo On Sat, Aug 22, 2020 at 8:24 AM Sean P. DeNigris <[hidden email]> wrote: > > Esteban A. Maringolo wrote > > So... rephrasing the question... What is the recommended way to work > > with external files in the same repository as these of Tonel? > > Here is what I do (although I'm not sure if it's "the" way). This is off the > top of my head because I'm not in front of an image right now: > 1. Change external files > 2. Commit via command line > 3. In Pharo, "repair" from Iceberg > 4. Choose discard image changes and load repository version > 5. Select "DO NOT CHECK OUT ANY PACKAGES" **Important if you have changes in > image you don't want to lose** > > Since you didn't check out any packages, the code loaded in Pharo didn't > change. In essence, you just synced Iceberg with the filesystem/git > > > > ----- > Cheers, > Sean > -- > Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html > |
Free forum by Nabble | Edit this page |