[squeak-dev] The Trunk: Monticello-bf.509.mcz

Chris Cunningham cunningham.cb at gmail.com
Thu May 31 06:04:35 UTC 2012


On Tue, May 29, 2012 at 3:07 AM,  <commits at source.squeak.org> wrote:
> Bert Freudenberg uploaded a new version of Monticello to project The Trunk:
> http://source.squeak.org/trunk/Monticello-bf.509.mcz
>
> ==================== Summary ====================
>
> Name: Monticello-bf.509
> Author: bf
> Time: 29 May 2012, 12:06:58.832 pm
> UUID: 02bc3aaf-6de3-4b06-8264-852ba776aeb4
> Ancestors: Monticello-bf.508
>
> Allow to specify branch name in MCFileBasedRepository>>versionNamesForPackageNamed:
>
> =============== Diff against Monticello-bf.508 ===============
>
> Item was changed:
>  ----- Method: MCFileBasedRepository>>versionNamesForPackageNamed: (in category 'versions') -----
> + versionNamesForPackageNamed: packageName
> - versionNamesForPackageNamed: packageName
>        ^ Array streamContents:
> +               [ : stream | | wantBranch |
> +               wantBranch := packageName includes: $..
> +               self allFileNamesOrCache do:
> +                       [ : each | | mcVersionName branchName |
> -               [ : stream | self allFileNamesOrCache do:
> -                       [ : each | | mcVersionName |
>                        mcVersionName := each asMCVersionName.
> +                       branchName := wantBranch
> +                               ifTrue: [mcVersionName packageAndBranchName]
> +                               ifFalse: [mcVersionName packageName].
> +                       packageName = branchName ifTrue: [ stream nextPut: mcVersionName ] ] ]!
> -                       mcVersionName packageName = packageName ifTrue: [ stream nextPut: mcVersionName ] ] ]!
>
>

Bert, there is a problem with this change.  If you open the repository
up, there is NO selected package, and this method fails if the
packageName is nil.  A simple fix (not claiming best) is to guard
against this situation (method attached).

-Chris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MCFileBasedRepository.cbc.1.cs
Type: application/octet-stream
Size: 649 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20120530/abe6a857/MCFileBasedRepository.cbc.1.obj


More information about the Squeak-dev mailing list