common/patches/stx622/extensions.st
changeset 316 935f0e3d40f5
parent 312 96019ed83851
child 864 c854577212b8
equal deleted inserted replaced
313:7b5382624fb9 316:935f0e3d40f5
     1 "{ Package: 'stx:libscm/common/patches/stx622' }"!
     1 "{ Package: 'stx:libscm/common/patches/stx622' }"!
       
     2 
       
     3 !Class methodsFor:'source management'!
       
     4 
       
     5 binaryRevision
       
     6     "return the revision-ID from which the class was stc-compiled;
       
     7      nil if its an autoloaded or filedIn class.
       
     8      If a classes binary is up-to-date w.r.t. the source repository,
       
     9      the returned string is the same as the one returned by #revision."
       
    10 
       
    11     |owner info c|
       
    12 
       
    13     (owner := self owningClass) notNil ifTrue:[^ owner binaryRevision].
       
    14 
       
    15     revision notNil ifTrue:[
       
    16         c := revision first.
       
    17         c == $$ ifTrue:[
       
    18             "/ Here use self sourceCodeManager to use the manager configured
       
    19             "/ for class's package, not the global one
       
    20             "/ -------------v
       
    21             info := self sourceCodeManager revisionInfoFromString:revision.
       
    22             info isNil ifTrue:[^ '0'].
       
    23             ^ (info revision) ? '0'.
       
    24         ].
       
    25         c isDigit ifFalse:[
       
    26             ^ '0'
       
    27         ].
       
    28     ].
       
    29 
       
    30     ^ revision
       
    31 
       
    32     "
       
    33      Object binaryRevision
       
    34      Object class binaryRevision
       
    35     "
       
    36 
       
    37     "
       
    38      to find all classes which are not up-to-date:
       
    39 
       
    40      |classes|
       
    41 
       
    42      classes := Smalltalk allClasses
       
    43                     select:[:cls | cls binaryRevision notNil and:[cls binaryRevision ~= cls revision]].
       
    44      SystemBrowser browseClasses:classes title:'classes which are not up-to-date'
       
    45     "
       
    46 
       
    47     "Created: / 07-12-1995 / 10:58:47 / cg"
       
    48     "Modified: / 01-04-1997 / 23:33:01 / stefan"
       
    49     "Modified: / 22-10-2008 / 20:37:05 / cg"
       
    50     "Modified (format): / 05-07-2013 / 02:05:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
    51 ! !
     2 
    52 
     3 !ProjectDefinition class methodsFor:'private-loading'!
    53 !ProjectDefinition class methodsFor:'private-loading'!
     4 
    54 
     5 executeHooks: hook
    55 executeHooks: hook
     6     "Execute all hooks annotate by given symbol. Currently supported
    56     "Execute all hooks annotate by given symbol. Currently supported