[Box-Admins] Wiping Eliot's versions Re: [squeak-dev] automated way to delete specific trunk packages?

Chris Muller asqueaker at gmail.com
Mon May 11 02:34:23 UTC 2015


Hi Tobias and all, sorry for the late reply.

> I just tried wiping the versions Eliot asked to be removed.
> I am able to remove the corresponding files from the disk and also remove
> the Squeaksource version entries.
>
>   However, it seems that source.squeak.org is running on some kind of
> Magma-backend,

As Levente explained that is just a test server running latest
SqueakSource mcz and supporting the history function.  The actual
production code repository is still running in the chroot environment
(/srv/box2/...).

> where wiping the versions is virtually impossible for me.
> I put together the following script:
>
> "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-"
> | project projectDir rawVersions fs candidates condition mcModel |
> project := SSRepository current projects detect: [:p |  p id = 'trunk'].
> mcModel := (SSRepository storage respondsTo: #mcModelFor: ) ifTrue: [
>                                 SSRepository storage mcModelFor: project].
> projectDir := SSFilesystem new projectDirectoryFor: project.
> " we really want to delete the versions, so circumvent the accessor that filters them "
> rawVersions := project instVarNamed: 'versions'.
> condition := [:version |
>         #('Collections.spur' 'Compiler.spur' 'Kernel.spur' 'System.spur')
>                 anySatisfy: [:pat | version fileName beginsWith: pat]].
> candidates :=  (rawVersions select: condition) values.
> candidates
>         do: [:version| | fileName |
>                 fileName := version fileName.
>                 Transcript showln: '> ', fileName.
>                 version diffs copy keysDo: [:diffName |
>                         projectDir deleteFileNamed: diffName ifAbsent: ["ok"].
>                         Transcript showln: '    Removed ', diffName.
>                         version diffs removeKey: diffName.
>                         Transcript showln: '    Wiped ', diffName].
>                 projectDir deleteFileNamed: fileName ifAbsent: ["ok"].
>                 Transcript showln: '  Removed ', fileName.
>                 rawVersions removeKey: fileName.
>                 " mcModel ifNotNil: [:m | m removeVersion: (project mcVersionFrom: version)]. " "<============== this does not work, chris"
>                 Transcript showln: '  Wiped ', fileName]
>         displayingProgress: [:version | 'Wiping ', version fileName].
> self assert: [rawVersions noneSatisfy: condition].
> "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-"
>
> At the position Indicated I tried removing the faulty version from the magma-based
> data structures, but #removeVersion: tries to remove from an (magma)array, which fail.

Yes, that's a bug.  It was not caught since I changed that structure
to a MagmaArray becaues removingVersions is such a rare use case.


More information about the Box-Admins mailing list