Some GT tool for this?

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

Some GT tool for this?

Mariano Martinez Peck
How many times have you tried to search a string as a comment of a commit in all the history? Myself: many many times. I know we need much better tools for that, store the history in a another way, provide a nicer API, etc etc. And I know there were topics about that. 

However, I would deeply appreciate a very short term solution for ease that. The model side is as simple as this:

| packageName ancestry anscestors substring | 
packageName := 'MyPackageXX'.
substring := 'whatever I want to search'.
ancestry := (MCWorkingCopy allManagers detect: [:each | each packageName = packageName] ) ancestry.  
anscestors := ancestry withBreadthFirstAncestors select: [:each | each isKindOf: MCVersionInfo].
anscestors select: [ :each | each message includesSubstring: substring ]

Do you think it's worth a simple UI tool? Custom inspector of MCAncestry?

Cheers,


Reply | Threaded
Open this post in threaded view
|

Re: Some GT tool for this?

Eliot Miranda-2
Hi Mariano,

    for this in Squeak I added a simple menu pick to the Monticello Browser's package list menu called "search history" which opens up a workspace containing the entire history as a flat string.  I then just search using ctrl-f.  You can find it in a current squeak trunk image.

_,,,^..^,,,_ (phone)

On Dec 10, 2015, at 9:12 AM, Mariano Martinez Peck <[hidden email]> wrote:

How many times have you tried to search a string as a comment of a commit in all the history? Myself: many many times. I know we need much better tools for that, store the history in a another way, provide a nicer API, etc etc. And I know there were topics about that. 

However, I would deeply appreciate a very short term solution for ease that. The model side is as simple as this:

| packageName ancestry anscestors substring | 
packageName := 'MyPackageXX'.
substring := 'whatever I want to search'.
ancestry := (MCWorkingCopy allManagers detect: [:each | each packageName = packageName] ) ancestry.  
anscestors := ancestry withBreadthFirstAncestors select: [:each | each isKindOf: MCVersionInfo].
anscestors select: [ :each | each message includesSubstring: substring ]

Do you think it's worth a simple UI tool? Custom inspector of MCAncestry?

Cheers,


Reply | Threaded
Open this post in threaded view
|

Re: Some GT tool for this?

Andrei Chis
You can add the two methods below. Then when you open Spotter on a package you can also search through it's history.
This will trigger an update if the history is not present, but Spotter will still respond quite fast.

You can also dive in a MCVersionInfo to see its ancestors.

RPackage>>spotterHistoryFor: aStep
<spotterOrder: 100>
aStep listProcessor
title: 'History';
allCandidates: [ |ancestry|
ancestry := (MCWorkingCopy allManagers detect: [:each | each packageName = self name]) ancestry.
ancestry withBreadthFirstAncestors select: [:each | each isKindOf: MCVersionInfo] ];
candidatesLimit: 50;
itemName: [ :each | each name, ' - ', each message ];
filter: GTFilterSubstrings

MCVersionInfo>>spotterPreviewCodeIn: aComposite
<spotterPreview: 10>
aComposite text
title: 'Summary';
display: [ 
self summaryHeader, String cr,
'Message:', String cr, self message ];
entity: self.
Cheers,
Andrei



On Fri, Dec 11, 2015 at 4:52 PM, Eliot Miranda <[hidden email]> wrote:
Hi Mariano,

    for this in Squeak I added a simple menu pick to the Monticello Browser's package list menu called "search history" which opens up a workspace containing the entire history as a flat string.  I then just search using ctrl-f.  You can find it in a current squeak trunk image.

_,,,^..^,,,_ (phone)

On Dec 10, 2015, at 9:12 AM, Mariano Martinez Peck <[hidden email]> wrote:

How many times have you tried to search a string as a comment of a commit in all the history? Myself: many many times. I know we need much better tools for that, store the history in a another way, provide a nicer API, etc etc. And I know there were topics about that. 

However, I would deeply appreciate a very short term solution for ease that. The model side is as simple as this:

| packageName ancestry anscestors substring | 
packageName := 'MyPackageXX'.
substring := 'whatever I want to search'.
ancestry := (MCWorkingCopy allManagers detect: [:each | each packageName = packageName] ) ancestry.  
anscestors := ancestry withBreadthFirstAncestors select: [:each | each isKindOf: MCVersionInfo].
anscestors select: [ :each | each message includesSubstring: substring ]

Do you think it's worth a simple UI tool? Custom inspector of MCAncestry?

Cheers,



Reply | Threaded
Open this post in threaded view
|

Re: Some GT tool for this?

Mariano Martinez Peck
In reply to this post by Eliot Miranda-2


