What is your versioning strategy?

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

What is your versioning strategy?

Michael Lucas-Smith-2
Hi All,

I'm currently working on some code that interprets VersionString as a set of Branches and Versions. I'd like to know what versionString format you use to determine branching in your projects. At Cincom we do the following:

Branch - Version + Branch Version + Branch Version + Branch Version ....
eg: 7.9 - 4 + AR 58932 3

Please post your examples.

Cheers,
Michael
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: What is your versioning strategy?

Boris Popov, DeepCove Labs (SNN)
Michael,

We do whole numbers for 'head' and various numbers of periods for
branches, so,

1
1.1
1.2 (first branch of 1)
1..1
1..2 (second branch of 1)
1...1
1...2 (third branch of 1)

It looks a bit odd at first, but works very well for our small team.

Regards,

-Boris

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On
Behalf Of Michael Lucas-Smith
Sent: 05 May 2011 18:01
To: VW NC; VWDEV List
Subject: What is your versioning strategy?


Hi All,

I'm currently working on some code that interprets VersionString as a
set of Branches and Versions. I'd like to know what versionString format
you use to determine branching in your projects. At Cincom we do the
following:

Branch - Version + Branch Version + Branch Version + Branch Version ....
eg: 7.9 - 4 + AR 58932 3

Please post your examples.

Cheers,
Michael

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: What is your versioning strategy?

Randy Coulman
In reply to this post by Michael Lucas-Smith-2
We use whole numbers for the trunk.  Anything else is a branch (we try to be consistent for subsequent versions of the same branch, but there is no consistency from one branch to another).  We actually try to avoid branches as much as possible, but for some experimental stuff we might publish on a branch.

When working with dev builds, we'll allow an optional VW release prefix on the front of the integral version number (e.g. 7.9 - 4).

Randy

On Thu, May 5, 2011 at 3:00 PM, Michael Lucas-Smith <[hidden email]> wrote:
Hi All,

I'm currently working on some code that interprets VersionString as a set of Branches and Versions. I'd like to know what versionString format you use to determine branching in your projects. At Cincom we do the following:

Branch - Version + Branch Version + Branch Version + Branch Version ....
eg: 7.9 - 4 + AR 58932 3

Please post your examples.

Cheers,
Michael
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc



--
Randy Coulman
[hidden email]

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: What is your versioning strategy?

jarober
In reply to this post by Michael Lucas-Smith-2
We use:

VW Version - trunk.branch.branch...

So:

7.6 - BPR 18.4

For a branch:

7.6 - BPR 18.4.1

And so on


On May 5, 2011, at 6:00 PM, Michael Lucas-Smith wrote:

> Hi All,
>
> I'm currently working on some code that interprets VersionString as a set of Branches and Versions. I'd like to know what versionString format you use to determine branching in your projects. At Cincom we do the following:
>
> Branch - Version + Branch Version + Branch Version + Branch Version ....
> eg: 7.9 - 4 + AR 58932 3
>
> Please post your examples.
>
> Cheers,
> Michael
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

James Robertson
http://www.jarober.com
[hidden email]




_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: What is your versioning strategy?

Mathieu van Echtelt-2
In reply to this post by Michael Lucas-Smith-2
Dear Michael,

Interesting, because we have a few small but heavily used extensions
based on such a version string intepretation technique. (and also
package name intepretation, but that is an other story).

Maybe it helps if I also explain a little bit more about how we use
this "version string" interpretation at the moment.

1) Anything with an underscore is a branch, by which I mean a branch
that has to be merged back into trunk again. (not a  branch to
indicate a particual VW version, like 7.6, for that, see my point 4).
For the "merge-me-back-into-trunk branches" we've changed VW's
automatic versioning scheme to add underscores in stead of dots.  We
did this to have it more visually clear you have branched and have to
merge your work back into trunk, and also to make it more simple to
add tool support (only has to search for _ in version string).

e.g.

