Recovering Changes from a broken image

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

Recovering Changes from a broken image

Sven Van Caekenberghe-2
Hi,

One of the cool things of Smalltalk's images/changes file is that you can do a World Menu > Tools > Recover lost changes… to get back most [1] of your code in case your image/OS/machine suddenly crashed or you forgot to save your image or commit your Monticello packages.

But we all have encountered the situation where the image is broken, saved in such a state that it no longer starts up properly. In that case your code might seem lost forever.

No, it is not !

Two days ago I had this problem myself and I remembered something Marcus said some time ago: you can access the changes file of one (in casu your broken image) from another (working) image to select/recover the changes you want. It worked perfectly.

The easiest procedure it to copy the .changes file from the broken image and rename its extension to .cs and then open it from a World Menu > Tools > File Browser and open a Changes browser on it.

I found this very useful. This is a really important technique to be aware of.

Sven

[1] Sadly, not everything is logged in the changes file: creation of new classes, method deletions are not recorded.

--
Sven Van Caekenberghe
http://stfx.eu
Smalltalk is the Red Pill




Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-users] Recovering Changes from a broken image

Stéphane Ducasse

On Nov 8, 2012, at 9:03 PM, Sven Van Caekenberghe wrote:

> Hi,
>
> One of the cool things of Smalltalk's images/changes file is that you can do a World Menu > Tools > Recover lost changes… to get back most [1] of your code in case your image/OS/machine suddenly crashed or you forgot to save your image or commit your Monticello packages.
>
> But we all have encountered the situation where the image is broken, saved in such a state that it no longer starts up properly. In that case your code might seem lost forever.
>
> No, it is not !
>
> Two days ago I had this problem myself and I remembered something Marcus said some time ago: you can access the changes file of one (in casu your broken image) from another (working) image to select/recover the changes you want. It worked perfectly.
>
> The easiest procedure it to copy the .changes file from the broken image and rename its extension to .cs and then open it from a World Menu > Tools > File Browser and open a Changes browser on it.

We should add a recover from another image shortcut.
>
> I found this very useful. This is a really important technique to be aware of.
>
> Sven
>
> [1] Sadly, not everything is logged in the changes file: creation of new classes, method deletions are not recorded.

Yes we should change that.
Ezequiel started to work on a new description of changes.

>
> --
> Sven Van Caekenberghe
> http://stfx.eu
> Smalltalk is the Red Pill
>
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-users] Recovering Changes from a broken image

Sven Van Caekenberghe-2

On 08 Nov 2012, at 21:09, Stéphane Ducasse <[hidden email]> wrote:

>
> On Nov 8, 2012, at 9:03 PM, Sven Van Caekenberghe wrote:
>
>> Hi,
>>
>> One of the cool things of Smalltalk's images/changes file is that you can do a World Menu > Tools > Recover lost changes… to get back most [1] of your code in case your image/OS/machine suddenly crashed or you forgot to save your image or commit your Monticello packages.
>>
>> But we all have encountered the situation where the image is broken, saved in such a state that it no longer starts up properly. In that case your code might seem lost forever.
>>
>> No, it is not !
>>
>> Two days ago I had this problem myself and I remembered something Marcus said some time ago: you can access the changes file of one (in casu your broken image) from another (working) image to select/recover the changes you want. It worked perfectly.
>>
>> The easiest procedure it to copy the .changes file from the broken image and rename its extension to .cs and then open it from a World Menu > Tools > File Browser and open a Changes browser on it.
>
> We should add a recover from another image shortcut.

Yes! Good idea.

>> I found this very useful. This is a really important technique to be aware of.
>>
>> Sven
>>
>> [1] Sadly, not everything is logged in the changes file: creation of new classes, method deletions are not recorded.
>
> Yes we should change that.
> Ezequiel started to work on a new description of changes.

OK.


Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-users] Recovering Changes from a broken image

senTalker
In reply to this post by Stéphane Ducasse
This "tip" is very welcome, didn't know that you could import changes made from another image. Should definitely be included in the section "recovering lost changes" in the Pharo book (in case it isn't there already ;-).

