[Pkg] The Trunk: VersionNumber-nice.3.mcz
commits at source.squeak.org
commits at source.squeak.org
Sun May 8 10:42:10 UTC 2011
Nicolas Cellier uploaded a new version of VersionNumber to project The Trunk:
http://source.squeak.org/trunk/VersionNumber-nice.3.mcz
==================== Summary ====================
Name: VersionNumber-nice.3
Author: nice
Time: 8 May 2011, 12:42:01.281 pm
UUID: 2e5f3b47-1c64-4eeb-8bbb-14e8fdd0d3d9
Ancestors: VersionNumber-ar.2
minor refactorings: use #anySatisfy: #allSatisfy: #noneSatisfy: where it simplifies
=============== Diff against VersionNumber-ar.2 ===============
Item was changed:
----- Method: VersionHistory>>removeTrunk: (in category 'removing') -----
removeTrunk: aVersion
"Remove aVersion and all of it's predecessors, providing there
are no other branches stemming from the trunk. Note, a trunk is defined
as all versions, starting with the first version, that have only one successor."
| tmp |
(self versionsAfter: aVersion) size > 1
ifTrue: [^self error: 'version is at a fork'].
tmp := self allVersionsBefore: aVersion.
+ (tmp anySatisfy: [ :ea | (self versionsAfter: ea) size > 1 ])
+ ifTrue: [^self error: 'not a trunk, other branches detected'].
- (tmp detect: [ :ea | (self versionsAfter: ea) size > 1 ] ifNone: [nil])
- ifNotNil: [^self error: 'not a trunk, other branches detected'].
versions removeAll: tmp.
versions remove: aVersion.!
More information about the Packages
mailing list