trunk is 11.0.55, if you branch (on purpose by setting the blessing
level to "work in progress" or incidentally), the automatic
versionnumber will become 11.0.55.1_1, and the next will be
11.0.55.1_2 etc.

2) More long-standing branches, which are most of the time also spread
out over several packages, are prefixed with an semantical identifier
e.g. "FeatureX  11.0.55.1_1". We added extra tool support to
"handle" these kind of branches.  e.g. we have store menu items like
"Unmerged branches", "Merge branch...", "Packages on branche...",
"Branched packages since...", "Packages on closed branch...", "Loaded
packages on branch...", "Possibly branched packages". (Menu-item-names
postfixed with the three dots indicate a dialog will follow where you
have to type in your branch name). We also added some functionality to
the "store publish dialog" so you can easily add these semantical
branch names to a set of packages at once

These "Working-branches" typically live for several days and keeps the
trunk more stable during these days.

3) Packages from others (cincom / the cincom repository) we prefix the
VW version and postfix with an initial version e.g. "7.6 x 1.0". (x is
the version number given by the other party, 1.0 is given by us). This
helps indicate if we or the other party changed a package.

4) For our own packages, a trunk version has three parts separated by
a dot, e.g 11.0.55, we've never used the middle part, so that can be
skipped, the last part is raised every publish, the first part is only
raised when an "important technical infrastructure part" is changed
like a new VW version, DB version, a particular important package
version etc.

All this "version string" interpretation doesn't feel very object
oriented, but this was the easiest way for us to extent store with
better branch support. (Becoming more and more important with the
growth of our development team, amount of code, deployment frequency
etc. ).

Hope this helps you & greetings,

Mathieu van Echtelt

ps. close related to this issue: "package name string" interpretation.
This is used to support concepts like configurations and lineups, also
not very object oriented, but still, much much better for our
situation than what is offered by store out of the box. see
http://www.cincomsmalltalk.com/userblogs/travis/blogView?showComments=true&entry=3265388740

pps. Last year, we (ag5) discussed our "store usage" situation with
your collegues Alan Knight & Arden Thomas. An interesting but
difficult subject, especially because it looks like every development
team has his own habits and consequently, homebrew store extensions.

On Fri, May 6, 2011 at 12:00 AM, Michael Lucas-Smith
<[hidden email]> wrote:

> Hi All,
>
> I'm currently working on some code that interprets VersionString as a set of Branches and Versions. I'd like to know what versionString format you use to determine branching in your projects. At Cincom we do the following:
>
> Branch - Version + Branch Version + Branch Version + Branch Version ....
> eg: 7.9 - 4 + AR 58932 3
>
> Please post your examples.
>
> Cheers,
> Michael
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>



--
Willem Fenengastraat 4C
1096 BN  Amsterdam
www.ag5.nl
Tel: 020-4630942
Fax: 020-4630946

----------------------------------------------------------------------------------
Dit bericht kan informatie bevatten die niet voor u is bestemd. Indien
u niet de geadresseerde bent of dit bericht abusievelijk aan u is
toegezonden, wordt u verzocht dat aan de afzender te melden en het
bericht te verwijderen. Elk ongeoorloofd gebruik of verspreiding van
dit bericht, geheel of gedeeltelijk is strikt verboden.

This message may contain information that is not intended for you. If
you are not the addressee or if this message was sent to you by
mistake, you are requested to inform the sender and delete the
message. Any unauthorised use or dissemination of this message  in
whole or in part is strictly prohibited.

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: What is your versioning strategy?

davidbuck
In reply to this post by Michael Lucas-Smith-2
One of my clients uses a numbering scheme they brought forward from ENVY. They use the format:

   V3.02d

Where 3 is the major release number, 2 is the minor release number and d is the change number within the release. When they reach z they go into double characters aa, ab, etc.

They try to avoid branches by requiring developers to merge with the head version before publishing.

We developed a custom version naming policy to provide this numbering scheme.

David Buck

Sent from my BlackBerry device on the Rogers Wireless Network

