MCHttpRepository.st
author Claus Gittinger <cg@exept.de>
Sun, 26 Aug 2018 14:42:26 +0200
changeset 1053 86dccda75716
parent 1021 7ec8dc1c6c82
child 1069 5ea6b7f00935
permissions -rw-r--r--
#FEATURE by cg class: MCHttpRepository class definition added:17 methods comment/format in: #readStreamForFileNamed:do: changed: #parseFileNamesFromStream: (send #urlDecoded instead of #unescapePercents) #password #urlForFileNamed: (send #urlEncoded instead of #utf8Encoded) class: MCHttpRepository class added: #baseURL #basicFromUrl: #documentation #fillInTheBlankRequest #isResponsibleFor: #location: #morphicConfigure #pharoInboxRepository #pharoLocations #pharoRepository #project: #repositoryClassFor: #urlSchemes comment/format in: #clearPasswords changed: #creationTemplateLocation:user:password:
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1021
7ec8dc1c6c82 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
     1
"{ Encoding: utf8 }"
7ec8dc1c6c82 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
     2
113
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     3
"{ Package: 'stx:goodies/monticello' }"
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
1021
7ec8dc1c6c82 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
     5
"{ NameSpace: Smalltalk }"
7ec8dc1c6c82 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
     6
113
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     7
MCFileBasedRepository subclass:#MCHttpRepository
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     8
	instanceVariableNames:'location user password readerCache'
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     9
	classVariableNames:''
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    10
	poolDictionaries:''
1053
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    11
	category:'SCM-Monticello-RemoteRepositories'
113
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
!
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
1053
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    14
!MCHttpRepository class methodsFor:'documentation'!
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    15
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    16
documentation
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    17
"
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    18
    I am general http repository for monticello.
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    19
    I support the general protocol for listing files in a remote repository.
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    20
"
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    21
! !
113
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
192
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
    23
!MCHttpRepository class methodsFor:'initialization'!
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
    24
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
    25
clearPasswords
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
    26
	self allSubInstancesDo: [:ea | ea password: ''].
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
    27
! !
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
    28
909
b63cf5148da4 categories
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
    29
!MCHttpRepository class methodsFor:'instance creation'!
b63cf5148da4 categories
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
    30
1053
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    31
basicFromUrl: aZnUrl
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    32
	^ aZnUrl hasUsername
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    33
		ifFalse: [ self location: aZnUrl location ]
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    34
		ifTrue: [ (self repositoryClassFor: aZnUrl location) new
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    35
				location: aZnUrl location;
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    36
				user: aZnUrl username;
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    37
				password: aZnUrl password;
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    38
				yourself  ]
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    39
!
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    40
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    41
location: location
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    42
	^ MCServerRegistry uniqueInstance 
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    43
		repositoryAt: location credentialsDo: [ :username :password |
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    44
			(self repositoryClassFor: location) new
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    45
				location: location;
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    46
				user: username;
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    47
				password: password;
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    48
				yourself ]
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    49
!
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    50
909
b63cf5148da4 categories
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
    51
location: location user: user password: password
b63cf5148da4 categories
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
    52
	^ self new
b63cf5148da4 categories
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
    53
		location: location;
b63cf5148da4 categories
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
    54
		user: user;
b63cf5148da4 categories
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
    55
		password: password