On Fri, Dec 11, 2015 at 12:52 PM, Eliot Miranda <[hidden email]> wrote:
Hi Mariano,

    for this in Squeak I added a simple menu pick to the Monticello Browser's package list menu called "search history" which opens up a workspace containing the entire history as a flat string.  I then just search using ctrl-f.  You can find it in a current squeak trunk image.


Hi Eliot, 

Yes, I was thinking the same.  In the meanwhile, I did this extension:

MCWorkingCopy >> gtInspectorIrIn: composite
<gtInspectorPresentationOrder: 30> 
composite text 
title: 'History';
display: [ :workingCopy |
TimeProfiler spyOn: [| stream versionInfos |
stream := String new writeStream. 
versionInfos := workingCopy ancestry withBreadthFirstAncestors select: [:each | each isKindOf: MCVersionInfo].
versionInfos do: [ :each | 
stream nextPutAll: each summary; cr; cr.
].
stream contents.].
]

And then I can use the regular cmd+f to search the string.
But I have to manually inspect the package doing something like:


(MCWorkingCopy allManagers detect: [:each | each packageName = 'MyPackage']) inspect.


 
_,,,^..^,,,_ (phone)

On Dec 10, 2015, at 9:12 AM, Mariano Martinez Peck <[hidden email]> wrote:

How many times have you tried to search a string as a comment of a commit in all the history? Myself: many many times. I know we need much better tools for that, store the history in a another way, provide a nicer API, etc etc. And I know there were topics about that. 

However, I would deeply appreciate a very short term solution for ease that. The model side is as simple as this:

| packageName ancestry anscestors substring | 
packageName := 'MyPackageXX'.
substring := 'whatever I want to search'.
ancestry := (MCWorkingCopy allManagers detect: [:each | each packageName = packageName] ) ancestry.  
anscestors := ancestry withBreadthFirstAncestors select: [:each | each isKindOf: MCVersionInfo].
anscestors select: [ :each | each message includesSubstring: substring ]

Do you think it's worth a simple UI tool? Custom inspector of MCAncestry?

Cheers,





--
Reply | Threaded
Open this post in threaded view
|

Re: Some GT tool for this?

Mariano Martinez Peck
In reply to this post by Andrei Chis


On Fri, Dec 11, 2015 at 4:01 PM, Andrei Chis <[hidden email]> wrote:
You can add the two methods below. Then when you open Spotter on a package you can also search through it's history.
This will trigger an update if the history is not present, but Spotter will still respond quite fast.

You can also dive in a MCVersionInfo to see its ancestors.

RPackage>>spotterHistoryFor: aStep
<spotterOrder: 100>
aStep listProcessor
title: 'History';
allCandidates: [ |ancestry|
ancestry := (MCWorkingCopy allManagers detect: [:each | each packageName = self name]) ancestry.
ancestry withBreadthFirstAncestors select: [:each | each isKindOf: MCVersionInfo] ];
candidatesLimit: 50;
itemName: [ :each | each name, ' - ', each message ];
filter: GTFilterSubstrings

MCVersionInfo>>spotterPreviewCodeIn: aComposite
<spotterPreview: 10>
aComposite text
title: 'Summary';
display: [ 
self summaryHeader, String cr,
'Message:', String cr, self message ];
entity: self.
Cheers,
Andrei


Wow.... I send the other email before reading this one. This is much better hahahaha.
Could these 2 extensions be incorporated as part of GT for further Pharo releases?
 I don't like the #isKindOf:   but it happened to me that if I sent #allAncestors I would not get the latest commits. 
And the #isKindOf:   is because otherwise the first elements are MCLazyVersionInfo.
I am not sure. Maybe someone with better understanding of MC could tell us the correct code.

Thanks!




On Fri, Dec 11, 2015 at 4:52 PM, Eliot Miranda <[hidden email]> wrote:
Hi Mariano,

    for this in Squeak I added a simple menu pick to the Monticello Browser's package list menu called "search history" which opens up a workspace containing the entire history as a flat string.  I then just search using ctrl-f.  You can find it in a current squeak trunk image.

_,,,^..^,,,_ (phone)

On Dec 10, 2015, at 9:12 AM, Mariano Martinez Peck <[hidden email]> wrote:

How many times have you tried to search a string as a comment of a commit in all the history? Myself: many many times. I know we need much better tools for that, store the history in a another way, provide a nicer API, etc etc. And I know there were topics about that. 

However, I would deeply appreciate a very short term solution for ease that. The model side is as simple as this:

| packageName ancestry anscestors substring | 
packageName := 'MyPackageXX'.
substring := 'whatever I want to search'.
ancestry := (MCWorkingCopy allManagers detect: [:each | each packageName = packageName] ) ancestry.  
anscestors := ancestry withBreadthFirstAncestors select: [:each | each isKindOf: MCVersionInfo].
anscestors select: [ :each | each message includesSubstring: substring ]

Do you think it's worth a simple UI tool? Custom inspector of MCAncestry?