-----Original Message-----
From: Michael Lucas-Smith <[hidden email]>
Sender: [hidden email]
Date: Thu, 5 May 2011 15:00:46
To: VW NC<[hidden email]>; VWDEV List<[hidden email]>
Subject: [vwnc] What is your versioning strategy?

Hi All,

I'm currently working on some code that interprets VersionString as a set of Branches and Versions. I'd like to know what versionString format you use to determine branching in your projects. At Cincom we do the following:

Branch - Version + Branch Version + Branch Version + Branch Version ....
eg: 7.9 - 4 + AR 58932 3

Please post your examples.

Cheers,
Michael
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

What is your versioning strategy? - Overrides

Stefaan Denolf
In reply to this post by Mathieu van Echtelt-2
Hi all,
 
In a previous post I read:
"Alterations to Cincom code are maintained as overrides in separate packages where the original Cincom package name is postfixed with the string ' patches', so these are branches too but the branch does not have a name as such and is to be found in(through?) the package names plane."
 
We do a similar thing with overrides, but I am looking for a tool to support and maintain those overrides.
My problem is when upgrading to a new version, I need to check every override manually and this is something I would like to automate.
 
If the override would know what the original code was, the override could compare itself when loaded over a new version of cincom if the new version is still the same as before.
If not, that override should be marked as to verify.
 
Any help is welcome
 
Mvg
Stefaan
 
 
 

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: What is your versioning strategy? - Overrides

jarober
We'll be upgrading from VW 7.6 to a newer rev at some point in the near term future as well.  While I don't have any tools, the following bit of script should help:

overrides := List new.
pkgs := Store.Registry allPackages.
bundle := Store.Registry bundleNamed: 'MasterBundleNameHere'.
pkgs removeAllSuchThat: [:each | bundle containsItem: each].
pkgs  do: [:each |
overrides addAll: (Store.Registry pundleNamed: each name) overrides].
^overrides

That assumes that all of your code is in one master bundle; that's (mostly) true for us.  You can adjust it to suit your needs easily enough though


Just slap in all of the packages you want checked.  By grabbing all packages in the system:


On May 19, 2011, at 8:23 AM, Stefaan Denolf wrote:

Hi all,
 
In a previous post I read:
"Alterations to Cincom code are maintained as overrides in separate packages where the original Cincom package name is postfixed with the string ' patches', so these are branches too but the branch does not have a name as such and is to be found in(through?) the package names plane."
 
We do a similar thing with overrides, but I am looking for a tool to support and maintain those overrides.
My problem is when upgrading to a new version, I need to check every override manually and this is something I would like to automate.
 
If the override would know what the original code was, the override could compare itself when loaded over a new version of cincom if the new version is still the same as before.
If not, that override should be marked as to verify.
 
Any help is welcome
 
Mvg
Stefaan
 
 
 
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc



_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: What is your versioning strategy? - Overrides

Alan Knight-2
In reply to this post by Stefaan Denolf
Overrides do not inherently know what the previous version of the code is. If you publish something as a modified version of the containing package, then that would know what it was based on, but an unrelated package does not.  However, it would not be that difficult to record that information somewhere such that it could be used automatically. In fact, presumably most of the overrides in your situation would be of the versions distributed with the previous release. So simply collecting all of the overrides and comparing them with the appropriate code in the earlier release would do it. You know the name of the package, based on the name of your overriding package, so if you have a published version of the base of the old release and of the base of the new release (or you could just use the overridden code in the image for the new one) then that would be doable.



[hidden email]
May 19, 2011 8:23 AM


Hi all,
 
In a previous post I read:
"Alterations to Cincom code are maintained as overrides in separate packages where the original Cincom package name is postfixed with the string ' patches', so these are branches too but the branch does not have a name as such and is to be found in(through?) the package names plane."
 
We do a similar thing with overrides, but I am looking for a tool to support and maintain those overrides.
My problem is when upgrading to a new version, I need to check every override manually and this is something I would like to automate.
 