1053
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    56
!
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    57
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    58
pharoInboxRepository
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    59
	^ self location: 'http://smalltalkhub.com/mc/Pharo/Pharo60Inbox/main'.
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    60
!
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    61
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    62
pharoRepository
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    63
	^ self location: 'http://smalltalkhub.com/mc/Pharo/Pharo60/main'.
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    64
!
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    65
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    66
project: aProjectIdentifier
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    67
	^ self location: self baseURL, aProjectIdentifier
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    68
!
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    69
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    70
repositoryClassFor: location
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    71
	MCHttpRepository subclassesDo: [ :subclass | 
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    72
		(subclass isResponsibleFor: location)
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    73
			ifTrue: [ ^ subclass ]].
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    74
	^ MCHttpRepository
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    75
! !
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    76
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    77
!MCHttpRepository class methodsFor:'*Komitter-Models'!
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    78
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    79
pharoLocations
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    80
	"Answer the locations for both pharo and pharo inbox repositories.
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    81
	No commit should actually be pushed directly there"
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    82
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    83
	^ #('http://smalltalkhub.com/mc/Pharo/Pharo60/main' 
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    84
		'http://smalltalkhub.com/mc/Pharo/Pharo60/main/' 
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    85
		'http://smalltalkhub.com/mc/Pharo/Pharo60Inbox/main'
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    86
		'http://smalltalkhub.com/mc/Pharo/Pharo60Inbox/main/'
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    87
		'http://smalltalkhub.com/mc/Pharo/Pharo50Inbox/main'
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    88
		'http://smalltalkhub.com/mc/Pharo/Pharo50Inbox/main/')
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    89
! !
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    90
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    91
!MCHttpRepository class methodsFor:'*MonticelloGUI'!
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    92
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    93
fillInTheBlankRequest
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    94
	^ 'HTTP Repository:'
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    95
			
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    96
!
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    97
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    98
morphicConfigure
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
    99
	^ self fillInTheBlankConfigure
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   100
! !
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   101
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   102
!MCHttpRepository class methodsFor:'accessing'!
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   103
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   104
baseURL
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   105
	^ ''
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   106
!
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   107
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   108
urlSchemes
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   109
	^ #(http https)
909
b63cf5148da4 categories
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
   110
! !
b63cf5148da4 categories
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
   111
b63cf5148da4 categories
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
   112
!MCHttpRepository class methodsFor:'queries'!
113
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   113
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   114
creationTemplate
192
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   115
	^self creationTemplateLocation: 'http://www.squeaksource.com/'
113
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   116
		user: 'squeak'
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   117
		password: 'squeak'
192
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   118
113
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   119
!
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   120
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   121
creationTemplateLocation: location user: user password: password
192
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   122
        ^
1053
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   123
self name,'
192
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   124
        location: %1
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   125
        user: %2
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   126
        password: %3' 
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   127
            bindWith: location storeString 
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   128
            with: user storeString
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   129
            with: password storeString
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   130
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   131
    "Modified: / 16-09-2010 / 14:34:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1053
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   132
    "Modified: / 26-08-2018 / 14:28:47 / Claus Gittinger"
113
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   133
!
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   134
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   135
description
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   136
	^ 'HTTP'
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   137
! !
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   138
1053
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   139
!MCHttpRepository class methodsFor:'testing'!
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   140
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   141
isResponsibleFor: aURLString
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   142
	"Override in subclasses to enable custom instances for certain URLs"
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   143
	^ true
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   144
! !
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   145
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   146
!MCHttpRepository methodsFor:'*Komitter-Models'!
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   147
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   148
isPrivatePharoRepository
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   149
	
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   150
	^ self class pharoLocations includes: self location
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   151
!
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   152
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   153
isRemote
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   154
	^ self isPrivatePharoRepository not
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   155
!
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   156
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   157
koRemote
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   158
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   159
	^ KomitHttpRemote new
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   160
		remote: self;
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   161
		yourself
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   162
! !
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   163
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   164
!MCHttpRepository methodsFor:'*metacello-mc'!
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   165
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   166
asRepositorySpecFor: aMetacelloMCProject
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   167
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   168
	^(aMetacelloMCProject repositorySpec)
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   169
		description:  self description;
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   170
	 	type: 'http';
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   171
		yourself
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   172
! !
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   173
909
b63cf5148da4 categories
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
   174
