The Trunk: Installer-Core-TestRunner.363.mcz

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

The Trunk: Installer-Core-TestRunner.363.mcz

commits-2
Frank Shearar uploaded a new version of Installer-Core to project The Trunk:
http://source.squeak.org/trunk/Installer-Core-TestRunner.363.mcz

==================== Summary ====================

Name: Installer-Core-TestRunner.363
Author: TestRunner
Time: 2 February 2013, 3:10:22.874 pm
UUID: ea87a4c2-0b47-4035-a15e-17288bc10463
Ancestors: Installer-Core-fbs.361, Installer-Core-fbs.362

Installer repository failover #2 of 2: InstallerMonticello uses an MCRepositoryGroup, so that attempting to load a particular version will try each repository in turn. #basicView will open _all_ the InstallerMonticello's repositories.

=============== Diff against Installer-Core-fbs.361 ===============

Item was changed:
  ----- Method: InstallerMonticello>>cache (in category 'instance creation') -----
  cache
+ | cache |
+ cache := self classMCCacheRepository default.
+ mc addRepository: cache.
+ root := cache directory localName.!
-
- mc := self classMCCacheRepository default.
- root := mc directory localName
-  !

Item was changed:
  ----- Method: InstallerMonticello>>directory: (in category 'instance creation') -----
  directory: dir
-
  | directory |
  directory := dir isString
  ifTrue: [  FileDirectory on: (FileDirectory default fullNameFor: dir) ]
  ifFalse: [ dir ].
 
+ mc addRepository: (self classMCDirectoryRepository new directory: directory; yourself).
- mc := self classMCDirectoryRepository new directory: directory; yourself.
    root := dir
 
   !

Item was changed:
  ----- Method: InstallerMonticello>>ftp:directory:user:password: (in category 'instance creation') -----
  ftp: host directory: dir user: name password: secret
  "Installer mc ftp: 'mc.gjallar.se' directory: '' user: 'gjallar' password: secret."
 
+ mc addRepository: (self classMCFtpRepository host: host directory: dir user: name password: secret; yourself).
- mc := self classMCFtpRepository host: host directory: dir user: name password: secret.
  root :=  dir.
   !

Item was changed:
  ----- Method: InstallerMonticello>>goods:port: (in category 'instance creation') -----
  goods: host port: aport
 
+ mc addRepository: ((self classMCGOODSRepository new) host: host port: aport; yourself)
- mc := (self classMCGOODSRepository new) host: host port: aport; yourself
   !

Item was changed:
  ----- Method: InstallerMonticello>>http:user:password: (in category 'instance creation') -----
  http: aUrl user: name password: secret
+ | url http |
- | url |
  url := (aUrl includesSubString: '://')
  ifTrue: [aUrl]
  ifFalse: ['http://', aUrl].
+ http := self classMCHttpRepository location: url user: name password: secret.
+ mc addRepository: http.
+ root := http locationWithTrailingSlash
- mc := self classMCHttpRepository location: url user: name password: secret.
- root := mc locationWithTrailingSlash
   !

Item was added:
+ ----- Method: InstallerMonticello>>initialize (in category 'public interface') -----
+ initialize
+ super initialize.
+ mc := MCRepositoryGroup new.!

Item was changed:
  ----- Method: InstallerMonticello>>label (in category 'accessing') -----
  label
