[squeak-dev] The Inbox: Monticello-ct.728.mcz
commits at source.squeak.org
commits at source.squeak.org
Thu Sep 17 11:47:02 UTC 2020
A new version of Monticello was added to project The Inbox:
http://source.squeak.org/inbox/Monticello-ct.728.mcz
==================== Summary ====================
Name: Monticello-ct.728
Author: ct
Time: 17 September 2020, 1:47:00.019813 pm
UUID: 7d44995a-f19b-ee49-b16b-c710c9f2bce6
Ancestors: Monticello-cmm.726
Implements comparing a Monticello version against any of its ancestors. Not absolutely sure about the code quality, but it's a relevant feature for me (until now I always used to consult the Nabble archive). Also improves multilingual support.
=============== Diff against Monticello-cmm.726 ===============
Item was changed:
----- Method: MCHttpRepository>>httpGet:arguments: (in category 'private') -----
httpGet: url arguments: arguments
| progress urlString client response result |
progress := [ :total :amount |
HTTPProgress new
total: total;
amount: amount;
+ signal: 'Downloading...' translated ].
- signal: 'Downloading...' ].
urlString := arguments
ifNil: [ url ]
ifNotNil: [
| queryString |
queryString := WebUtils encodeUrlEncodedForm: arguments.
(url includes: $?)
ifTrue: [ url, '&', queryString ]
ifFalse: [ url, '?', queryString ] ].
self class useSharedWebClientInstance ifTrue: [
"Acquire webClient by atomically storing it in the client variable and setting its value to nil."
client := webClient.
webClient := nil ].
client
ifNil: [ client := WebClient new ]
ifNotNil: [
"Attempt to avoid an error on windows by recreating the underlying stream."
client isConnected ifFalse: [ client close ] ].
response := client
username: self user;
password: self password;
httpGet: urlString do: [ :request |
request
headerAt: 'Authorization' put: 'Basic ', (self user, ':', self password) base64Encoded;
headerAt: 'Connection' put: 'Keep-Alive';
headerAt: 'Accept' put: '*/*' ].
result := (response code between: 200 and: 299)
ifFalse: [
response content. "Make sure content is read."
nil ]
ifTrue: [ (RWBinaryOrTextStream with: (response contentWithProgress: progress)) reset ].
self class useSharedWebClientInstance
ifTrue: [
"Save the WebClient instance for reuse, but only if there is no client cached."
webClient
ifNil: [ webClient := client ]
ifNotNil: [ client close ] ]
ifFalse: [ client close ].
+ result ifNil: [ NetworkError signal: ('Could not access {1} (Code {2})' translated format: {location. response code}) ].
- result ifNil: [ NetworkError signal: 'Could not access ', location ].
^result!
Item was changed:
----- Method: MCRepositoryInspector>>versionListMenu: (in category 'morphic ui') -----
versionListMenu: aMenu
+
1 to: self orderSpecs size do: [ :index |
aMenu addUpdating: #orderString: target: self selector: #order: argumentList: { index } ].
aMenu addLine.
+ aMenu add: 'Changes against ...' translated action: [
+ | ri versions seen |
- aMenu add: 'Changes against ...' action: [| ri |
ri := aMenu defaultTarget.
+ versions := ri versionList
+ collect: [:name | MCVersionName on: name]
+ as: OrderedCollection.
+ seen := versions asSet.
+ self version info breadthFirstAncestors do: [:ancestor |
+ (seen includes: ancestor name) ifFalse: [
+ versions add: ancestor.
+ seen add: ancestor name]].
(UIManager default
+ chooseFrom: (versions collect: [:version | version name])
+ values: versions
+ title: 'Select version to show patch against ...' translated) ifNotNil: [:name |
+ | target base |
- chooseFrom: ri versionList
- values: ri versionList
- title: 'Select version to show patch against ...') ifNotNil: [:name |
- | versionName target base |
- versionName := MCVersionName on: name.
target := ri repository versionNamed: ri versionInfo name.
+ base := name isString
+ ifTrue: [ri repository versionNamed: name]
+ ifFalse: [ri version workingCopy repositoryGroup versionWithInfo: name].
- base := aMenu defaultTarget repository versionNamed: versionName.
(MCPatchBrowser
forPatch: (target snapshot patchRelativeToBase: base snapshot))
+ showLabelled: ('Changes from {1} to {2}' translated format: {name. ri versionInfo name})]].
- showLabelled: 'Changes from ', versionName, ' to ', ri versionInfo name]].
^aMenu!
Item was added:
+ ----- Method: MCVersionName>>name (in category 'as yet unclassified') -----
+ name
+
+ ^ self!
More information about the Squeak-dev
mailing list
|