!MCHttpRepository methodsFor:'accessing'!
113
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   175
1053
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   176
credentials
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   177
	^ MCServerCredentials user: self user password: self password
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   178
!
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   179
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   180
credentials: mcServerCredentials
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   181
	self user: mcServerCredentials username.
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   182
	self password: mcServerCredentials password.
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   183
!
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   184
778
3cdbfc6ff7da class: MCHttpRepository
Claus Gittinger <cg@exept.de>
parents: 632
diff changeset
   185
location
3cdbfc6ff7da class: MCHttpRepository
Claus Gittinger <cg@exept.de>
parents: 632
diff changeset
   186
      ^location 
3cdbfc6ff7da class: MCHttpRepository
Claus Gittinger <cg@exept.de>
parents: 632
diff changeset
   187
!
3cdbfc6ff7da class: MCHttpRepository
Claus Gittinger <cg@exept.de>
parents: 632
diff changeset
   188
113
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   189
location: aUrlString
192
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   190
	location := aUrlString
113
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   191
!
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   192
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   193
locationWithTrailingSlash
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   194
	^ (location endsWith: '/')
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   195
		ifTrue: [location]
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   196
		ifFalse: [location, '/']
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   197
!
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   198
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   199
password
1021
7ec8dc1c6c82 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
   200
        self userAndPasswordFromSettingsDo: [:usr :pwd | ^pwd].
7ec8dc1c6c82 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
   201
1053
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   202
        self user isEmpty ifTrue: [^password ? ''].
113
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   203
1021
7ec8dc1c6c82 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
   204
        [password isEmpty] whileTrue: [
7ec8dc1c6c82 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
   205
                | answer dialog |
7ec8dc1c6c82 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
   206
7ec8dc1c6c82 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
   207
                dialog := UIManager isNil ifTrue:[Dialog] ifFalse:[ UIManager default ].
113
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   208
1021
7ec8dc1c6c82 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
   209
                "Give the user a chance to change the login"
7ec8dc1c6c82 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
   210
                answer := dialog request: 'User name for ' translated, String cr, location
7ec8dc1c6c82 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
   211
                        initialAnswer: self user.
7ec8dc1c6c82 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
   212
                answer isEmpty
7ec8dc1c6c82 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
   213
                        ifTrue: [^password]
7ec8dc1c6c82 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
   214
                        ifFalse: [self user: answer].
7ec8dc1c6c82 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
   215
                
7ec8dc1c6c82 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
   216
                password := UIManager default requestPassword: 'Password for' translated, ' "', self user, '" ', 'at ' translated, String cr, location.
7ec8dc1c6c82 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
   217
        ].
113
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   218
1021
7ec8dc1c6c82 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
   219
        ^ password
1053
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   220
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   221
    "Modified: / 26-08-2018 / 12:37:33 / Claus Gittinger"
113
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   222
!
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   223
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   224
password: passwordString
192
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   225
	password := passwordString
113
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   226
!
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   227
1053
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   228
project
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   229
	"Return a project name"
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   230
	^ (self location splitOn: $/) last
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   231
!
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   232
113
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   233
user
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   234
	self userAndPasswordFromSettingsDo: [:usr :pwd | ^usr].
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   235
	"not in settings"
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   236
	^user
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   237
!
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   238
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   239
user: userString
192
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   240
	user := userString
909
b63cf5148da4 categories
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
   241
! !
b63cf5148da4 categories
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
   242
1053
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   243
!MCHttpRepository methodsFor:'actions'!
909
b63cf5148da4 categories
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
   244
b63cf5148da4 categories
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
   245
parseFileNamesFromStream: aStream
b63cf5148da4 categories
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
   246
	| names fullName |
b63cf5148da4 categories
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
   247
	names := OrderedCollection new.
b63cf5148da4 categories
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
   248
	[aStream atEnd] whileFalse:
