Etoys Inbox: Monticello-kfr.405.mcz

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

Etoys Inbox: Monticello-kfr.405.mcz

commits-2
A new version of Monticello was added to project Etoys Inbox:
http://source.squeak.org/etoysinbox/Monticello-kfr.405.mcz

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

Name: Monticello-kfr.405
Author: kfr
Time: 30 May 2011, 6:21:41 am
UUID: 8ad3427e-ec11-c049-b9af-61a7564b86af
Ancestors: Monticello-kfr.404

Add repository password and user intitials if missing

=============== Diff against Monticello-kfr.403 ===============

Item was changed:
  ----- Method: MCHttpRepository>>writeStreamForFileNamed:replace:do: (in category 'required') -----
  writeStreamForFileNamed: aString replace: ignoreBoolean do: aBlock
  | stream response statusLine code |
  stream := RWBinaryOrTextStream on: String new.
  aBlock value: stream.
  self displayProgress: 'Uploading ', aString during:[
  response := HTTPSocket
  httpPut: stream contents
  to: (self urlForFileNamed: aString)
  user: self user
  passwd: self password.
  ].
  "More robust handling of HTTP responses. Instead of enumerating
  all possible return codes and http versions, do a quick parse"
  (response beginsWith: 'HTTP/') ifTrue:[
  "Looks like an HTTP header, not some error message"
  statusLine := response copyUpTo: Character cr.
  code := [(statusLine findTokens: ' ') second asInteger] on: Error do:[].
  ].
  (code isInteger and:[code between: 200 and: 299])
+ ifFalse:[ (code isInteger and:[code = 401])
+ ifTrue:[MCWorkingCopyBrowser editRepository. self storeVersion:aString]
+                             ifFalse:[self error: response]].!
- ifFalse:[self error: response].!

_______________________________________________
etoys-dev mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/etoys-dev