Cheers,






--
Reply | Threaded
Open this post in threaded view
|

Re: Some GT tool for this?

Andrei Chis


On Fri, Dec 11, 2015 at 8:10 PM, Mariano Martinez Peck <[hidden email]> wrote:


On Fri, Dec 11, 2015 at 4:01 PM, Andrei Chis <[hidden email]> wrote:
You can add the two methods below. Then when you open Spotter on a package you can also search through it's history.
This will trigger an update if the history is not present, but Spotter will still respond quite fast.

You can also dive in a MCVersionInfo to see its ancestors.

RPackage>>spotterHistoryFor: aStep
<spotterOrder: 100>
aStep listProcessor
title: 'History';
allCandidates: [ |ancestry|
ancestry := (MCWorkingCopy allManagers detect: [:each | each packageName = self name]) ancestry.
ancestry withBreadthFirstAncestors select: [:each | each isKindOf: MCVersionInfo] ];
candidatesLimit: 50;
itemName: [ :each | each name, ' - ', each message ];
filter: GTFilterSubstrings

MCVersionInfo>>spotterPreviewCodeIn: aComposite
<spotterPreview: 10>
aComposite text
title: 'Summary';
display: [ 
self summaryHeader, String cr,
'Message:', String cr, self message ];
entity: self.
Cheers,
Andrei


Wow.... I send the other email before reading this one. This is much better hahahaha.
Could these 2 extensions be incorporated as part of GT for further Pharo releases?
 I don't like the #isKindOf:   but it happened to me that if I sent #allAncestors I would not get the latest commits. 
And the #isKindOf:   is because otherwise the first elements are MCLazyVersionInfo.
I am not sure. Maybe someone with better understanding of MC could tell us the correct code.

Let's see if we can find a cleaner way.
If now I'll push them like this :)

Cheers,
Andrei
 

Thanks!




On Fri, Dec 11, 2015 at 4:52 PM, Eliot Miranda <[hidden email]> wrote:
Hi Mariano,

    for this in Squeak I added a simple menu pick to the Monticello Browser's package list menu called "search history" which opens up a workspace containing the entire history as a flat string.  I then just search using ctrl-f.  You can find it in a current squeak trunk image.

_,,,^..^,,,_ (phone)

On Dec 10, 2015, at 9:12 AM, Mariano Martinez Peck <[hidden email]> wrote:

How many times have you tried to search a string as a comment of a commit in all the history? Myself: many many times. I know we need much better tools for that, store the history in a another way, provide a nicer API, etc etc. And I know there were topics about that. 

However, I would deeply appreciate a very short term solution for ease that. The model side is as simple as this:

| packageName ancestry anscestors substring | 
packageName := 'MyPackageXX'.
substring := 'whatever I want to search'.
ancestry := (MCWorkingCopy allManagers detect: [:each | each packageName = packageName] ) ancestry.  
anscestors := ancestry withBreadthFirstAncestors select: [:each | each isKindOf: MCVersionInfo].
anscestors select: [ :each | each message includesSubstring: substring ]

Do you think it's worth a simple UI tool? Custom inspector of MCAncestry?

Cheers,






--

Reply | Threaded
Open this post in threaded view
|

Re: Some GT tool for this?

stepharo
In reply to this post by Mariano Martinez Peck
yes


Le 10/12/15 18:12, Mariano Martinez Peck a écrit :

> How many times have you tried to search a string as a comment of a
> commit in all the history? Myself: many many times. I know we need
> much better tools for that, store the history in a another way,
> provide a nicer API, etc etc. And I know there were topics about that.
>
> However, I would deeply appreciate a very short term solution for ease
> that. The model side is as simple as this:
>
> | packageName ancestry anscestors substring |
> packageName := 'MyPackageXX'.
> substring := 'whatever I want to search'.
> ancestry := (MCWorkingCopy allManagers detect: [:each | each
> packageName = packageName] ) ancestry.
> anscestors := ancestry withBreadthFirstAncestors select: [:each | each
> isKindOf: MCVersionInfo].
> anscestors select: [ :each | each message includesSubstring: substring ]
>
> Do you think it's worth a simple UI tool? Custom inspector of MCAncestry?
>
> Cheers,
>
>
> --
> Mariano
> http://marianopeck.wordpress.com


Reply | Threaded
Open this post in threaded view
|

Re: Some GT tool for this?

stepharo
In reply to this post by Andrei Chis
Andrei / Mariano

could you package them as extension of MC and we can integrate them in Pharo.

Stef


Le 11/12/15 20:01, Andrei Chis a écrit :
You can add the two methods below. Then when you open Spotter on a package you can also search through it's history.
This will trigger an update if the history is not present, but Spotter will still respond quite fast.

You can also dive in a MCVersionInfo to see its ancestors.

