were Changesets at one point zipped?

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

were Changesets at one point zipped?

Stéphane Ducasse
Hi guys

were Changesets at one point zipped?
Else I do not understand the reference to GZipReadStream

Stef

ChangeSet class>>fileIntoNewChangeSet: fullName
        "File in all of the contents of the currently selected file, if any, into a new change set."

        | fn ff |
        fullName ifNil: [^ Beeper beep].
       
        fn := (Smalltalk hasClassNamed: #GZipReadStream)
                ifTrue: [(Smalltalk classNamed:  #GZipReadStream) uncompressedFileName: fullName]
                ifFalse: [fullName].
        [ ff := FileStream readOnlyFileNamed: fn.
        self newChangesFromStream: ff named: (FileDirectory localNameFor: fn)]
                ensure: [ff ifNotNil: [ff close]]
Reply | Threaded
Open this post in threaded view
|

Re: were Changesets at one point zipped?

Igor Stasenko
seems like it tests if contents are zipped, and if not tries to read usually.

changesets we use are pretty small. and i dont see much sense zipping them.

On 4 December 2011 19:01, Stéphane Ducasse <[hidden email]> wrote:

> Hi guys
>
> were Changesets at one point zipped?
> Else I do not understand the reference to GZipReadStream
>
> Stef
>
> ChangeSet class>>fileIntoNewChangeSet: fullName
>        "File in all of the contents of the currently selected file, if any, into a new change set."
>
>        | fn ff |
>        fullName ifNil: [^ Beeper beep].
>
>        fn := (Smalltalk hasClassNamed: #GZipReadStream)
>                ifTrue: [(Smalltalk classNamed:  #GZipReadStream) uncompressedFileName: fullName]
>                ifFalse: [fullName].
>        [ ff := FileStream readOnlyFileNamed: fn.
>        self newChangesFromStream: ff named: (FileDirectory localNameFor: fn)]
>                ensure: [ff ifNotNil: [ff close]]



--
Best regards,
Igor Stasenko.