b63cf5148da4 categories
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
   249
		[[aStream upTo: $<. {$a. $A. nil} includes: aStream next] whileFalse.
b63cf5148da4 categories
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
   250
		aStream upTo: $".
b63cf5148da4 categories
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
   251
		aStream atEnd ifFalse: [
b63cf5148da4 categories
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
   252
			fullName := aStream upTo: $".
1053
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   253
			names add: fullName urlDecoded ]].
909
b63cf5148da4 categories
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
   254
	^ names
113
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   255
!
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   256
1053
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   257
retryOnCredentialRequest: aBlock
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   258
	aBlock	on: MCPermissionDenied do: [ :error | |credentials| 
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   259
		credentials := MCCredentialsRequest 
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   260
							signalUrl: self location
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   261
							username: self user
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   262
							password: self password.
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   263
		credentials 
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   264
			ifNotNil: [ 
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   265
				self credentials: credentials.
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   266
				^ self retryOnCredentialRequest: aBlock ]]
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   267
!
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   268
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   269
urlForFileNamed: aString
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   270
	^ self locationWithTrailingSlash, aString urlEncoded
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   271
! !
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   272
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   273
!MCHttpRepository methodsFor:'as yet unclassified'!
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   274
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   275
asCreationTemplate
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   276
	^self class creationTemplateLocation: location user: user password: password
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   277
!
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   278
113
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   279
userAndPasswordFromSettingsDo: aBlock
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   280
	"The mcSettings file in ExternalSettings preferenceDirectory should contain entries for each account:
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   281
	
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   282
		account1: *myhost.mydomain* user:password
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   283
		account2: *otherhost.mydomain/somerep* dXNlcjpwYXNzd29yZA==
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   284
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   285
	That is it must start with 'account', followed by anything to distinguish accounts, and a colon. Then comes a match expression for the repository url, and after a space the user:password string.
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   286
	
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   287
	To not have the clear text password on your disc, you can base64 encode it:
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   288
			(Base64MimeConverter mimeEncode: 'user:password' readStream) contents
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   289
	"
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   290
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   291
	| entry userAndPassword |
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   292
	Settings ifNotNil: [
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   293
		Settings keysAndValuesDo: [:key :value |
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   294
			(key asLowercase beginsWith: 'account') ifTrue: [
192
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   295
				entry := value findTokens: '	 '.
113
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   296
				(entry first match: location) ifTrue: [
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   297
					userAndPassword := entry second.
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   298
					(userAndPassword includes: $:) ifFalse: [
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   299
						userAndPassword := (Base64MimeConverter mimeDecodeToChars: userAndPassword readStream) contents].
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   300
					userAndPassword := userAndPassword findTokens: $:.
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   301
					^aBlock value: userAndPassword first 
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   302
						value: userAndPassword second 
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   303
					]
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   304
			]
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   305
		]
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   306
	].
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   307
	^nil
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   308
!
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   309
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   310
versionReaderForFileNamed: aString
192
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   311
	readerCache ifNil: [readerCache := Dictionary new].
113
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   312
	^ readerCache at: aString ifAbsent:
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   313
		[self resizeCache: readerCache.
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   314
		super versionReaderForFileNamed: aString do:
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   315
			[:r |
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   316
			r ifNotNil: [readerCache at: aString put: r]]]
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   317
	
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   318
!
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   319
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   320
versionReaderForFileNamed: aString do: aBlock
192
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   321
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   322
    | r |
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   323
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   324
    ^(r := self versionReaderForFileNamed: aString) ifNotNil: [aBlock value: r]
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   325
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   326
    "Modified: / 14-09-2010 / 19:39:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   327
! !
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   328
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   329
!MCHttpRepository methodsFor:'displaying'!
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   330
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   331
displayString
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   332
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   333
    ^location
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   334
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   335
    "Created: / 14-09-2010 / 23:20:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
