- finding outdated packages 
Author Message
 - finding outdated packages

Does anybody know of a way to find 'outdated' packages/clusters that you
currently have loaded in TeamV?  I'm looking for something similar to
the '>' notification of Envy when something is released.

I use the term outdated loosely here, as that may not necessarily be the
case, depending on the intent of the committer.  I'm interested in
knowing which packages/clusters that I currently have loaded have a
later revision.

I'm thinking of writing some code to query the packages/clusters for
their revisions, comparing that to their latest revision, etc, but
before I start digging, I'm wondering if I'm missing something or if
somebody out there has already done something similar.  This seems like
a pretty obvious feature.

---
Jason Steffler
 % Unix is user friendly; it's just selective about who its friends are

Sent via Deja.com http://www.*-*-*.com/
Share what you know. Learn what you don't.



Wed, 18 Jun 1902 08:00:00 GMT  
 - finding outdated packages

Quote:
>Does anybody know of a way to find 'outdated' packages/clusters that you
>currently have loaded in TeamV?  I'm looking for something similar to
>the '>' notification of Envy when something is released.

>I use the term outdated loosely here, as that may not necessarily be the
>case, depending on the intent of the committer.  I'm interested in
>knowing which packages/clusters that I currently have loaded have a
>later revision.

I'm not sure this is what you want, but if you open a package browser,
select the package/cluster, right click and then select "Migrate..."
it will open a small browser.  In the upper right window will be
displayed the revision list with the currently loaded version
highlighted.

Larry
--

Quote:

>I'm thinking of writing some code to query the packages/clusters for
>their revisions, comparing that to their latest revision, etc, but
>before I start digging, I'm wondering if I'm missing something or if
>somebody out there has already done something similar.  This seems like
>a pretty obvious feature.

>---
>Jason Steffler
> % Unix is user friendly; it's just selective about who its friends are

>Sent via Deja.com http://www.deja.com/
>Share what you know. Learn what you don't.



Wed, 18 Jun 1902 08:00:00 GMT  
 - finding outdated packages


Quote:

[snip]
> I'm not sure this is what you want, but if you open a package browser,
> select the package/cluster, right click and then select "Migrate..."
> it will open a small browser.  In the upper right window will be
> displayed the revision list with the currently loaded version
> highlighted.

Thanks for the reply Larry.  Not really what I'm looking for though.  I'm
already using this mechanism, but this is pretty cumbersome for my intented
use. Out of all the packages I currently have loaded, I want to find out which
ones have later revisions, without having to browse each package individually.

---
Jason Steffler
   % Unix is user friendly; it's just selective about who its friends are
   (remove the '.removeMe.org' from email to reply)



Wed, 18 Jun 1902 08:00:00 GMT  
 - finding outdated packages


Quote:
> Does anybody know of a way to find 'outdated' packages/clusters that
you
> currently have loaded in TeamV?  I'm looking for something similar to
> the '>' notification of Envy when something is released.

> I use the term outdated loosely here, as that may not necessarily be
the
> case, depending on the intent of the committer.  I'm interested in
> knowing which packages/clusters that I currently have loaded have a
> later revision.

I use the following code snippet to migrate every loaded package to its
latest version:

-----

    | result rev lastRev outdatedPackages |
    "Collect outdated packages in a dictionary with key current package
and value latest package"
    outdatedPackages := Dictionary new.
    TeamVInterface current packagesDo: [ :pkg |
        rev := pkg revisionNumber.
         "Only process archived packages "
        (pkg isLoaded & pkg archive notNil & rev notNil) ifTrue: [
                "Compare on revision number objects"
             lastRev := (pkg archive revisionNumbers collect: [:r |
RepositoryRevisionNumber fromString: r]) asSortedCollection last
asString.
             rev = lastRev ifFalse:
                [outdatedPackages at: pkg put:
                    (ToolInterface current
                        revision: lastRev
                        ofPackageNamed: pkg archive archiveName
                        fromRepositoryNamed: pkg archive repository
name)].
        ].
    ].
    " Migrate to latest versions "
    result := TeamVInterface current
        migrateFromList: outdatedPackages keys
        toList: outdatedPackages values.

-----

If you are just interested in all outdated modules, omit the last
statement (Migration) and don't forget the clusters.

Hope this helps,