If the override would know what the original code was, the override could compare itself when loaded over a new version of cincom if the new version is still the same as before.
If not, that override should be marked as to verify.
 
Any help is welcome
 
Mvg
Stefaan
 
 
 
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc


[hidden email]
May 5, 2011 6:00 PM


Hi All,

I'm currently working on some code that interprets VersionString as a set of Branches and Versions. I'd like to know what versionString format you use to determine branching in your projects. At Cincom we do the following:

Branch - Version + Branch Version + Branch Version + Branch Version ....
eg: 7.9 - 4 + AR 58932 3

Please post your examples.

Cheers,
Michael

--
Alan Knight [|], Engineering Manager, Cincom Smalltalk
[hidden email]
[hidden email]
http://www.cincomsmalltalk.com

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: What is your versioning strategy? - Overrides

Boris Popov, DeepCove Labs (SNN)
In reply to this post by Stefaan Denolf

Stefaan,

 

I’d used Override List in the past for just this purpose. If you right-click on a pundle containing overrides and pick Browse > Overrides of others… you can then toggle Show > Show Conflicts and skim through the list looking for changed code. It would be handy if Remove > Same Code as System worked in this scenario, but that doesn’t appear to be the case. You also need to keep an eye on cases where there are multiple overrides of the same base method (Base Package > Extension Package > Your Package).

 

Ideally, a new Code Critic rule could be added similar to ‘Methods equivalently defined in superclass’ called ‘Overrides equivalent to overridden methods’, but again, with the caveat that only some of the multiple overrides might be equivalent and it’d be still up to you to decide on a resolution.

 

Hope this helps,

 

-Boris

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Stefaan Denolf
Sent: 19 May 2011 08:23
To: [hidden email]
Subject: [vwnc] What is your versioning strategy? - Overrides

 

Hi all,

 

In a previous post I read:

"Alterations to Cincom code are maintained as overrides in separate packages where the original Cincom package name is postfixed with the string ' patches', so these are branches too but the branch does not have a name as such and is to be found in(through?) the package names plane."

 

We do a similar thing with overrides, but I am looking for a tool to support and maintain those overrides.

My problem is when upgrading to a new version, I need to check every override manually and this is something I would like to automate.

 

If the override would know what the original code was, the override could compare itself when loaded over a new version of cincom if the new version is still the same as before.

If not, that override should be marked as to verify.

 

Any help is welcome

 

Mvg

Stefaan

 

 

 


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: What is your versioning strategy? - Overrides

Paul Baumann
In reply to this post by Stefaan Denolf

Stefaan,

 

I save the original code as an 'overridden_' prefixed method. I save my changes as an 'override_' prefixed method. The actual override/replacement just calls the override_ prefixed method. By doing it this way I'm able to compare override_ with overridden_ methods to see what was special. When I do a VW upgrade I'm able to review all my overridden_ methods with the current VW method to see if I need to revise them. It is also possible to create an override that calls the original overridden behavior to minimize the unique code.

 

This is similar to a framework that I implemented at least 10 years ago for replacement/overrides in VisualAge and also ENVY versions of VW. That framework would automatically manage the override_and overridden_ prefixed methods for you. The methods would be managed transiently rather than saved into ENVY. That tool didn't include a feature to check that overridden_ methods match the methods actually overridden (because they always would have). Any dialect and version specific code was maintained in ENVY subapplications using conditional loading. Since VW Store has override support, all that was carried forward of that ENVY framework was the naming convention. VW overrides are a little similar to how this framework worked, but VW hides the overridden methods instead of showing them and allowing them to be called.

 

If you are consistent with your naming convention then it would be easy to write some post load code that would compare Store override code with the code of your overridden_ prefixed methods and then warn if there was a mismatch.

 

Here is an example of a more complicated override. It is complicated because the override needs to be different for multiple VW releases so that the same code will work no matter which VW release it is loaded into.

 

openDropDownListWithEvent: event

                ^self override_openDropDownListWithEvent: event

 

