"{ Package: 'stx:goodies/monticello' }"
"{ NameSpace: Smalltalk }"
MCHttpRepository subclass:#MCSqueaksourceRepository
instanceVariableNames:''
classVariableNames:''
poolDictionaries:''
category:'SCM-Monticello-RemoteRepositories'
!
MCSqueaksourceRepository comment:'I am a specialized MCHttpRepository for http://squeaksource.com.
I optimize checks for existing files by doing a head request instead of reloading the whole file list first.'
!
!MCSqueaksourceRepository class methodsFor:'accessing'!
description
^ 'squeaksource.com'
! !
!MCSqueaksourceRepository class methodsFor:'creation template'!
baseURL
^ 'http://squeaksource.com/'
! !
!MCSqueaksourceRepository class methodsFor:'testing'!
isResponsibleFor: aUrl
^ aUrl includesSubstring: 'squeaksource.com/'
! !
!MCSqueaksourceRepository methodsFor:'*Komitter-Models'!
koRemote
^ KomitSqueakSourceRemote new
remote: self;
yourself
! !
!MCSqueaksourceRepository methodsFor:'interface'!
includesFileNamed: aString
"avoid the slower default method and simply do a head request "
self httpClient
numberOfRetries: 0;
ifFail: [ :exception |
((exception isKindOf: ZnHttpUnsuccessful) and: [ exception response isNotFound ])
ifTrue: [ ^ false ].
exception pass];
head: (self urlForFileNamed: aString).
^ true
!
includesVersionNamed: aString
"directly do a filename check since squeaksource only stores mcz"
^ self includesFileNamed: aString, '.mcz'
! !
!MCSqueaksourceRepository class methodsFor:'documentation'!
version
^ '$Header$'
!
version_CVS
^ '$Header$'
! !