Birgit Guder

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.



Wed, 18 Jun 1902 08:00:00 GMT  
 - finding outdated packages
Hi,

There is a script called 'latest.ws'. This gives a list of packages which
have a more recent version than the one loaded in your image. It is
somewhere in the team samples.

Is this what you are looking for ??

Regards,
Marc

Quote:




>[snip]
>> I'm not sure this is what you want, but if you open a package browser,
>> select the package/cluster, right click and then select "Migrate..."
>> it will open a small browser.  In the upper right window will be
>> displayed the revision list with the currently loaded version
>> highlighted.

>Thanks for the reply Larry.  Not really what I'm looking for though.  I'm
>already using this mechanism, but this is pretty cumbersome for my intented
>use. Out of all the packages I currently have loaded, I want to find out
which
>ones have later revisions, without having to browse each package
individually.

>---
>Jason Steffler
>   % Unix is user friendly; it's just selective about who its friends are
>   (remove the '.removeMe.org' from email to reply)



Wed, 18 Jun 1902 08:00:00 GMT  
 - finding outdated packages
Hi Jason,

Here is a script that pops a Workspace window with all OUTDATED packages.
Slightly modified, it could gives u what u want:

Jibril Aziz GUEYE
---------------------------------

 | subsystem foundOutOfDate script |
 subsystem := TeamVInterface current.
 foundOutOfDate := false.
 script := WriteStream on: (String new: 1024).
 script
  nextPutAll: '
subsystem := TeamVInterface current.
oldPackages := OrderedCollection new.
newPackages := OrderedCollection new.

#(';
  cr.
 subsystem
  packagesDo:
   [:package | | archive latestRevision |
   archive := package archive.
   archive == nil
    ifFalse:
     [latestRevision := (archive revisionNumberList
      asSortedCollection:
       [:a :b |
       a <= b]) last.
     (RepositoryRevisionNumber fromString: package revisionNumber) ~=
latestRevision
      ifTrue:
       [script
        nextPutAll: ' #(';
        nextPutAll: package name storeString;
        space;
        nextPutAll: latestRevision asString storeString;
        nextPutAll: ')'.
       package isModified
        ifTrue: [script nextPutAll: '    "WARNING: Loaded package is
modified."'].
       script cr.
       foundOutOfDate := true]]].
 foundOutOfDate
  ifFalse: [^MessageBox message: 'The environment is up to date.'].
 script nextPutAll: ') do: [:spec |
 oldPackage := subsystem packageNamed: (spec at: 1).
 newPackage := ToolInterface current
  revision: (spec at: 2)
  ofPackageNamed: oldPackage name
  fromRepositoryNamed: oldPackage archive repository name.
 oldPackages add: oldPackage.
 newPackages add: newPackage].

Transcript show: ''Loading packages...''; cr.
options := MigrationOptions new.
options modifyPackageList: (Array
 with: (subsystem packageNamed: Smalltalk product)
 with: subsystem unpackagedPackage).
result := subsystem
 migrateFromList: oldPackages
 toList: newPackages
 withOptions: options.

result wasSuccessful
 ifTrue:
  [Transcript cr; show: ''Initializing packages...''; cr.
  result performInitialization.
  Transcript show: '' done''; cr]
 ifFalse:
  [ToolInterface current
    reportConflicts: result
    fromOperation: ''Load of Latest'']'.
 script contents edit



Wed, 18 Jun 1902 08:00:00 GMT  
 - finding outdated packages


Quote:
> Does anybody know of a way to find 'outdated' packages/clusters that
you
> currently have loaded in TeamV?  I'm looking for something similar to
> the '>' notification of Envy when something is released.

[snip]

Wups!  Forgot about checking out the samples first.  Marc, Birgit,
Jibril - thanks for the help.

---
Jason Steffler
 % Unix is user friendly; it's just selective about who its friends are

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Outdated APL symbols ?

2. MVC outdated?

3. Help: Is CLIPPER outdated?

4. Forth is outdated and obsolete

5. Forth is outdated and obsolete

6. Infoworld: COBOL outdated and losing support

7. technology outdated?

8. vrml outdate?

9. Amiga Link Outdated

10. man page outdated?

11. outdated URL in README

12. Where does one find current logo packages?

 

 
Powered by phpBB® Forum Software