[Pkg] Squeak3.11 Contributions: MethodAuthorship-mtf.19.mcz

squeak-dev-noreply at lists.squeakfoundation.org squeak-dev-noreply at lists.squeakfoundation.org
Mon Feb 9 06:09:24 UTC 2009


A new version of MethodAuthorship was added to project Squeak3.11 Contributions:
http://www.squeaksource.com/311/MethodAuthorship-mtf.19.mcz

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

Name: MethodAuthorship-mtf.19
Author: mtf
Time: 9 February 2009, 1:09:20 am
UUID: 6c9561e1-76c4-4569-b507-86c604214a7f
Ancestors: MethodAuthorship-mtf.18

finished making paths relative

=============== Diff against MethodAuthorship-mtf.18 ===============

Item was added:
+ ----- Method: FileDirectory>>relativeReadOnlyFileNamed: (in category '*methodauthorship') -----
+ relativeReadOnlyFileNamed: aFileName
+ 	
+ 	| path |
+ 	(self pathName beginsWith: FileDirectory default pathName)
+ 		ifFalse: [^ self readOnlyFileNamed: aFileName].
+ 	path := (self fullPathFor: aFileName) allButFirst: (FileDirectory default pathName size + 1).
+ 	^ FileStream concreteStream new open: path forWrite: false!

Item was changed:
  ----- Method: MethodHistoryDatabase>>processLiveListNamed: (in category 'all') -----
  processLiveListNamed: aFileName
  
  	| file |
+ 	file := FileStream concreteStream new open: aFileName forWrite: false.
- 	file := FileStream readOnlyFileNamed: aFileName.
  	file wantsLineEndConversion: true.
  	file linesDo: [:line |
  		self processLiveMethod: line
  	].
  	file close.
  !

Item was changed:
  ----- Method: MethodHistoryDatabase>>readFilesIn:updateFile:versionName: (in category 'all') -----
  readFilesIn: dir updateFile: updateFileName versionName: versionName
  
  	| updates more line file encoding |
  	updates := dir readOnlyFileNamed: updateFileName.
  	more := true.
  	[more] whileTrue: [
  		updates atEnd ifTrue: [updates close. ^ self].
  		line := updates upTo: Character cr.
  		line ifNil: [updates close. ^ self].
  		line size > 0 ifTrue: [
  			line first = $# ifTrue: [
  				(line copyFrom: 2 to: line size) = versionName ifTrue: [more := false]].
  		].
  	].
  	more := true.
  	[more] whileTrue: [
  		updates atEnd ifTrue: [updates close. ^ self].
  		line := updates upTo: Character cr.
  		line ifNil: [^ self].
  		(line first = $#) ifTrue: [^ self].
+ 		file := dir relativeReadOnlyFileNamed: line.
- 		file := dir readOnlyFileNamed: line.
  		file binary.
  		encoding := ((file next: 3) = (ByteArray with: 16rEF with: 16rBB with: 16rBF)) ifTrue: ['utf-8'] ifFalse: ['mac-roman'].
  		self readFile: file fullName encodingName: encoding.
  	].
  !

Item was changed:
  ----- Method: MethodHistoryDatabase class>>liveListAt:putFromFileName: (in category 'all') -----
  liveListAt: dataName putFromFileName: fileName
  
  	| file strs meta cls meth dic |
  	dic := IdentityDictionary new.
+ 	file := FileStream concreteStream new open: fileName forWrite: false.
- 	file := FileStream readOnlyFileNamed: fileName.
  	file wantsLineEndConversion: true.
  	file contentsOfEntireFile linesDo: [:line |
  		strs := line substrings.
  		meta := strs size = 3.
  		cls := strs first, (meta ifTrue: [' class'] ifFalse: ['']).
  		meth := strs last.
  		(dic at: cls asSymbol ifAbsentPut: [IdentitySet new]) add: meth asSymbol.
  	].
  	file close.
  	self liveLists at: dataName put: dic.
  !



More information about the Packages mailing list