Also very welcome is a new "description of changes". Without knowing its details, may I make a suggestion?

When recovering lost changes what we need is to quickly distinguish (i.e. "filter-out") operations on classes/methods and everything else. Having to look through all the do-its in order to see if they are "Workspace experiments" or important is very time-consuming, and there is always the possibility to miss some important "do it", and then the whole "import" is stopped.

So it would be great if there were different "filters", and if the changes were more explicit.

Other than that, when I needed it, I was grateful that this functionality existed at all :-)

Cheers,

Sebastian


2012/11/8 Stéphane Ducasse <[hidden email]>

On Nov 8, 2012, at 9:03 PM, Sven Van Caekenberghe wrote:

> Hi,
>
> One of the cool things of Smalltalk's images/changes file is that you can do a World Menu > Tools > Recover lost changes… to get back most [1] of your code in case your image/OS/machine suddenly crashed or you forgot to save your image or commit your Monticello packages.
>
> But we all have encountered the situation where the image is broken, saved in such a state that it no longer starts up properly. In that case your code might seem lost forever.
>
> No, it is not !
>
> Two days ago I had this problem myself and I remembered something Marcus said some time ago: you can access the changes file of one (in casu your broken image) from another (working) image to select/recover the changes you want. It worked perfectly.
>
> The easiest procedure it to copy the .changes file from the broken image and rename its extension to .cs and then open it from a World Menu > Tools > File Browser and open a Changes browser on it.

We should add a recover from another image shortcut.
>
> I found this very useful. This is a really important technique to be aware of.
>
> Sven
>
> [1] Sadly, not everything is logged in the changes file: creation of new classes, method deletions are not recorded.

Yes we should change that.
Ezequiel started to work on a new description of changes.

>
> --
> Sven Van Caekenberghe
> http://stfx.eu
> Smalltalk is the Red Pill
>
>
>
>



Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-users] Recovering Changes from a broken image

Mariano Martinez Peck


On Thu, Nov 8, 2012 at 10:41 PM, Sebastian Nozzi <[hidden email]> wrote:
> This "tip" is very welcome, didn't know that you could import changes made
> from another image.

http://marianopeck.wordpress.com/2012/05/19/pharo-tips-and-tricks/
title "Recovering lost code:"
I paste it here:

- Recovering lost code: Probably, one of the things Smalltalkers are always proud of saying is “In Smalltalk you never lose code” hehhehe. So… your vm crashed and you didn’t save your code? Well, there are different ways of recovering the code.

1) Tools -> Recover lost changes. There you can select the date from where to start watching the changes. Once you select a point in time, you can go item by item seeing what you want to recover. What I usually do is multi-select all the ones I want to recover and then I click on “file in selections”. That will install back those lost changes. Notice that this is thanks to the .changes file so you need it in order to recover changes. Also notice that even Do-Its are saved.

2) If your image does not even start, are you screwed up? No! You can even browse the changes and recover your lost data in ANOTHER image. Just open another image and then drag and drop the .changes of the image you lost the data. Then repeat the option 1).

3) You can always take your prefer text editor, open the .changes file and copy paste



Should definitely be included in the section "recovering
> lost changes" in the Pharo book (in case it isn't there already ;-).
>
> Also very welcome is a new "description of changes". Without knowing its
> details, may I make a suggestion?
>
> When recovering lost changes what we need is to quickly distinguish (i.e.
> "filter-out") operations on classes/methods and everything else. Having to
> look through all the do-its in order to see if they are "Workspace
> experiments" or important is very time-consuming, and there is always the
> possibility to miss some important "do it", and then the whole "import" is
> stopped.
>
> So it would be great if there were different "filters", and if the changes
> were more explicit.

