Hi,
I know how to remove a version of a method from the changes file but how do I remove a doIt from the changes file?
Thanks
Herbert
On Fri, 26 Oct 2012, Herbert König wrote:
Hi,
I know how to remove a version of a method from the changes file but how do I remove a doIt from the changes file?
How do you remove a version of a method from it?
Levente
P.S.: I think it's impossible to remove anything from the changes file, unless you create a new changes file.
Thanks
Herbert
Am 26.10.2012 13:37, schrieb Levente Uzonyi:
On Fri, 26 Oct 2012, Herbert König wrote:
Hi,
I know how to remove a version of a method from the changes file but how do I remove a doIt from the changes file?
How do you remove a version of a method from it?
I mistook the right click menu in the versions browser "remove from changes" for doing that. Actually VersionBrowser>>removeMethodFromChanges (which is what this menu calls) removes the method from the current change set.
P.S.: I think it's impossible to remove anything from the changes file, unless you create a new changes file.
So I will have to write a method which changes a password by using fillInTheBlank to change some objects password. And ditch that image and changes and rebuild it.
I hoped there was a cheaper way.
Thanks for pointing this out!
Herbert
So I will have to write a method which changes a password by using fillInTheBlank to change some objects password. And ditch that image and changes and rebuild it.
I hoped there was a cheaper way.
Thanks for pointing this out!
Herbert
Of course there are cheaper ways. If you ask the right questions you might get the right answers :-) For one, you can condense the changes file (Smalltalk condenseChanges). That's quick and will remove all doIts from the changes file (remember to remove the renamed original changes file, otherwise your passwords will stay in that file). You could also replace all occurrences of that password in the changes file by a string of equal size which contains just asterisks. That's a bit more work, but if you want to be able to look at method histories it's preferable to condenseChanges.
Cheers, Hans-Martin
Am 26.10.2012 14:07, schrieb Hans-Martin Mosner:
Of course there are cheaper ways. If you ask the right questions you might get the right answers :-)
:-))
For one, you can condense the changes file (Smalltalk condenseChanges). That's quick and will remove all doIts from the changes file (remember to remove the renamed original changes file, otherwise your passwords will stay in that file).
I had some memory that at some time this didn't work properly in Squeak. When I condense changes and then try "browse recent changes" from a FileList i get: "this seems not to be a changes file". After adding some doits to the changes the attempt to browse changes will open a debugger as UTF8TextConverter class>>decodeByteString throws an Error "malformed input" This is a Trunk 12164 derived image.
You could also replace all occurrences of that password in the changes file by a string of equal size which contains just asterisks. That's a bit more work, but if you want to be able to look at method histories it's preferable to condenseChanges.
Thanks.
Herbert
On Fri, Oct 26, 2012 at 01:51:40PM +0200, Herbert K?nig wrote:
Am 26.10.2012 13:37, schrieb Levente Uzonyi:
On Fri, 26 Oct 2012, Herbert K?nig wrote:
Hi,
I know how to remove a version of a method from the changes file but how do I remove a doIt from the changes file?
How do you remove a version of a method from it?
I mistook the right click menu in the versions browser "remove from changes" for doing that. Actually VersionBrowser>>removeMethodFromChanges (which is what this menu calls) removes the method from the current change set.
P.S.: I think it's impossible to remove anything from the changes file, unless you create a new changes file.
So I will have to write a method which changes a password by using fillInTheBlank to change some objects password. And ditch that image and changes and rebuild it.
I hoped there was a cheaper way.
The changes file is a binary file in which you can find a change based on its offset location in the file. The intent is to append to the file, but never modify its current contents. That said, if your problem is some passwords that appear in doit records in the changes file, you can probably fix it if you edit the file to clear out the passwords, and do it in such a way that you replace bytes in the file without modifying its length. In other words, use a binary editor of some sort, or write something in Squeak to copyReplaceAll the offending text.
Dave
This got me thinking and I cannot recall an instance where I actually benefited from having doits in the change log. Perhaps the simplest thing in your case would be to disable writing doits to changes. YMMV.
Cheers, Bob
On 10/26/12 7:51 AM, Herbert König wrote:
Am 26.10.2012 13:37, schrieb Levente Uzonyi:
On Fri, 26 Oct 2012, Herbert König wrote:
Hi,
I know how to remove a version of a method from the changes file but how do I remove a doIt from the changes file?
How do you remove a version of a method from it?
I mistook the right click menu in the versions browser "remove from changes" for doing that. Actually VersionBrowser>>removeMethodFromChanges (which is what this menu calls) removes the method from the current change set.
P.S.: I think it's impossible to remove anything from the changes file, unless you create a new changes file.
So I will have to write a method which changes a password by using fillInTheBlank to change some objects password. And ditch that image and changes and rebuild it.
I hoped there was a cheaper way.
Thanks for pointing this out!
Herbert
On Fri, Oct 26, 2012 at 10:33 AM, Bob Arning arning315@comcast.net wrote:
This got me thinking and I cannot recall an instance where I actually benefited from having doits in the change log. Perhaps the simplest thing in your case would be to disable writing doits to changes. YMMV.
Cheers, Bob
There are 2 places where it was useful for me (and at least one of them is fairly important!): 1 - Class definition is stored in the change log as a doIt (as is class structure modification). You probably don't want to disable this. 2 - when I am working, I often craft proto-type methods in a workspace - if the system crashes during this time, having the doIts can be very useful. -Chris
On 10/26/12 1:53 PM, Chris Cunningham wrote:
On Fri, Oct 26, 2012 at 10:33 AM, Bob Arning arning315@comcast.net wrote:
This got me thinking and I cannot recall an instance where I actually benefited from having doits in the change log. Perhaps the simplest thing in your case would be to disable writing doits to changes. YMMV.
Cheers, Bob
There are 2 places where it was useful for me (and at least one of them is fairly important!): 1 - Class definition is stored in the change log as a doIt (as is class structure modification). You probably don't want to disable this.
Right, none of the browser-generated stuff, just the cmd-d (p/i/etc) in a text pane.
2 - when I am working, I often craft proto-type methods in a workspace
- if the system crashes during this time, having the doIts can be very
useful.
I guess that's a YMMV situation. I generally do all that kind of thing as a method in a class.
-Chris
squeak-dev@lists.squeakfoundation.org