The Inbox: Monticello-ct.728.mcz

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

The Inbox: Monticello-ct.728.mcz

commits-2
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!


Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Monticello-ct.728.mcz

Chris Muller-3
Hi Christoph,

+1 for the multilingual change.

However, the UI does already support the ability to diff between _any_ two versions via the existing browsers.  Simply opening the History browser on the descendant, and then select whichever ancestor you wish to compare to.

Best,
  Chris

On Thu, Sep 17, 2020 at 6:47 AM <[hidden email]> wrote:
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!




Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Monticello-ct.728.mcz

Christoph Thiede

Hi Chris,


thanks for the hint to the history browser! Still, this is some clicks further away. How do you think about offering all ancestor versions directly into the "changes against" menu as proposed below?


Best,

Christoph


Von: Squeak-dev <[hidden email]> im Auftrag von Chris Muller <[hidden email]>
Gesendet: Freitag, 18. September 2020 06:42:38
An: squeak dev
Betreff: Re: [squeak-dev] The Inbox: Monticello-ct.728.mcz
 
Hi Christoph,

+1 for the multilingual change.

However, the UI does already support the ability to diff between _any_ two versions via the existing browsers.  Simply opening the History browser on the descendant, and then select whichever ancestor you wish to compare to.

Best,
  Chris

On Thu, Sep 17, 2020 at 6:47 AM <[hidden email]> wrote:
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!




Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Monticello-ct.728.mcz

Chris Muller-4
I must admit, I don't quite grasp how your change affected the IDE
but... just as a matter of philosophy, it's object-centric approach is
what attracts me to Smalltalk and it's IDE.  I always want to start
with an object, and THEN send a message to it.  But command-driven
UI's, like this "Changes against...", are about, "WHAT do I want to
'do'", and THEN select the object to do it on, often via a series of
modal pop ups, which requires the user to have all the information
gathered, else must abort.  It's two rather opposite paradigms that,
together, IMO, manifest some dissonance within the UI.  It might be
refined to choose a philosophy for the IDE and stick with it.  OTOH,
Squeak's ability to appeal to so many different tastes can also be
regarded as attractive and an impressive accomplishment.


 - Chris


On Sat, Sep 19, 2020 at 6:39 AM Thiede, Christoph
<[hidden email]> wrote:

>
> Hi Chris,
>
>
> thanks for the hint to the history browser! Still, this is some clicks further away. How do you think about offering all ancestor versions directly into the "changes against" menu as proposed below?
>
>
> Best,
>
> Christoph
>
> ________________________________
> Von: Squeak-dev <[hidden email]> im Auftrag von Chris Muller <[hidden email]>
> Gesendet: Freitag, 18. September 2020 06:42:38
> An: squeak dev
> Betreff: Re: [squeak-dev] The Inbox: Monticello-ct.728.mcz
>
> Hi Christoph,
>
> +1 for the multilingual change.
>
> However, the UI does already support the ability to diff between _any_ two versions via the existing browsers.  Simply opening the History browser on the descendant, and then select whichever ancestor you wish to compare to.
>
> Best,
>   Chris
>
> On Thu, Sep 17, 2020 at 6:47 AM <[hidden email]> wrote:
>>
>> 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!
>>
>>