113
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   336
! !
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   337
1053
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   338
!MCHttpRepository methodsFor:'i/o'!
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   339
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   340
cacheRawVersionNamed: aString stream: contents
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   341
	"directly forward the contents to the cache repository. 
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   342
	this avoids and unnecessary serialization step"
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   343
	MCCacheRepository uniqueInstance 
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   344
		writeStreamForFileNamed: aString 
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   345
		replace: true 
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   346
		do: [ :s| s nextPutAll: contents ]
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   347
!
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   348
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   349
displayProgress: label during: workBlock
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   350
	| nextUpdateTime |
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   351
	nextUpdateTime := 0.
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   352
	^UIManager default displayProgress: label 
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   353
		from: 0.0 to: 1.0 during:[:bar|
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   354
			[workBlock value] on: HTTPProgress do:[:ex|
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   355
				(ex total == nil or: [ex amount == nil]) ifFalse:[
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   356
					(nextUpdateTime < Time millisecondClockValue 
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   357
						or:[ex total = ex amount]) ifTrue:[
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   358
							bar current: ex amount asFloat / ex total asFloat.
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   359
							nextUpdateTime := Time millisecondClockValue + 100.
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   360
					].
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   361
				].
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   362
				ex resume.
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   363
			]
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   364
		].
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   365
!
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   366
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   367
handleUnsuccessfulResponse: aZnResponse
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   368
	(#(403 401) includes: aZnResponse code)
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   369
		ifTrue: [ MCPermissionDenied signalFor: self ].
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   370
	Error signal: 'Could not save version.'
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   371
!
909
b63cf5148da4 categories
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
   372
1053
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   373
loadAllFileNames
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   374
	| client |
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   375
	self displayProgress: 'Loading all file names from ', self description during: [
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   376
		client := self httpClient.
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   377
		client
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   378
			ifFail: [ :exception | 
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   379
				(exception className beginsWith: 'Zn')
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   380
					ifTrue: [ MCRepositoryError signal: 'Could not access ', self location, ': ', exception printString ]
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   381
					ifFalse: [ exception pass ] ];
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   382
			url: self locationWithTrailingSlash;
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   383
			queryAt: 'C' put: 'M;O=D';	"legacy that some servers maybe expect"
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   384
			get.
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   385
		self assertNonBinaryResponse: client response ].
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   386
	^ self parseFileNamesFromStream: client contents readStream
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   387
! !
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   388
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   389
!MCHttpRepository methodsFor:'private'!
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   390
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   391
assertBinaryResponse: response 
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   392
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   393
	response contentType isBinary ifFalse: [ 
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   394
		MCRepositoryError signal: 'Expected a binary response instead of ', response contentType printString ].
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   395
!
909
b63cf5148da4 categories
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
   396
1053
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   397
assertNonBinaryResponse: response 
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   398
	
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   399
	response contentType isBinary ifTrue: [ MCRepositoryError signal: 'Did not expect a binary response but got ', response contentType printString ].
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   400
!
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   401
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   402
entityStreamContents: aBlock
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   403
	"Generate output in a buffer because we need the length"
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   404
	
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   405
	| stream |
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   406
	stream := RWBinaryOrTextStream on: String new.
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   407
	aBlock value: stream.
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   408
	stream reset.
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   409
	^ (ZnStreamingEntity type: ZnMimeType applicationOctetStream)
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   410
		stream: stream;
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   411
		contentLength: stream size;
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   412
		yourself
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   413
!
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   414
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   415
httpClient
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   416
	"Return a new, specifically configured instance of the HTTP client for internal use.
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   417
	Note how we request GZIP compression and will signal progress."
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   418
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   419
	^ ZnClient new
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   420
		systemPolicy;
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   421
		beOneShot;
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   422
		username: self user password: self password;
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   423
	
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   424
		signalProgress: true;
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   425
		yourself
909
b63cf5148da4 categories
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
   426
! !
b63cf5148da4 categories
Claus Gittinger <cg@exept.de>
parents: 778
diff changeset
   427
113
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   428
!MCHttpRepository methodsFor:'required'!
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   429
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   430
allFileNames
192
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   431
        | response |
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   432
        response := HTTPInterface get: self locationWithTrailingSlash, '?C=M;O=D' userName: self user password: self password.
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   433
        response responseCode ~= 200 
473
a2892180d5fc changed: #allFileNames
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   434
            ifTrue: [self error:('Could not access "',location,'" (',response response asString,')')].
192
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   435
        ^ self parseFileNamesFromStream: response data readStream
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   436
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   437
    "Modified: / 14-09-2010 / 19:16:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
473
a2892180d5fc changed: #allFileNames
Claus Gittinger <cg@exept.de>
parents: 277
diff changeset
   438
    "Modified: / 07-09-2011 / 12:34:23 / cg"
113
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   439
!
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   440
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   441
description
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   442
	^ location
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   443
!
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   444
192
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   445
flushCache
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   446
	super flushCache.
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   447
	readerCache := nil.
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   448
!
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   449
113
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   450
readStreamForFileNamed: aString do: aBlock
192
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   451
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   452
    | response |
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   453
    response := HTTPInterface get: (self urlForFileNamed: aString) userName: self user password: self password.
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   454
    ^response responseCode == 200 
1053
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   455
        ifTrue: [
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   456
            "/ self assertBinaryResponse: client response.
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   457
            "immediately cache the version and avoid an unnecessary serialization"
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   458
            "/ self cacheRawVersionNamed: aString stream: client contents ].
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   459
            aBlock value: response data readStream.
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   460
        ].
192
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   461
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   462
    "Modified: / 14-09-2010 / 19:38:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1053
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   463
    "Modified (format): / 26-08-2018 / 14:17:03 / Claus Gittinger"
113
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   464
!
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   465
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   466
writeStreamForFileNamed: aString replace: ignoreBoolean do: aBlock
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   467
	| stream response |
192
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   468
	stream := RWBinaryOrTextStream on: String new.
113
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   469
	aBlock value: stream.
192
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   470
	response := HTTPSocket
113
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   471
					httpPut: stream contents
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   472
					to: (self urlForFileNamed: aString)
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   473
					user: self user
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   474
					passwd: self password.
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   475
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   476
	(#( 'HTTP/1.1 201 ' 'HTTP/1.1 200 ' 'HTTP/1.0 201 ' 'HTTP/1.0 200 ')
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   477
		anySatisfy: [:code | response beginsWith: code ])
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   478
			ifFalse: [self error: response].
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   479
! !
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   480
1053
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   481
!MCHttpRepository methodsFor:'storing'!
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   482
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   483
storeVersion: aVersion
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   484
	self retryOnCredentialRequest: [ super storeVersion: aVersion ]
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   485
! !
86dccda75716 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
   486
113
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   487
!MCHttpRepository class methodsFor:'documentation'!
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   488
277
8a5d4e015717 initial checkin
Claus Gittinger <cg@exept.de>
parents: 192
diff changeset
   489
version
1021
7ec8dc1c6c82 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
   490
    ^ '$Header$'
277
8a5d4e015717 initial checkin
Claus Gittinger <cg@exept.de>
parents: 192
diff changeset
   491
!
8a5d4e015717 initial checkin
Claus Gittinger <cg@exept.de>
parents: 192
diff changeset
   492
192
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   493
version_CVS
1021
7ec8dc1c6c82 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
   494
    ^ '$Header$'
192
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   495
!
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   496
567ecbaf1c88 added: #version_CVS
Claus Gittinger <cg@exept.de>
parents: 113
diff changeset
   497
version_SVN
1021
7ec8dc1c6c82 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 909
diff changeset
   498
    ^ '$Id$'
113
e72af2ae0071 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   499
! !
778
3cdbfc6ff7da class: MCHttpRepository
Claus Gittinger <cg@exept.de>
parents: 632
diff changeset
   500