overridden_openDropDownListWithEvent: event

                "VW 7.5 used #openDropDownListWithEvent: and 7.7.1 uses #openDropDownList.

                This is intended to work with those TWO versions-others not known. -plb"

 

                (Kernel.SystemUtils.SystemVersionName > '7.7') not

                                ifTrue: [^self overridden_vw75_openDropDownListWithEvent: event].

                ^self overridden_vw771_openDropDownListWithEvent: event

 

overridden_vw75_openDropDownListWithEvent: event

overridden_vw771_openDropDownListWithEvent: event

 

override_openDropDownListWithEvent: event

                "VW 7.5 used #openDropDownListWithEvent: and 7.7.1 uses #openDropDownList.

                This is intended to work with those TWO versions-others not known. -plb"

 

                (Kernel.SystemUtils.SystemVersionName > '7.7') not

                                ifTrue: [^self override_vw75_openDropDownListWithEvent: event].

                ^self override_vw771_openDropDownListWithEvent: event

 

override_vw75_openDropDownListWithEvent: event

override_vw771_openDropDownListWithEvent: event

 

Note that this technique of managing replacement/override methods solves some big problems but can't be used for everything. The sequence that VW installs methods to the method dictionary is random (by hash) so you can expect that override_ and overridden_ methods will sometimes not be loaded into the image before the actual replacement method that calls them. This is only a problem for code that may be used during the load. The few times this kind of problem came up I had to use a standard (less undocumented) replacement/override method instead of calling an override_ prefixed one.

 

Paul Baumann

 

 

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Stefaan Denolf
Sent: Thursday, May 19, 2011 08:23
To: [hidden email]
Subject: [vwnc] What is your versioning strategy? - Overrides

 

Hi all,

 

In a previous post I read:

"Alterations to Cincom code are maintained as overrides in separate packages where the original Cincom package name is postfixed with the string ' patches', so these are branches too but the branch does not have a name as such and is to be found in(through?) the package names plane."

 

We do a similar thing with overrides, but I am looking for a tool to support and maintain those overrides.

My problem is when upgrading to a new version, I need to check every override manually and this is something I would like to automate.

 

If the override would know what the original code was, the override could compare itself when loaded over a new version of cincom if the new version is still the same as before.

If not, that override should be marked as to verify.

 

Any help is welcome

 

Mvg

Stefaan

 

 

 



This message may contain confidential information and is intended for specific recipients unless explicitly noted otherwise. If you have reason to believe you are not an intended recipient of this message, please delete it and notify the sender. This message may not represent the opinion of IntercontinentalExchange, Inc. (ICE), its subsidiaries or affiliates, and does not constitute a contract or guarantee. Unencrypted electronic mail is not secure and the recipient of this message is expected to provide safeguards from viruses and pursue alternate means of communication where privacy or a binding message is desired.

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: What is your versioning strategy? - Overrides

Steven Kelly
In reply to this post by Stefaan Denolf

What’s really needed is that when we publish an override, it remembers what the overridden method was (source code and where possible Store pointer). And when we load, it checks if the method it is overriding is the same as it was before.

 

Until we have that, we have to make do with hacks to reconstruct or guess this info on the fly. As Alan said, it should be possible for simple cases, e.g. if our method just overrides a base VW method, and Store contains all three versions: old Cincom, our override, new Cincom.

 

We need to find the timestamp when our override was published, then see if there’s a Cincom version published after that. If there is no “new Cincom” version, we’re fine.

 

I can get as far as a collection of all current method overrides by our packages to others’ packages:

 

overriddenColl := OrderedCollection new.

ourBundle := Store.Registry bundleNamed: 'OurMainBundle'.

ourPackages := OrderedCollection new.

otherPackages := OrderedCollection new.

Store.Registry allPackages do: [:pkg |

                ((ourBundle containsItem: pkg) ifTrue: [ourPackages] ifFalse: [otherPackages])

                                add: pkg].