RPackage>>spotterHistoryFor: aStep
<spotterOrder: 100>
aStep listProcessor
title: 'History';
allCandidates: [ |ancestry|
ancestry := (MCWorkingCopy allManagers detect: [:each | each packageName = self name]) ancestry.
ancestry withBreadthFirstAncestors select: [:each | each isKindOf: MCVersionInfo] ];
candidatesLimit: 50;
itemName: [ :each | each name, ' - ', each message ];
filter: GTFilterSubstrings

MCVersionInfo>>spotterPreviewCodeIn: aComposite
<spotterPreview: 10>
aComposite text
title: 'Summary';
display: [ 
self summaryHeader, String cr,
'Message:', String cr, self message ];
entity: self.
Cheers,
Andrei



On Fri, Dec 11, 2015 at 4:52 PM, Eliot Miranda <[hidden email]> wrote:
Hi Mariano,

    for this in Squeak I added a simple menu pick to the Monticello Browser's package list menu called "search history" which opens up a workspace containing the entire history as a flat string.  I then just search using ctrl-f.  You can find it in a current squeak trunk image.

_,,,^..^,,,_ (phone)

On Dec 10, 2015, at 9:12 AM, Mariano Martinez Peck <[hidden email]> wrote:

How many times have you tried to search a string as a comment of a commit in all the history? Myself: many many times. I know we need much better tools for that, store the history in a another way, provide a nicer API, etc etc. And I know there were topics about that. 

However, I would deeply appreciate a very short term solution for ease that. The model side is as simple as this:

| packageName ancestry anscestors substring | 
packageName := 'MyPackageXX'.
substring := 'whatever I want to search'.
ancestry := (MCWorkingCopy allManagers detect: [:each | each packageName = packageName] ) ancestry.  
anscestors := ancestry withBreadthFirstAncestors select: [:each | each isKindOf: MCVersionInfo].
anscestors select: [ :each | each message includesSubstring: substring ]

Do you think it's worth a simple UI tool? Custom inspector of MCAncestry?

Cheers,




Reply | Threaded
Open this post in threaded view
|

Re: Some GT tool for this?

Mariano Martinez Peck
Hi Andrei,

I cannot seem to find this feature anymore in 5.0. Do you know how can I reach to "History" I cannot find it as a filter...

Thanks in advance,



On Fri, Jan 1, 2016 at 12:50 PM, stepharo <[hidden email]> wrote:
Andrei / Mariano

could you package them as extension of MC and we can integrate them in Pharo.

Stef


Le 11/12/15 20:01, Andrei Chis a écrit :
You can add the two methods below. Then when you open Spotter on a package you can also search through it's history.
This will trigger an update if the history is not present, but Spotter will still respond quite fast.

You can also dive in a MCVersionInfo to see its ancestors.

RPackage>>spotterHistoryFor: aStep
<spotterOrder: 100>
aStep listProcessor
title: 'History';
allCandidates: [ |ancestry|
ancestry := (MCWorkingCopy allManagers detect: [:each | each packageName = self name]) ancestry.
ancestry withBreadthFirstAncestors select: [:each | each isKindOf: MCVersionInfo] ];
candidatesLimit: 50;
itemName: [ :each | each name, ' - ', each message ];
filter: GTFilterSubstrings

MCVersionInfo>>spotterPreviewCodeIn: aComposite
<spotterPreview: 10>
aComposite text
title: 'Summary';
display: [ 
self summaryHeader, String cr,
'Message:', String cr, self message ];
entity: self.
Cheers,
Andrei



On Fri, Dec 11, 2015 at 4:52 PM, Eliot Miranda <[hidden email]> wrote:
Hi Mariano,

    for this in Squeak I added a simple menu pick to the Monticello Browser's package list menu called "search history" which opens up a workspace containing the entire history as a flat string.  I then just search using ctrl-f.  You can find it in a current squeak trunk image.

_,,,^..^,,,_ (phone)

On Dec 10, 2015, at 9:12 AM, Mariano Martinez Peck <[hidden email]> wrote:

How many times have you tried to search a string as a comment of a commit in all the history? Myself: many many times. I know we need much better tools for that, store the history in a another way, provide a nicer API, etc etc. And I know there were topics about that. 

However, I would deeply appreciate a very short term solution for ease that. The model side is as simple as this:

| packageName ancestry anscestors substring | 
packageName := 'MyPackageXX'.
substring := 'whatever I want to search'.
ancestry := (MCWorkingCopy allManagers detect: [:each | each packageName = packageName] ) ancestry.  
anscestors := ancestry withBreadthFirstAncestors select: [:each | each isKindOf: MCVersionInfo].
anscestors select: [ :each | each message includesSubstring: substring ]

Do you think it's worth a simple UI tool? Custom inspector of MCAncestry?

Cheers,







--