>
> Other than that, when I needed it, I was grateful that this functionality
> existed at all :-)
>
> Cheers,
>
> Sebastian
>
>
> 2012/11/8 Stéphane Ducasse <[hidden email]>
>>
>>
>> On Nov 8, 2012, at 9:03 PM, Sven Van Caekenberghe wrote:
>>
>> > Hi,
>> >
>> > One of the cool things of Smalltalk's images/changes file is that you
>> > can do a World Menu > Tools > Recover lost changes… to get back most [1] of
>> > your code in case your image/OS/machine suddenly crashed or you forgot to
>> > save your image or commit your Monticello packages.
>> >
>> > But we all have encountered the situation where the image is broken,
>> > saved in such a state that it no longer starts up properly. In that case
>> > your code might seem lost forever.
>> >
>> > No, it is not !
>> >
>> > Two days ago I had this problem myself and I remembered something Marcus
>> > said some time ago: you can access the changes file of one (in casu your
>> > broken image) from another (working) image to select/recover the changes you
>> > want. It worked perfectly.
>> >
>> > The easiest procedure it to copy the .changes file from the broken image
>> > and rename its extension to .cs and then open it from a World Menu > Tools >
>> > File Browser and open a Changes browser on it.
>>
>> We should add a recover from another image shortcut.
>> >
>> > I found this very useful. This is a really important technique to be
>> > aware of.
>> >
>> > Sven
>> >
>> > [1] Sadly, not everything is logged in the changes file: creation of new
>> > classes, method deletions are not recorded.
>>
>> Yes we should change that.
>> Ezequiel started to work on a new description of changes.
>>
>> >
>> > --
>> > Sven Van Caekenberghe
>> > http://stfx.eu
>> > Smalltalk is the Red Pill
>> >
>> >
>> >
>> >
>>
>>
>



--
Mariano
http://marianopeck.wordpress.com
Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-users] Recovering Changes from a broken image

Stéphane Ducasse
In reply to this post by senTalker

> This "tip" is very welcome, didn't know that you could import changes made from another image. Should definitely be included in the section "recovering lost changes" in the Pharo book (in case it isn't there already ;-).
>
> Also very welcome is a new "description of changes". Without knowing its details, may I make a suggestion?
>
> When recovering lost changes what we need is to quickly distinguish (i.e. "filter-out") operations on classes/methods and everything else. Having to look through all the do-its in order to see if they are "Workspace experiments" or important is very time-consuming, and there is always the possibility to miss some important "do it", and then the whole "import" is stopped.
>
> So it would be great if there were different "filters", and if the changes were more explicit.
>
> Other than that, when I needed it, I was grateful that this functionality existed at all :-)

this is planned but no time.
Ezequiel was working on that and soon it will get back to argentina and we need somebody else to help.




>
> Cheers,
>
> Sebastian
>
>
> 2012/11/8 Stéphane Ducasse <[hidden email]>
>
> On Nov 8, 2012, at 9:03 PM, Sven Van Caekenberghe wrote:
>
> > Hi,
> >
> > One of the cool things of Smalltalk's images/changes file is that you can do a World Menu > Tools > Recover lost changes… to get back most [1] of your code in case your image/OS/machine suddenly crashed or you forgot to save your image or commit your Monticello packages.
> >
> > But we all have encountered the situation where the image is broken, saved in such a state that it no longer starts up properly. In that case your code might seem lost forever.
> >
> > No, it is not !
> >
> > Two days ago I had this problem myself and I remembered something Marcus said some time ago: you can access the changes file of one (in casu your broken image) from another (working) image to select/recover the changes you want. It worked perfectly.
> >
> > The easiest procedure it to copy the .changes file from the broken image and rename its extension to .cs and then open it from a World Menu > Tools > File Browser and open a Changes browser on it.
>
> We should add a recover from another image shortcut.
> >
> > I found this very useful. This is a really important technique to be aware of.
> >
> > Sven
> >
> > [1] Sadly, not everything is logged in the changes file: creation of new classes, method deletions are not recorded.
>
> Yes we should change that.
> Ezequiel started to work on a new description of changes.
>
> >
> > --
> > Sven Van Caekenberghe
> > http://stfx.eu
> > Smalltalk is the Red Pill
> >
> >
> >
> >
>
>
>