otherPackages do: [:each |

                overriddenColl addAll: (Store.Registry pundleNamed: each name) overrides].

overriddenMethodsColl := overriddenColl select: [:overridden | overridden isForMethod].

overridenByUsColl := overriddenMethodsColl select: [:overridden |

                | overridingPackage |

                overridingPackage := Store.Registry containingPackageForSelector: overridden selector class: overridden correspondingImageClass.

                ourPackages includes: overridingPackage].

 

and later I can check the timestamps:

 

session read: StoreMethod where: [:eachMethod |

                (eachMethod name = overridden selector) AND: [(eachMethod className = overridden fullClassName) AND: [eachMethod timestamp > oldTimestamp]]]

 

but the bits in between and after are going to need more Store brains…

 

Steve

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Stefaan Denolf
Sent: 19. toukokuuta 2011 15:23
To: [hidden email]
Subject: [vwnc] What is your versioning strategy? - Overrides

 

Hi all,

 

In a previous post I read:

"Alterations to Cincom code are maintained as overrides in separate packages where the original Cincom package name is postfixed with the string ' patches', so these are branches too but the branch does not have a name as such and is to be found in(through?) the package names plane."

 

We do a similar thing with overrides, but I am looking for a tool to support and maintain those overrides.

My problem is when upgrading to a new version, I need to check every override manually and this is something I would like to automate.

 

If the override would know what the original code was, the override could compare itself when loaded over a new version of cincom if the new version is still the same as before.

If not, that override should be marked as to verify.

 

Any help is welcome

 

Mvg

Stefaan

 

 

 


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: What is your versioning strategy? - Overrides

Alan Knight-2
Given that the typical case is that you're using a verision and upgrading, here's a code snippet if we're following the convention described. It finds all packages that follow that convention in the image, then finds the corresponding original package  in the image. Then it tries to find the original package from the old version. This assumes that you have it published in the current Store database, and that its name matches the string specified at the beginning. For most people that's probably relatively easy, as you won't have hundreds of versions named e.g. '7.7*'. In this case I did have to be careful to put a space after 7.7, because otherwise it would also match 7.7.1. But you can specify how to find the versions arbitrarily. Given that, we find the old overridden method in the Store package, and have the current source and the overridden version in the image. If the old and the new overridden source don't match it opens a text comparison view on the two of them. That could just as easily be writing them to Transcript or a file for later examination. It just requires that you have the version you originally overrode in the Store database, and a way to find it.

  If I were doing this on a project from scratch, I'd probably adopt the version naming convention for such patch packages that I version them with the name of the version I intended them to modify, so then it could easily and reliably be found programmatically.

mySession := StoreLoginFactory currentStoreSession.
versionToUpgradeFrom := '7.7 '.
patchPackages := Store.Registry allPackages select: [:each | each name like: '% patches'].
patchPackages do: [:eachPatchPackage |
    currentOverriddenPackage := Store.Registry packageNamed: (eachPatchPackage name readStream upTo: Character space).
    baseQuery := Query readOneOf: StorePackage where: [:each | (each name = (eachPatchPackage name readStream upTo: Character space)) & (each version like: '%', versionToUpgradeFrom, '%')].
    baseQuery orderBy: [:each | each timestamp descending].
    baseVersion := mySession execute: baseQuery.
    baseVersion inspect.
    eachPatchPackage methods do: [:eachMethodDescription |
        imageMethod := eachMethodDescription method.
        oldOverridden := baseVersion method: imageMethod selector forClassNamed: imageMethod mclass instanceBehavior absoluteName meta: imageMethod mclass isMeta.
        newOverridden := Override selector: imageMethod selector class: imageMethod mclass in: currentOverriddenPackage.
        (newOverridden isNil or: [oldOverridden sourceCode ~= newOverridden sourceCode]) ifTrue: [
            | view |
            view := SideBySideTextComparisonView new leftText: oldOverridden sourceCode rightText: newOverridden sourceCode.
            ScheduledWindow new component: view; openWithExtent: 800@600].
    ]].