+ ^ 'repositories: #(',
+ ((mc repositories allButFirst
+ collect: [:repo | repo description surroundedBySingleQuotes])
+ reduce: [:acc :each | acc, ' ', each]),
+ ');'.!
- ^ 'repository:''', mc description, ''''!

Item was changed:
  ----- Method: InstallerMonticello>>magma:port: (in category 'instance creation') -----
  magma: host port: aport
 
+ mc addRepository: ((self classMCMagmaRepository new) host: host port: aport; yourself)
- mc := (self classMCMagmaRepository new) host: host port: aport; yourself
   !

Item was changed:
  ----- Method: InstallerMonticello>>mc (in category 'accessing') -----
  mc
+ "Return the GROUP of Monticello repositories."
-
  ^ mc!

Item was changed:
  ----- Method: InstallerMonticello>>mc: (in category 'accessing') -----
  mc: aRepo
+ mc addRepository: aRepo!
-
- mc := aRepo!

Item was changed:
  ----- Method: InstallerMonticello>>mcThing (in category 'monticello') -----
  mcThing
  | loader |
  loader := self classMCVersionLoader new.
+
- self logCR: 'reading ' , mc description , '...'.
  "several attempts to read files - repository readableFileNames
  sometimes fails"
  self packages
  do: [:pkg |
  | versionNames fileToLoad version |
  versionNames := mc versionNamesForPackageNamed:
  (pkg asMCVersionName versionNumber = 0
  ifTrue: [ "Just a package name specified, use it whole." pkg ]
  ifFalse: [pkg asMCVersionName packageName]).
  versionNames sort: self mcSortFileBlock.
  fileToLoad := versionNames
  detect: (self mcDetectFileBlock: pkg)
  ifNone: [ nil ].
  fileToLoad
  ifNotNil: [version := mc versionNamed: fileToLoad.
  (version isKindOf: MCConfiguration)
  ifTrue: [^ version]
+ ifFalse: [self normalizedRepositories do: [:repo |
+ MCRepositoryGroup default addRepository: repo].
+ self normalizedRepositories do: [:repo |
+ version workingCopy repositoryGroup addRepository: repo].
- ifFalse: [MCRepositoryGroup default addRepository: self normalizedRepository.
- version workingCopy repositoryGroup addRepository: self normalizedRepository.
  loader addVersion: version].
  self logCR: ' found ' , version fileName , '...']].
  ^ loader!

Item was added:
+ ----- Method: InstallerMonticello>>normalizedRepositories (in category 'monticello') -----
+ normalizedRepositories
+ "Find an existing instance of any active repository so that we use whatever name and password the user usually uses. If not found, answer a copy"
+ ^ mc repositories replace: [:repo |
+ (self classMCRepositoryGroup default repositories includes: repo)
+ ifTrue: [repo]
+ ifFalse: [repo copy]]!

Item was removed:
- ----- Method: InstallerMonticello>>normalizedRepository (in category 'monticello') -----
- normalizedRepository
- "Find an existing instance of the active repository so that we use whatever name and password the user usually uses. If not found, answer a copy"
-
- self classMCRepositoryGroup default repositoriesDo: [:ea |
- mc = ea ifTrue: [^ ea]].
- ^ mc copy!

Item was changed:
  ----- Method: InstallerMonticello>>project: (in category 'accessing') -----
  project: name
+ | locs dirs all |
-
  project := name.
  packages := nil.
+ "mc repositories is a collection of repositories created on the fly. Store a reference to it so we have a stable working set."
+ all := mc repositories.
+ "Some repositories point to more specific parts within their structures when given a project name. An HTTP repository adds the project name to its path, for instance. A cache repository, despite being directory based, does not."
+ locs := all select: [:repo | repo respondsTo: #location:].
+ dirs := all select: [:repo | (repo respondsTo: #directory:) and: [(repo respondsTo: #cacheForPackage:) not]].
+ locs do: [:repo |
+ mc removeRepository: repo.
+ mc addRepository: (repo copy location: root , name)].
+ dirs do: [:repo |
+ mc removeRepository: repo.
+ mc addRepository: (repo copy directory: root ,'/', name)].
-
- (mc respondsTo: #location:) ifTrue:[ mc := mc copy location: root , name ].
- (mc respondsTo: #directory:) ifTrue: [ mc := mc copy directory: root ,'/', name ].
 
  ^self copy.!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Installer-Core-TestRunner.363.mcz

Frank Shearar-3
On 2 February 2013 15:10,  <[hidden email]> wrote:

> Frank Shearar uploaded a new version of Installer-Core to project The Trunk:
> http://source.squeak.org/trunk/Installer-Core-TestRunner.363.mcz
>
> ==================== Summary ====================
>
> Name: Installer-Core-TestRunner.363
> Author: TestRunner
> Time: 2 February 2013, 3:10:22.874 pm
> UUID: ea87a4c2-0b47-4035-a15e-17288bc10463
> Ancestors: Installer-Core-fbs.361, Installer-Core-fbs.362
>
> Installer repository failover #2 of 2: InstallerMonticello uses an MCRepositoryGroup, so that attempting to load a particular version will try each repository in turn. #basicView will open _all_ the InstallerMonticello's repositories.
>
> =============== Diff against Installer-Core-fbs.361 ===============

Oh for shame. TestRunner is, of course, the author initials set during
running the tests, because some tests require author initials.

Does anyone care about the awful non-attribution of this change?

frank

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Installer-Core-TestRunner.363.mcz

Frank Shearar-3
On 2 February 2013 15:40, Frank Shearar <[hidden email]> wrote:

> On 2 February 2013 15:10,  <[hidden email]> wrote:
>> Frank Shearar uploaded a new version of Installer-Core to project The Trunk:
>> http://source.squeak.org/trunk/Installer-Core-TestRunner.363.mcz
>>
>> ==================== Summary ====================
>>
>> Name: Installer-Core-TestRunner.363
>> Author: TestRunner
>> Time: 2 February 2013, 3:10:22.874 pm
>> UUID: ea87a4c2-0b47-4035-a15e-17288bc10463
>> Ancestors: Installer-Core-fbs.361, Installer-Core-fbs.362
>>
>> Installer repository failover #2 of 2: InstallerMonticello uses an MCRepositoryGroup, so that attempting to load a particular version will try each repository in turn. #basicView will open _all_ the InstallerMonticello's repositories.
>>
>> =============== Diff against Installer-Core-fbs.361 ===============
>
> Oh for shame. TestRunner is, of course, the author initials set during
> running the tests, because some tests require author initials.

And I've now adjusted the build script to only set the author initials
just before the test run, which means that the shiny updated image -
the job's artifact - shouldn't have the author initials set, while the
tainted has-run-tests image that gets thrown away runs its tests with
an authorInitials of 'TestRunner'.

frank

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Installer-Core-TestRunner.363.mcz

Chris Muller-3
> And I've now adjusted the build script to only set the author initials
> just before the test run, which means that the shiny updated image -
> the job's artifact - shouldn't have the author initials set, while the
> tainted has-run-tests image that gets thrown away runs its tests with
> an authorInitials of 'TestRunner'.

+1.  Thank you Frank!