VersionInfo.st
author Claus Gittinger <cg@exept.de>
Fri, 18 Nov 2016 16:04:52 +0100
changeset 4142 30bea8affad4
parent 4140 0f192ecaf39e
child 4161 55ad833b981e
permissions -rw-r--r--
#OTHER by cg class: VersionInfo class definition changed: #date #time #timestamp #timestamp:
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2177
ec8a8ef58c34 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2028
diff changeset
     1
"
ec8a8ef58c34 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2028
diff changeset
     2
 COPYRIGHT (c) 2008 by eXept Software AG
ec8a8ef58c34 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2028
diff changeset
     3
              All Rights Reserved
ec8a8ef58c34 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2028
diff changeset
     4
ec8a8ef58c34 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2028
diff changeset
     5
 This software is furnished under a license and may be used
ec8a8ef58c34 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2028
diff changeset
     6
 only in accordance with the terms of that license and with the
ec8a8ef58c34 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2028
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
ec8a8ef58c34 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2028
diff changeset
     8
 be provided or otherwise made available to, or used by, any
ec8a8ef58c34 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2028
diff changeset
     9
 other person.  No title to or ownership of the software is
ec8a8ef58c34 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2028
diff changeset
    10
 hereby transferred.
ec8a8ef58c34 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2028
diff changeset
    11
"
2028
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
"{ Package: 'stx:libbasic3' }"
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
3745
0c3d925c0347 class: VersionInfo
Claus Gittinger <cg@exept.de>
parents: 3662
diff changeset
    14
"{ NameSpace: Smalltalk }"
0c3d925c0347 class: VersionInfo
Claus Gittinger <cg@exept.de>
parents: 3662
diff changeset
    15
2028
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
Object subclass:#VersionInfo
4142
30bea8affad4 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4140
diff changeset
    17
	instanceVariableNames:'revision binaryRevision user timestamp date time fileName state'
2028
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
	classVariableNames:''
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
	poolDictionaries:''
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
	category:'System-SourceCodeManagement'
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
!
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
!VersionInfo class methodsFor:'documentation'!
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
2177
ec8a8ef58c34 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2028
diff changeset
    25
copyright
ec8a8ef58c34 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2028
diff changeset
    26
"
ec8a8ef58c34 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2028
diff changeset
    27
 COPYRIGHT (c) 2008 by eXept Software AG
ec8a8ef58c34 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2028
diff changeset
    28
              All Rights Reserved
ec8a8ef58c34 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2028
diff changeset
    29
ec8a8ef58c34 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2028
diff changeset
    30
 This software is furnished under a license and may be used
ec8a8ef58c34 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2028
diff changeset
    31
 only in accordance with the terms of that license and with the
ec8a8ef58c34 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2028
diff changeset
    32
 inclusion of the above copyright notice.   This software may not
ec8a8ef58c34 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2028
diff changeset
    33
 be provided or otherwise made available to, or used by, any
ec8a8ef58c34 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2028
diff changeset
    34
 other person.  No title to or ownership of the software is
ec8a8ef58c34 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2028
diff changeset
    35
 hereby transferred.
ec8a8ef58c34 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2028
diff changeset
    36
"
ec8a8ef58c34 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2028
diff changeset
    37
!
ec8a8ef58c34 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2028
diff changeset
    38
2028
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
documentation
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
"
3655
2f83480a5df4 class: VersionInfo
Claus Gittinger <cg@exept.de>
parents: 3517
diff changeset
    41
    In ancient times, Class used to return a Dictionary when asked for versionInfo.
2028
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
    This has been replaced by instances of this class and subclasses.
3655
2f83480a5df4 class: VersionInfo
Claus Gittinger <cg@exept.de>
parents: 3517
diff changeset
    43
2f83480a5df4 class: VersionInfo
Claus Gittinger <cg@exept.de>
parents: 3517
diff changeset
    44
    Notice, that subclasses may add more info for specific source repositories
2f83480a5df4 class: VersionInfo
Claus Gittinger <cg@exept.de>
parents: 3517
diff changeset
    45
    (CVSVersionInfo, MonticelloVersionInfo etc.).
2f83480a5df4 class: VersionInfo
Claus Gittinger <cg@exept.de>
parents: 3517
diff changeset
    46
    However, any generic tools/ui should only depend on the values (and getters) found here.
2028
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
    [author:]
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
        cg (cg@AQUA-DUO)
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    50
"
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51
! !
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
!VersionInfo methodsFor:'accessing'!
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
at:aKey
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
    "backward compatible dictionary-like accessing"
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    57
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    58
    (self respondsTo:aKey) ifTrue:[
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    59
        ^ self perform:aKey
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    60
    ].
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    61
    ^ self errorKeyNotFound:aKey
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    62
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    63
    "
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    64
     self new at:#binaryRevision
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    65
     self new at:#foo
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    66
    "
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    67
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    68
    "Modified: / 22-10-2008 / 20:23:31 / cg"
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    69
!
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    70
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    71
at:aKey ifAbsent:replacement
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    72
    "backward compatible dictionary-like accessing"
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    73
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    74
    (self respondsTo:aKey) ifTrue:[
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    75
        ^ (self perform:aKey) ? replacement
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    76
    ].
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    77
    ^ replacement
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    78
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    79
    "
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    80
     self new at:#binaryRevision
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    81
     self new at:#foo ifAbsent:#bar
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    82
    "
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    83
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    84
    "Created: / 22-10-2008 / 20:19:42 / cg"
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    85
!
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    86
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    87
at:aKey put:value
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    88
    "backward compatible dictionary-like accessing"
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    89
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    90
    (self respondsTo:aKey) ifTrue:[
3517
b94e2737c469 class: VersionInfo
Claus Gittinger <cg@exept.de>
parents: 2667
diff changeset
    91
        self perform:aKey asMutator with:value.
2028
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    92
        ^ value "/ sigh
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    93
    ].
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    94
    ^ self errorKeyNotFound:aKey
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    95
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    96
    "
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    97
     self new at:#binaryRevision put:#bar
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    98
     self new at:#foo put:#bar
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    99
    "
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   100
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   101
    "Created: / 22-10-2008 / 20:20:54 / cg"
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   102
!
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   103
2667
c496ecfe718d added: #author
Claus Gittinger <cg@exept.de>
parents: 2640
diff changeset
   104
author
c496ecfe718d added: #author
Claus Gittinger <cg@exept.de>
parents: 2640
diff changeset
   105
    ^ self user
c496ecfe718d added: #author
Claus Gittinger <cg@exept.de>
parents: 2640
diff changeset
   106
c496ecfe718d added: #author
Claus Gittinger <cg@exept.de>
parents: 2640
diff changeset
   107
    "Created: / 21-12-2011 / 23:09:54 / cg"
c496ecfe718d added: #author
Claus Gittinger <cg@exept.de>
parents: 2640
diff changeset
   108
!
c496ecfe718d added: #author
Claus Gittinger <cg@exept.de>
parents: 2640
diff changeset
   109
2028
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   110
binaryRevision
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   111
    ^ binaryRevision
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   112
!
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   113
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   114
binaryRevision:something
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   115
    binaryRevision := something.
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   116
!
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   117
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   118
date
4140
0f192ecaf39e #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4137
diff changeset
   119
    timestamp notNil ifTrue:[^ timestamp asDate].
2028
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   120
    ^ date
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   121
!
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   122
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   123
date:something
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   124
    date := something.
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   125
!
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   126
4137
c0d64b4ef710 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3745
diff changeset
   127
day
c0d64b4ef710 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3745
diff changeset
   128
    ^ date
c0d64b4ef710 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3745
diff changeset
   129
!
c0d64b4ef710 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3745
diff changeset
   130
2028
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   131
fileName
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   132
    ^ fileName
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   133
!
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   134
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   135
fileName:something
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   136
    fileName := something.
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   137
!
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   138
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   139
keysAndValuesDo:aBlock
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   140
    self class instVarNames do:[:nm |
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   141
        aBlock value:(nm asSymbol) value:(self perform:nm asSymbol)
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   142
    ].
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   143
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   144
    "Created: / 22-10-2008 / 20:48:08 / cg"
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   145
!
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   146
3745
0c3d925c0347 class: VersionInfo
Claus Gittinger <cg@exept.de>
parents: 3662
diff changeset
   147
majorVersion
0c3d925c0347 class: VersionInfo
Claus Gittinger <cg@exept.de>
parents: 3662
diff changeset
   148
    |v|
0c3d925c0347 class: VersionInfo
Claus Gittinger <cg@exept.de>
parents: 3662
diff changeset
   149
0c3d925c0347 class: VersionInfo
Claus Gittinger <cg@exept.de>
parents: 3662
diff changeset
   150
    v := self revision.
0c3d925c0347 class: VersionInfo
Claus Gittinger <cg@exept.de>
parents: 3662
diff changeset
   151
    v notEmptyOrNil ifTrue:[
0c3d925c0347 class: VersionInfo
Claus Gittinger <cg@exept.de>
parents: 3662
diff changeset
   152
        ^ v upTo:$.
0c3d925c0347 class: VersionInfo
Claus Gittinger <cg@exept.de>
parents: 3662
diff changeset
   153
    ].
0c3d925c0347 class: VersionInfo
Claus Gittinger <cg@exept.de>
parents: 3662
diff changeset
   154
    ^ nil
0c3d925c0347 class: VersionInfo
Claus Gittinger <cg@exept.de>
parents: 3662
diff changeset
   155
0c3d925c0347 class: VersionInfo
Claus Gittinger <cg@exept.de>
parents: 3662
diff changeset
   156
    "
0c3d925c0347 class: VersionInfo
Claus Gittinger <cg@exept.de>
parents: 3662
diff changeset
   157
     Array revisionInfo majorVersion
0c3d925c0347 class: VersionInfo
Claus Gittinger <cg@exept.de>
parents: 3662
diff changeset
   158
    "
0c3d925c0347 class: VersionInfo
Claus Gittinger <cg@exept.de>
parents: 3662
diff changeset
   159
!
0c3d925c0347 class: VersionInfo
Claus Gittinger <cg@exept.de>
parents: 3662
diff changeset
   160
0c3d925c0347 class: VersionInfo
Claus Gittinger <cg@exept.de>
parents: 3662
diff changeset
   161
minorVersion
0c3d925c0347 class: VersionInfo
Claus Gittinger <cg@exept.de>
parents: 3662
diff changeset
   162
    |v|
0c3d925c0347 class: VersionInfo
Claus Gittinger <cg@exept.de>
parents: 3662
diff changeset
   163
0c3d925c0347 class: VersionInfo
Claus Gittinger <cg@exept.de>
parents: 3662
diff changeset
   164
    v := self revision.
0c3d925c0347 class: VersionInfo
Claus Gittinger <cg@exept.de>
parents: 3662
diff changeset
   165
    v notEmptyOrNil ifTrue:[
0c3d925c0347 class: VersionInfo
Claus Gittinger <cg@exept.de>
parents: 3662
diff changeset
   166
        ^ v copyFrom:(v indexOf:$.)+1
0c3d925c0347 class: VersionInfo
Claus Gittinger <cg@exept.de>
parents: 3662
diff changeset
   167
    ].
0c3d925c0347 class: VersionInfo
Claus Gittinger <cg@exept.de>
parents: 3662
diff changeset
   168
    ^ nil
0c3d925c0347 class: VersionInfo
Claus Gittinger <cg@exept.de>
parents: 3662
diff changeset
   169
0c3d925c0347 class: VersionInfo
Claus Gittinger <cg@exept.de>
parents: 3662
diff changeset
   170
    "
0c3d925c0347 class: VersionInfo
Claus Gittinger <cg@exept.de>
parents: 3662
diff changeset
   171
     Array revisionInfo minorVersion
0c3d925c0347 class: VersionInfo
Claus Gittinger <cg@exept.de>
parents: 3662
diff changeset
   172
    "
0c3d925c0347 class: VersionInfo
Claus Gittinger <cg@exept.de>
parents: 3662
diff changeset
   173
!
0c3d925c0347 class: VersionInfo
Claus Gittinger <cg@exept.de>
parents: 3662
diff changeset
   174
2608
vrany
parents: 2382
diff changeset
   175
repositoryPathName
vrany
parents: 2382
diff changeset
   176
    "raise an error: must be redefined in concrete subclass(es)"
vrany
parents: 2382
diff changeset
   177
vrany
parents: 2382
diff changeset
   178
    ^ nil "Not known"
vrany
parents: 2382
diff changeset
   179
vrany
parents: 2382
diff changeset
   180
    "Modified: / 23-11-2011 / 23:33:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
vrany
parents: 2382
diff changeset
   181
!
vrany
parents: 2382
diff changeset
   182
2028
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   183
revision
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   184
    ^ revision
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   185
!
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   186
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   187
revision:something
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   188
    revision := something.
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   189
!
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   190
4142
30bea8affad4 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4140
diff changeset
   191
state
30bea8affad4 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4140
diff changeset
   192
    ^ state
30bea8affad4 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4140
diff changeset
   193
!
30bea8affad4 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4140
diff changeset
   194
30bea8affad4 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4140
diff changeset
   195
state:something
30bea8affad4 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4140
diff changeset
   196
    state := something.
30bea8affad4 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4140
diff changeset
   197
!
30bea8affad4 #OTHER by cg
Claus Gittinger <cg@exept.de>
parents: 4140
diff changeset
   198
3662
576a064f048e class: VersionInfo
Claus Gittinger <cg@exept.de>
parents: 3655
diff changeset
   199
symbolicVersionName
576a064f048e class: VersionInfo
Claus Gittinger <cg@exept.de>
parents: 3655
diff changeset
   200
    "iff that source code manager uses cryptic names for versions,
576a064f048e class: VersionInfo
Claus Gittinger <cg@exept.de>
parents: 3655
diff changeset
   201
     (eg. dbManager, git and hg managers), we may add an additional symbolic
576a064f048e class: VersionInfo
Claus Gittinger <cg@exept.de>
parents: 3655
diff changeset
   202
     version name, which is used for human readers (and not required to be unique).
576a064f048e class: VersionInfo
Claus Gittinger <cg@exept.de>
parents: 3655
diff changeset
   203
     Usually something like x.y-nn, where nn is the user name is returned there.
576a064f048e class: VersionInfo
Claus Gittinger <cg@exept.de>
parents: 3655
diff changeset
   204
     Here, we return the revision proper, which is ok for cvs, svn and others with a 
576a064f048e class: VersionInfo
Claus Gittinger <cg@exept.de>
parents: 3655
diff changeset
   205
     user-friendly version number."
576a064f048e class: VersionInfo
Claus Gittinger <cg@exept.de>
parents: 3655
diff changeset
   206
576a064f048e class: VersionInfo
Claus Gittinger <cg@exept.de>
parents: 3655
diff changeset
   207
    ^ revision
576a064f048e class: VersionInfo
Claus Gittinger <cg@exept.de>
parents: 3655
diff changeset
   208
!
576a064f048e class: VersionInfo
Claus Gittinger <cg@exept.de>
parents: 3655
diff changeset
   209
2028
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   210
time
4140
0f192ecaf39e #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4137
diff changeset
   211
    timestamp notNil ifTrue:[^ timestamp asTime].
2028
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   212
    ^ time
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   213
!
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   214
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   215
time:something
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   216
    time := something.
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   217
!
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   218
2640
f214ff2248ed added: #timeStamp:
Claus Gittinger <cg@exept.de>
parents: 2608
diff changeset
   219
timeStamp:aTimestamp
2667
c496ecfe718d added: #author
Claus Gittinger <cg@exept.de>
parents: 2640
diff changeset
   220
    date := aTimestamp asDate.
c496ecfe718d added: #author
Claus Gittinger <cg@exept.de>
parents: 2640
diff changeset
   221
    time := aTimestamp asTime.
2640
f214ff2248ed added: #timeStamp:
Claus Gittinger <cg@exept.de>
parents: 2608
diff changeset
   222
f214ff2248ed added: #timeStamp:
Claus Gittinger <cg@exept.de>
parents: 2608
diff changeset
   223
    "Created: / 04-12-2011 / 10:06:02 / cg"
f214ff2248ed added: #timeStamp:
Claus Gittinger <cg@exept.de>
parents: 2608
diff changeset
   224
!
f214ff2248ed added: #timeStamp:
Claus Gittinger <cg@exept.de>
parents: 2608
diff changeset
   225
4137
c0d64b4ef710 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3745
diff changeset
   226
timestamp
4140
0f192ecaf39e #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4137
diff changeset
   227
    timestamp notNil ifTrue:[^ timestamp].
0f192ecaf39e #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4137
diff changeset
   228
    date isNil ifTrue:[^ nil].
0f192ecaf39e #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4137
diff changeset
   229
    time isNil ifTrue:[^ date asTimestamp].
4137
c0d64b4ef710 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3745
diff changeset
   230
    ^ Timestamp fromDate:date andTime:time
c0d64b4ef710 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3745
diff changeset
   231
!
c0d64b4ef710 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3745
diff changeset
   232
c0d64b4ef710 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3745
diff changeset
   233
timestamp:aTimestamp
4140
0f192ecaf39e #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4137
diff changeset
   234
    timestamp := aTimestamp
4137
c0d64b4ef710 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3745
diff changeset
   235
c0d64b4ef710 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3745
diff changeset
   236
    "Created: / 04-12-2011 / 10:06:02 / cg"
c0d64b4ef710 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3745
diff changeset
   237
!
c0d64b4ef710 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3745
diff changeset
   238
2608
vrany
parents: 2382
diff changeset
   239
timezone
vrany
parents: 2382
diff changeset
   240
    "raise an error: must be redefined in concrete subclass(es)"
vrany
parents: 2382
diff changeset
   241
vrany
parents: 2382
diff changeset
   242
    ^ nil "Not known"
vrany
parents: 2382
diff changeset
   243
vrany
parents: 2382
diff changeset
   244
    "Modified: / 23-11-2011 / 13:54:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
vrany
parents: 2382
diff changeset
   245
!
vrany
parents: 2382
diff changeset
   246
2028
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   247
user
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   248
    ^ user
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   249
!
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   250
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   251
user:something
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   252
    user := something.
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   253
! !
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   254
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   255
!VersionInfo class methodsFor:'documentation'!
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   256
3662
576a064f048e class: VersionInfo
Claus Gittinger <cg@exept.de>
parents: 3655
diff changeset
   257
version
4137
c0d64b4ef710 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3745
diff changeset
   258
    ^ '$Header$'
3662
576a064f048e class: VersionInfo
Claus Gittinger <cg@exept.de>
parents: 3655
diff changeset
   259
!
576a064f048e class: VersionInfo
Claus Gittinger <cg@exept.de>
parents: 3655
diff changeset
   260
2177
ec8a8ef58c34 added: #copyright
Claus Gittinger <cg@exept.de>
parents: 2028
diff changeset
   261
version_CVS
4137
c0d64b4ef710 #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 3745
diff changeset
   262
    ^ '$Header$'
2028
1f54c88269b2 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   263
! !
3517
b94e2737c469 class: VersionInfo
Claus Gittinger <cg@exept.de>
parents: 2667
diff changeset
   264