[hidden email]
May 19, 2011 1:07 PM


What’s really needed is that when we publish an override, it remembers what the overridden method was (source code and where possible Store pointer). And when we load, it checks if the method it is overriding is the same as it was before.

 

Until we have that, we have to make do with hacks to reconstruct or guess this info on the fly. As Alan said, it should be possible for simple cases, e.g. if our method just overrides a base VW method, and Store contains all three versions: old Cincom, our override, new Cincom.

 

We need to find the timestamp when our override was published, then see if there’s a Cincom version published after that. If there is no “new Cincom” version, we’re fine.

 

I can get as far as a collection of all current method overrides by our packages to others’ packages:

 

overriddenColl := OrderedCollection new.

ourBundle := Store.Registry bundleNamed: 'OurMainBundle'.

ourPackages := OrderedCollection new.

otherPackages := OrderedCollection new.

Store.Registry allPackages do: [:pkg |

                ((ourBundle containsItem: pkg) ifTrue: [ourPackages] ifFalse: [otherPackages])

                                add: pkg].

otherPackages do: [:each |

                overriddenColl addAll: (Store.Registry pundleNamed: each name) overrides].

overriddenMethodsColl := overriddenColl select: [:overridden | overridden isForMethod].

overridenByUsColl := overriddenMethodsColl select: [:overridden |

                | overridingPackage |

                overridingPackage := Store.Registry containingPackageForSelector: overridden selector class: overridden correspondingImageClass.

                ourPackages includes: overridingPackage].

 

and later I can check the timestamps:

 

session read: StoreMethod where: [:eachMethod |

                (eachMethod name = overridden selector) AND: [(eachMethod className = overridden fullClassName) AND: [eachMethod timestamp > oldTimestamp]]]

 

but the bits in between and after are going to need more Store brains…

 

Steve

 

 

From: [hidden email] [[hidden email]] On Behalf Of Stefaan Denolf
Sent: 19. toukokuuta 2011 15:23
To: [hidden email]
Subject: [vwnc] What is your versioning strategy? - Overrides

 

Hi all,

 

In a previous post I read:

"Alterations to Cincom code are maintained as overrides in separate packages where the original Cincom package name is postfixed with the string ' patches', so these are branches too but the branch does not have a name as such and is to be found in(through?) the package names plane."

 

We do a similar thing with overrides, but I am looking for a tool to support and maintain those overrides.

My problem is when upgrading to a new version, I need to check every override manually and this is something I would like to automate.

 

If the override would know what the original code was, the override could compare itself when loaded over a new version of cincom if the new version is still the same as before.

If not, that override should be marked as to verify.

 

Any help is welcome

 

Mvg

Stefaan

 

 

 

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc


[hidden email]
May 19, 2011 8:23 AM


Hi all,
 
In a previous post I read:
"Alterations to Cincom code are maintained as overrides in separate packages where the original Cincom package name is postfixed with the string ' patches', so these are branches too but the branch does not have a name as such and is to be found in(through?) the package names plane."
 
We do a similar thing with overrides, but I am looking for a tool to support and maintain those overrides.
My problem is when upgrading to a new version, I need to check every override manually and this is something I would like to automate.
 
If the override would know what the original code was, the override could compare itself when loaded over a new version of cincom if the new version is still the same as before.
If not, that override should be marked as to verify.
 
Any help is welcome
 
Mvg
Stefaan
 
 
 
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc


[hidden email]
May 5, 2011 6:00 PM


Hi All,

I'm currently working on some code that interprets VersionString as a set of Branches and Versions. I'd like to know what versionString format you use to determine branching in your projects. At Cincom we do the following:

Branch - Version + Branch Version + Branch Version + Branch Version ....
eg: 7.9 - 4 + AR 58932 3

Please post your examples.

Cheers,
Michael

--
Alan Knight [|], Engineering Manager, Cincom Smalltalk
[hidden email]
[hidden email]
http://www.cincomsmalltalk.com

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc