Thanks Lukas!
I used it successfully, so now we should have a better package naming for the moose tests and test resources.
Some more todos: - Rename the two Glamour test packages - Rename the SmallDude test packages - Rename DSM packages with the same scheme - Split Mondrian categories into own packages
I also started to slowly rename a bit the classes to have proper prefixes. This will probably take longer :).
Cheers, Doru
On 29 Aug 2010, at 10:39, Lukas Renggli wrote:
Not if you have a script:
renamePackage: oldPackageName to: newPackageName "self renamePackage: 'Seaside-Squeak-Development-Core' to: 'Seaside-Pharo-Development-Core'"
| oldPackage newPackage oldWorkingCopy newWorkingCopy | oldPackage := PackageInfo named: oldPackageName. newPackage := PackageInfo named: newPackageName.
" rename system categories " oldPackage systemCategories do: [ :oldCategory | | newCategory | newCategory := oldCategory allButFirst: oldPackage systemCategoryPrefix size. Smalltalk organization renameCategory: oldCategory toBe: newPackage systemCategoryPrefix , newCategory ].
" rename method categories " oldPackage extensionClasses do: [ :extensionClass | (oldPackage extensionCategoriesForClass: extensionClass) do: [ :oldProtocol | | newProtocol | newProtocol := oldProtocol allButFirst: oldPackage methodCategoryPrefix size. extensionClass organization renameCategory: oldProtocol toBe: newPackage methodCategoryPrefix , newProtocol ] ].
" update monticello packages " oldWorkingCopy := MCWorkingCopy forPackage: (MCPackage named: oldPackageName). newWorkingCopy := MCWorkingCopy forPackage: (MCPackage named: newPackageName). newWorkingCopy repositoryGroup: oldWorkingCopy repositoryGroup; modified: true.
" test is all methos have been caught " oldPackage methods isEmpty ifTrue: [ oldWorkingCopy unload. PackageOrganizer default unregisterPackage: oldPackage ] ifFalse: [ self error: 'Some code entities remain in the old package, please migrate manually.' ]
On 29 August 2010 10:35, Stéphane Ducasse stephane.ducasse@inria.fr wrote:
Yes boring
Stef
On Aug 29, 2010, at 9:44 AM, Tudor Girba wrote:
Hi,
I started to renamed these packages. All tests are green. The thing left to do is: Moose-KGB-* -> Moose-TestResources-KGB-*
When you move these things, it is very tricky when you use the classic OB browser because you have to:
- rename the category
- find all extensions and rename the corresponding categories
- add new package
- add repository to new package
- ensure that the old package is empty (including extensions)
- save new package
- save old package
Perhaps O2 is better at this.
And then you should not forget to properly update the Metacello configuration :).
Cheers, Doru
On 29 Aug 2010, at 09:16, Stéphane Ducasse wrote:
yes I will do the same soon in pharo. But time time time time time time
On Aug 28, 2010, at 9:26 PM, Alexandre Bergel wrote:
This is indeed necessary
Alexandre
On 28 Aug 2010, at 09:48, Tudor Girba wrote:
Hi,
I moved all code from Moose-MondrianScripts to Moose- MondrianPaintings, and I removed the Moose-MondrianScripts from the configuration.
I would like to work slowly on package restructuring. In the following, I would like to rename the test packages:
Moose-LAN -> Moose-TestResources-LAN Famix-LANTests -> Moose-Tests-SmalltalkImporter-LAN MooseKGB-TestFamix3 -> Moose-Tests-KGB Moose-KGB-* -> Moose-TestResources-KGB-* Moose-SmalltalkImporterTests -> Moose-Tests-SmalltalkImporter Moose-Test-PackageOne -> Moose-TestResources-Reference-PackageOne Moose-Test-PackageTwo -> Moose-TestResources-Reference-PackageTwo
Cheers, Doru
-- www.tudorgirba.com
"There are no old things, there are only old ways of looking at them."
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com
"Reasonable is what we are accustomed with."
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- Lukas Renggli www.lukas-renggli.ch
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com
"Next time you see your life passing by, say 'hi' and get to know her."