AbstractSourceCodeManager.st
author Claus Gittinger <cg@exept.de>
Wed, 16 Aug 2006 11:26:43 +0200
changeset 1527 8e5b083fefca
parent 1523 185f0facd416
child 1534 2e310e923d63
permissions -rw-r--r--
*** empty log message ***
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
56
6705671acee8 source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     1
"
6705671acee8 source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     2
 COPYRIGHT (c) 1995 by Claus Gittinger
6705671acee8 source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     3
	      All Rights Reserved
6705671acee8 source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
6705671acee8 source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     5
 This software is furnished under a license and may be used
6705671acee8 source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
6705671acee8 source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
6705671acee8 source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
6705671acee8 source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
6705671acee8 source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    10
 hereby transferred.
6705671acee8 source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    11
"
6705671acee8 source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
919
20e138a64538 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
    13
"{ Package: 'stx:libbasic3' }"
20e138a64538 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 904
diff changeset
    14
56
6705671acee8 source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
Object subclass:#AbstractSourceCodeManager
147
f6cfa2afc00a history list added
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
    16
	instanceVariableNames:''
158
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
    17
	classVariableNames:'DefaultManager CachingSources CacheDirectoryName UseWorkTree
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
    18
		WorkTreeDirectoryName'
147
f6cfa2afc00a history list added
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
    19
	poolDictionaries:''
218
abd9b9000b37 category changes
Claus Gittinger <cg@exept.de>
parents: 213
diff changeset
    20
	category:'System-SourceCodeManagement'
56
6705671acee8 source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
!
6705671acee8 source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
513
10707a1c366f use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 507
diff changeset
    23
!AbstractSourceCodeManager class methodsFor:'documentation'!
56
6705671acee8 source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
6705671acee8 source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
copyright
6705671acee8 source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
"
6705671acee8 source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
 COPYRIGHT (c) 1995 by Claus Gittinger
6705671acee8 source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
	      All Rights Reserved
6705671acee8 source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
6705671acee8 source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
 This software is furnished under a license and may be used
6705671acee8 source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
 only in accordance with the terms of that license and with the
6705671acee8 source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
 inclusion of the above copyright notice.   This software may not
6705671acee8 source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
 be provided or otherwise made available to, or used by, any
6705671acee8 source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
 other person.  No title to or ownership of the software is
6705671acee8 source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
 hereby transferred.
6705671acee8 source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
"
71
a8c7364b9bb6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 70
diff changeset
    37
!
a8c7364b9bb6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 70
diff changeset
    38
a8c7364b9bb6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 70
diff changeset
    39
documentation
a8c7364b9bb6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 70
diff changeset
    40
"
a8c7364b9bb6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 70
diff changeset
    41
    Abstract superclass for sourceCodeManagers.
a8c7364b9bb6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 70
diff changeset
    42
    Concrete subclasses provide access to a source repository.
a8c7364b9bb6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 70
diff changeset
    43
    All protocol here traps into subclassResponsbility errors.
a8c7364b9bb6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 70
diff changeset
    44
    Please read more documentation in concrete subclasses 
a8c7364b9bb6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 70
diff changeset
    45
    (especially: CVSSourceCodeManager) for how to use this manager.
236
7f570e0a0a75 documentation
Claus Gittinger <cg@exept.de>
parents: 218
diff changeset
    46
7f570e0a0a75 documentation
Claus Gittinger <cg@exept.de>
parents: 218
diff changeset
    47
    [author:]
7f570e0a0a75 documentation
Claus Gittinger <cg@exept.de>
parents: 218
diff changeset
    48
        Claus Gittinger
71
a8c7364b9bb6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 70
diff changeset
    49
"
93
83042eccb8d1 revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
    50
! !
56
6705671acee8 source code managers (optional) These are involved, if no
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51
513
10707a1c366f use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 507
diff changeset
    52
!AbstractSourceCodeManager class methodsFor:'initialization'!
63
abf51a9ae873 cachedir in tempdir
Claus Gittinger <cg@exept.de>
parents: 61
diff changeset
    53
abf51a9ae873 cachedir in tempdir
Claus Gittinger <cg@exept.de>
parents: 61
diff changeset
    54
initCacheDirPath
472
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
    55
    "initialize the name of the cacheDirectory.
796
c46ebd7ed4a8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
    56
     This is:
c46ebd7ed4a8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
    57
          <tempDir>/stx_sourceCache."
63
abf51a9ae873 cachedir in tempdir
Claus Gittinger <cg@exept.de>
parents: 61
diff changeset
    58
796
c46ebd7ed4a8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
    59
    CacheDirectoryName := (Filename tempDirectory constructString:'stx_sourceCache').
792
901f03b078db fixed tempdir setup for win32
Claus Gittinger <cg@exept.de>
parents: 769
diff changeset
    60
901f03b078db fixed tempdir setup for win32
Claus Gittinger <cg@exept.de>
parents: 769
diff changeset
    61
    "
901f03b078db fixed tempdir setup for win32
Claus Gittinger <cg@exept.de>
parents: 769
diff changeset
    62
     self initCacheDirPath
901f03b078db fixed tempdir setup for win32
Claus Gittinger <cg@exept.de>
parents: 769
diff changeset
    63
    "
158
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
    64
796
c46ebd7ed4a8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 795
diff changeset
    65
    "Modified: / 12.7.1999 / 10:01:31 / cg"
158
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
    66
!
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
    67
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
    68
initialize
472
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
    69
    "setup for no caching and no workTree"
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
    70
1060
bf0279994422 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1038
diff changeset
    71
    CachingSources ifNil:[CachingSources := false].
bf0279994422 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1038
diff changeset
    72
    UseWorkTree    ifNil:[UseWorkTree := false].
63
abf51a9ae873 cachedir in tempdir
Claus Gittinger <cg@exept.de>
parents: 61
diff changeset
    73
! !
abf51a9ae873 cachedir in tempdir
Claus Gittinger <cg@exept.de>
parents: 61
diff changeset
    74
513
10707a1c366f use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 507
diff changeset
    75
!AbstractSourceCodeManager class methodsFor:'accessing'!
112
e035bf8c3e00 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 110
diff changeset
    76
158
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
    77
cacheDirectoryName
472
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
    78
    "return the name of the cache directory, where checked out class
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
    79
     sources are kept for faster access. The default is '/tmp/stx_sourceCache'.
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
    80
     This cache is shared among all ST/X users on a system."
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
    81
158
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
    82
    ^ CacheDirectoryName
472
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
    83
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
    84
    "Modified: 12.9.1996 / 02:20:45 / cg"
158
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
    85
!
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
    86
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
    87
cacheDirectoryName:aStringOrFilename
472
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
    88
    "set the name of the cache directory, where checked out class
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
    89
     sources are kept for faster access. The default is '/tmp/stx_sourceCache'.
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
    90
     This cache is shared among all ST/X users on a system.
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
    91
     The directory is typically set via the launchers setting menu, or
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
    92
     from a startup rc-file."
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
    93
158
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
    94
    CacheDirectoryName := aStringOrFilename
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
    95
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
    96
    "Created: 16.12.1995 / 15:18:43 / cg"
472
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
    97
    "Modified: 12.9.1996 / 02:21:35 / cg"
158
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
    98
!
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
    99
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
   100
cachingSources
472
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
   101
    "return true, if source caching is enabled.
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
   102
     (see cacheDirectoryName for what that means)"
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
   103
158
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
   104
    ^ CachingSources
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
   105
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
   106
    "Created: 16.12.1995 / 15:17:50 / cg"
472
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
   107
    "Modified: 12.9.1996 / 02:22:19 / cg"
158
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
   108
!
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
   109
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
   110
cachingSources:aBoolean
472
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
   111
    "enable/disable the caching of source files.
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
   112
     (see cacheDirectoryName for what that means)"
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
   113
158
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
   114
    CachingSources := aBoolean
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
   115
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
   116
    "Created: 16.12.1995 / 15:18:13 / cg"
472
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
   117
    "Modified: 12.9.1996 / 02:22:42 / cg"
158
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
   118
!
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
   119
112
e035bf8c3e00 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 110
diff changeset
   120
defaultManager
472
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
   121
    "return the default sourceCodeManager class"
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
   122
112
e035bf8c3e00 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 110
diff changeset
   123
    ^ DefaultManager
e035bf8c3e00 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 110
diff changeset
   124
e035bf8c3e00 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 110
diff changeset
   125
    "Created: 7.12.1995 / 17:14:22 / cg"
472
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
   126
    "Modified: 12.9.1996 / 02:22:56 / cg"
158
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
   127
!
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
   128
482
ab073539c01e allow change of the repository
Claus Gittinger <cg@exept.de>
parents: 472
diff changeset
   129
repositoryName
ab073539c01e allow change of the repository
Claus Gittinger <cg@exept.de>
parents: 472
diff changeset
   130
    "return the name of the repository.
ab073539c01e allow change of the repository
Claus Gittinger <cg@exept.de>
parents: 472
diff changeset
   131
     Since this is an abstract class, return nil (i.e. none)"
ab073539c01e allow change of the repository
Claus Gittinger <cg@exept.de>
parents: 472
diff changeset
   132
ab073539c01e allow change of the repository
Claus Gittinger <cg@exept.de>
parents: 472
diff changeset
   133
    ^ nil
ab073539c01e allow change of the repository
Claus Gittinger <cg@exept.de>
parents: 472
diff changeset
   134
ab073539c01e allow change of the repository
Claus Gittinger <cg@exept.de>
parents: 472
diff changeset
   135
    "Modified: 12.9.1996 / 02:20:45 / cg"
ab073539c01e allow change of the repository
Claus Gittinger <cg@exept.de>
parents: 472
diff changeset
   136
    "Created: 14.9.1996 / 13:21:37 / cg"
ab073539c01e allow change of the repository
Claus Gittinger <cg@exept.de>
parents: 472
diff changeset
   137
!
ab073539c01e allow change of the repository
Claus Gittinger <cg@exept.de>
parents: 472
diff changeset
   138
158
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
   139
useWorkTree
472
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
   140
    "return the setting of useWorkTree, which (eventually)
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
   141
     controls if an up-to-date view of a CVS working tree should be
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
   142
     kept in sync. This is not yet implemented."
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
   143
158
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
   144
    ^ UseWorkTree
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
   145
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
   146
    "Created: 16.12.1995 / 15:36:48 / cg"
472
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
   147
    "Modified: 12.9.1996 / 02:24:01 / cg"
158
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
   148
!
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
   149
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
   150
useWorkTree:aBoolean
472
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
   151
    "enable/disable the useWorkTree feature, which (eventually)
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
   152
     controls if an up-to-date view of a CVS working tree should be
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
   153
     kept in sync. This is not yet implemented."
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
   154
158
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
   155
    UseWorkTree := aBoolean
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
   156
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
   157
    "Created: 16.12.1995 / 15:37:29 / cg"
472
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
   158
    "Modified: 12.9.1996 / 02:24:38 / cg"
158
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
   159
!
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
   160
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
   161
workTreeDirectoryName
472
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
   162
    "return the name of the workTree, which is kept in sync
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
   163
     with the current class versions. This is not yet implemented"
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
   164
158
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
   165
    ^ WorkTreeDirectoryName
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
   166
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
   167
    "Created: 16.12.1995 / 15:35:21 / cg"
472
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
   168
    "Modified: 12.9.1996 / 02:25:13 / cg"
158
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
   169
!
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
   170
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
   171
workTreeDirectoryName:aStringOrFilename
472
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
   172
    "set the name of the workTree, which is kept in sync
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
   173
     with the current class versions. This is not yet implemented"
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
   174
158
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
   175
    WorkTreeDirectoryName := aStringOrFilename
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
   176
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
   177
    "Created: 16.12.1995 / 15:35:34 / cg"
472
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
   178
    "Modified: 12.9.1996 / 02:25:19 / cg"
112
e035bf8c3e00 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 110
diff changeset
   179
! !
e035bf8c3e00 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 110
diff changeset
   180
545
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   181
!AbstractSourceCodeManager class methodsFor:'basic access'!
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   182
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   183
checkinClass:aClass fileName:classFileName directory:packageDir module:moduleDir source:sourceFile logMessage:logMessage force:force
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   184
    "checkin of a class into the source repository.
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   185
     Return true if ok, false if not."
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   186
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   187
    ^ self subclassResponsibility.
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   188
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   189
    "Created: 14.2.1997 / 21:17:33 / cg"
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   190
    "Modified: 14.2.1997 / 21:18:48 / cg"
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   191
!
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   192
759
2d7e72bae18b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 752
diff changeset
   193
checkoutModule:aModule package:aPackage andDo:aBlock
2d7e72bae18b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 752
diff changeset
   194
    "check out everything from a package into a temporary directory.
2d7e72bae18b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 752
diff changeset
   195
     Then evaluate aBlock, passing the name of that temp-directory.
2d7e72bae18b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 752
diff changeset
   196
     Afterwards, the tempDir is removed.
2d7e72bae18b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 752
diff changeset
   197
     Return true, if OK, false if any error occurred."
2d7e72bae18b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 752
diff changeset
   198
2d7e72bae18b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 752
diff changeset
   199
    ^ self subclassResponsibility
2d7e72bae18b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 752
diff changeset
   200
2d7e72bae18b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 752
diff changeset
   201
    "Modified: 14.2.1997 / 21:18:35 / cg"
2d7e72bae18b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 752
diff changeset
   202
!
2d7e72bae18b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 752
diff changeset
   203
545
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   204
streamForClass:aClass fileName:classFileName revision:revision directory:packageDir module:moduleDir cache:doCache
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   205
    "extract a classes source code and return an open readStream on it.
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   206
     A revision of nil selects the current (in image) revision.
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   207
     The classes source code is extracted using the revision and the sourceCodeInfo,
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   208
     which itself is extracted from the classes packageString."
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   209
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   210
    ^ self subclassResponsibility
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   211
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   212
    "Modified: 14.2.1997 / 21:18:35 / cg"
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   213
! !
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   214
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   215
!AbstractSourceCodeManager class methodsFor:'basic administration'!
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   216
674
5d660e2bae10 added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents: 636
diff changeset
   217
checkForExistingContainerForClass:aClass
1013
c455100cbaa8 comments added
Claus Gittinger <cg@exept.de>
parents: 1011
diff changeset
   218
    "check if a source-code container for a given class is present in the repository."
c455100cbaa8 comments added
Claus Gittinger <cg@exept.de>
parents: 1011
diff changeset
   219
674
5d660e2bae10 added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents: 636
diff changeset
   220
    |sourceInfo packageDir moduleDir classFileName|
5d660e2bae10 added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents: 636
diff changeset
   221
5d660e2bae10 added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents: 636
diff changeset
   222
    sourceInfo := self sourceInfoOfClass:aClass.
5d660e2bae10 added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents: 636
diff changeset
   223
    sourceInfo isNil ifTrue:[
5d660e2bae10 added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents: 636
diff changeset
   224
        ('SourceCodeManager [warning]: no sourceInfo for class: ' , aClass name) errorPrintCR.
5d660e2bae10 added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents: 636
diff changeset
   225
        ^ false
5d660e2bae10 added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents: 636
diff changeset
   226
    ].
5d660e2bae10 added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents: 636
diff changeset
   227
5d660e2bae10 added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents: 636
diff changeset
   228
    packageDir := self packageFromSourceInfo:sourceInfo.
5d660e2bae10 added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents: 636
diff changeset
   229
    moduleDir := self moduleFromSourceInfo:sourceInfo.  "/ use the modules name as CVS module
5d660e2bae10 added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents: 636
diff changeset
   230
    classFileName := self containerFromSourceInfo:sourceInfo.
5d660e2bae10 added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents: 636
diff changeset
   231
5d660e2bae10 added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents: 636
diff changeset
   232
    ^ self checkForExistingContainerInModule:moduleDir package:packageDir container:classFileName
5d660e2bae10 added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents: 636
diff changeset
   233
5d660e2bae10 added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents: 636
diff changeset
   234
    "Created: / 13.5.1998 / 22:35:50 / cg"
5d660e2bae10 added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents: 636
diff changeset
   235
!
5d660e2bae10 added query for existing container (by class)
Claus Gittinger <cg@exept.de>
parents: 636
diff changeset
   236
545
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   237
checkForExistingContainerInModule:moduleName package:dirName container:fileName
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   238
    "check for a container to be present"
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   239
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   240
    ^ self subclassResponsibility.
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   241
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   242
    "Created: 9.12.1995 / 19:02:23 / cg"
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   243
    "Modified: 14.2.1997 / 21:18:56 / cg"
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   244
!
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   245
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   246
checkForExistingModule:moduleName
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   247
    "check for a module directory to be present"
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   248
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   249
    ^ self subclassResponsibility.
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   250
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   251
    "Created: 9.12.1995 / 19:02:23 / cg"
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   252
    "Modified: 14.2.1997 / 21:19:01 / cg"
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   253
!
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   254
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   255
checkForExistingModule:moduleDir package:packageDir
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   256
    "check for a package directory to be present"
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   257
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   258
    ^ self subclassResponsibility.
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   259
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   260
    "Created: 9.12.1995 / 19:02:23 / cg"
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   261
    "Modified: 14.2.1997 / 21:19:06 / cg"
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   262
!
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   263
966
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   264
createContainerFor:aClass inModule:moduleName directory:dirName container:fileName
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   265
    "create a new container & check into it an initial version of aClass"
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   266
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   267
    ^ self subclassResponsibility.
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   268
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   269
    "Created: 9.12.1995 / 19:02:47 / cg"
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   270
    "Modified: 14.2.1997 / 21:19:11 / cg"
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   271
!
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   272
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   273
createModule:moduleName
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   274
    "create a new module directory"
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   275
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   276
    ^ self subclassResponsibility.
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   277
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   278
    "Created: 9.12.1995 / 19:02:23 / cg"
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   279
    "Modified: 14.2.1997 / 21:19:16 / cg"
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   280
!
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   281
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   282
createModule:module package:package
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   283
    "create a new package directory"
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   284
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   285
    ^ self subclassResponsibility.
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   286
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   287
    "Created: 9.12.1995 / 19:02:23 / cg"
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   288
    "Modified: 14.2.1997 / 21:19:21 / cg"
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   289
!
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   290
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   291
initialRevisionStringFor:aClass inModule:moduleDir package:packageDir container:fileName
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   292
    "return a string usable as initial revision string"
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   293
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   294
    ^ self subclassResponsibility
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   295
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   296
    "Created: 14.2.1997 / 21:01:41 / cg"
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   297
!
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   298
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   299
removeContainerFor:aClass inModule:moduleName directory:dirName container:fileName
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   300
    "remove a container"
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   301
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   302
    ^ self subclassResponsibility.
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   303
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   304
    "Created: 11.9.1996 / 13:18:33 / cg"
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   305
    "Modified: 14.2.1997 / 21:19:28 / cg"
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   306
!
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   307
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   308
revisionLogOf:cls fromRevision:rev1 toRevision:rev2 fileName:classFileName directory:packageDir module:moduleDir 
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   309
    "actually do return a revisionLog. The main worker method.
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   310
     This must be implemented by a concrete source-code manager"
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   311
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   312
    ^ self subclassResponsibility.
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   313
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   314
    "Created: 15.11.1995 / 18:12:51 / cg"
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   315
    "Modified: 14.2.1997 / 21:14:01 / cg"
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   316
! !
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   317
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   318
!AbstractSourceCodeManager class methodsFor:'cache administration'!
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   319
961
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   320
condenseSourceCache
966
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   321
    "remove all cached old versions (i.e. leave the newest only)"
961
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   322
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   323
    |d allFiles newestVersions|
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   324
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   325
    CacheDirectoryName notNil ifTrue:[
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   326
        newestVersions := Dictionary new.
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   327
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   328
        d := CacheDirectoryName asFilename.
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   329
        allFiles := d directoryContents copy asSet.
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   330
        allFiles do:[:eachFile |
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   331
            |base vsnNumberString i prevVsnString prevVsnNumbers vsnNumbers vsnIsGreater|
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   332
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   333
            i := eachFile size.
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   334
            [i > 0 and:[(eachFile at:i) isDigit or:[(eachFile at:i) == $.]]] whileTrue:[ i := i - 1 ].
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   335
            vsnNumberString := eachFile copyFrom:i + 1.
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   336
            (eachFile at:i) == $_ ifTrue:[i := i - 1].
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   337
            base := eachFile copyTo:i.
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   338
            vsnNumberString notEmpty ifTrue:[
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   339
                (newestVersions includesKey:base) ifFalse:[
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   340
                    newestVersions at:base put:vsnNumberString.
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   341
                ] ifTrue:[
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   342
                    prevVsnString := newestVersions at:base.
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   343
                    prevVsnNumbers := (prevVsnString asCollectionOfSubstringsSeparatedBy:$.) collect:[:each | Number readFrom:each].
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   344
                    vsnNumbers := (vsnNumberString asCollectionOfSubstringsSeparatedBy:$.) collect:[:each | Number readFrom:each].
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   345
                    vsnIsGreater := false.
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   346
                    1 to:((vsnNumbers size) min:(prevVsnNumbers size)) doWithBreak:[:part :exit |
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   347
                        (vsnNumbers at:part) > (prevVsnNumbers at:part) ifTrue:[
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   348
                            vsnIsGreater := true.
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   349
                            exit value.
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   350
                        ].
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   351
                    ].
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   352
                    vsnIsGreater ifTrue:[
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   353
                        newestVersions at:base put:vsnNumberString
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   354
                    ]
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   355
                ].
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   356
            ].
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   357
        ].
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   358
        allFiles do:[:eachFile |
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   359
            |base vsnNumberString i prevVsnString prevVsnNumbers vsnNumbers vsnIsGreater|
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   360
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   361
            i := eachFile size.
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   362
            [i > 0 and:[(eachFile at:i) isDigit or:[(eachFile at:i) == $.]]] whileTrue:[ i := i - 1 ].
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   363
            vsnNumberString := eachFile copyFrom:i + 1.
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   364
            (eachFile at:i) == $_ ifTrue:[i := i - 1].
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   365
            base := eachFile copyTo:i.
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   366
            vsnNumberString isEmpty ifTrue:[
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   367
                (d construct:eachFile) remove
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   368
            ] ifFalse:[
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   369
                (vsnNumberString = (newestVersions at:base)) ifFalse:[
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   370
                    (d construct:eachFile) remove
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   371
                ]
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   372
            ]
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   373
        ].
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   374
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   375
    ]
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   376
!
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   377
966
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   378
flushSourceCache
c77378be6456 comments
Claus Gittinger <cg@exept.de>
parents: 961
diff changeset
   379
    "remove all cached versions"
545
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   380
961
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   381
    |d|
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   382
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   383
    CacheDirectoryName notNil ifTrue:[
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   384
        d := CacheDirectoryName asFilename.
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   385
        d directoryContents copy do:[:eachFile |
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   386
            (d construct:eachFile) remove
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   387
        ]
1a99e0289a95 added flush & condense sourceCache
Claus Gittinger <cg@exept.de>
parents: 953
diff changeset
   388
    ]
545
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   389
! !
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   390
513
10707a1c366f use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 507
diff changeset
   391
!AbstractSourceCodeManager class methodsFor:'private'!
71
a8c7364b9bb6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 70
diff changeset
   392
813
a7daf8306001 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 796
diff changeset
   393
checkMethodPackagesOf:aClass
a7daf8306001 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 796
diff changeset
   394
    "check if aClass contains methods from another package;
a7daf8306001 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 796
diff changeset
   395
     ask if these should be checked in with the class.
830
c788d0c93635 allow for base-package only checkin
Claus Gittinger <cg@exept.de>
parents: 816
diff changeset
   396
     Raises abortSignal if checkIn is to be suppressed.
c788d0c93635 allow for base-package only checkin
Claus Gittinger <cg@exept.de>
parents: 816
diff changeset
   397
     returns:
c788d0c93635 allow for base-package only checkin
Claus Gittinger <cg@exept.de>
parents: 816
diff changeset
   398
        #base   - only check in methods from the classes package
1518
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   399
        #all    - check in all
813
a7daf8306001 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 796
diff changeset
   400
1518
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   401
     the old code looked for all extensions, and allowed them to be moved to the base-package.
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   402
     This was dangerous, as if one presses yes too quickly, extensions move to the base too easy.
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   403
     The new code only allows for extensions from the __NOPROJECT__ package to be moved.
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   404
     Extensions always remain extensions, and must be moved by an explicit method-menu action.
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   405
    "
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   406
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   407
    |checkInClassPackageOnly clsPackage otherPackages otherPackageNames methodsFromOtherPackages
1066
683643ad5544 better info message (contains ... methods in other packages ..)
Claus Gittinger <cg@exept.de>
parents: 1060
diff changeset
   408
     methodCategoriesInOtherPackages methodCategoryInOtherPackages
1520
e5caaecf7681 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   409
     msg answer isDefaultAnswer labels actions hasUnassignedExtensions
1518
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   410
     unassignedMethods methodCategoriesWithUnassignedMethods methodCategoryWithUnassignedMethods 
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   411
     args|
813
a7daf8306001 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 796
diff changeset
   412
a7daf8306001 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 796
diff changeset
   413
    checkInClassPackageOnly := false.
a7daf8306001 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 796
diff changeset
   414
a7daf8306001 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 796
diff changeset
   415
    clsPackage := aClass package.
1518
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   416
922
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
   417
    otherPackages := Set new.
1518
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   418
    methodsFromOtherPackages := OrderedCollection new.
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   419
    hasUnassignedExtensions := false.
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   420
    unassignedMethods := OrderedCollection new.
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   421
    methodCategoriesWithUnassignedMethods := Set new.
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   422
    methodCategoriesInOtherPackages := Set new.
922
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
   423
1077
6b1bcfd27521 renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 1075
diff changeset
   424
    aClass instAndClassSelectorsAndMethodsDo:[:sel :mthd |
815
272eb8358169 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
   425
        |mthdPackage|
272eb8358169 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
   426
272eb8358169 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
   427
        (mthdPackage := mthd package) ~= clsPackage ifTrue:[
1518
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   428
            mthdPackage == Project noProjectID ifTrue:[
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   429
                hasUnassignedExtensions := true.
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   430
                unassignedMethods add:mthd.        
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   431
                methodCategoriesWithUnassignedMethods add:(mthd category).
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   432
            ] ifFalse:[
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   433
                methodsFromOtherPackages add:mthd.
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   434
                otherPackages add:mthdPackage.
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   435
                methodCategoriesInOtherPackages add:(mthd category).
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   436
            ].
815
272eb8358169 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
   437
        ]
272eb8358169 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 814
diff changeset
   438
    ].
1518
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   439
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   440
    hasUnassignedExtensions ifFalse:[
1027
6c93b510b86d update private class packages
Claus Gittinger <cg@exept.de>
parents: 1024
diff changeset
   441
        aClass allPrivateClassesDo:[:eachPrivateClass |
1028
e839e2bcf1d7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1027
diff changeset
   442
            aClass setPackage:clsPackage.
1077
6b1bcfd27521 renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 1075
diff changeset
   443
            eachPrivateClass instAndClassSelectorsAndMethodsDo:[:sel :mthd |
1027
6c93b510b86d update private class packages
Claus Gittinger <cg@exept.de>
parents: 1024
diff changeset
   444
                mthd setPackage:clsPackage
6c93b510b86d update private class packages
Claus Gittinger <cg@exept.de>
parents: 1024
diff changeset
   445
            ]
6c93b510b86d update private class packages
Claus Gittinger <cg@exept.de>
parents: 1024
diff changeset
   446
        ].
1518
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   447
        ^ #base
830
c788d0c93635 allow for base-package only checkin
Claus Gittinger <cg@exept.de>
parents: 816
diff changeset
   448
    ].
1518
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   449
1029
2bb7575ddf46 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1028
diff changeset
   450
    otherPackages := otherPackages asOrderedCollection sort.
1518
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   451
    otherPackageNames := String streamContents:[:stream| 
1432
17790e20ad14 Show all foreign package names when checking in
Stefan Vogel <sv@exept.de>
parents: 1417
diff changeset
   452
        otherPackages 
17790e20ad14 Show all foreign package names when checking in
Stefan Vogel <sv@exept.de>
parents: 1417
diff changeset
   453
            do:[:eachPackageName| eachPackageName printOn:stream] 
17790e20ad14 Show all foreign package names when checking in
Stefan Vogel <sv@exept.de>
parents: 1417
diff changeset
   454
            separatedBy:[stream nextPutAll:', '].
17790e20ad14 Show all foreign package names when checking in
Stefan Vogel <sv@exept.de>
parents: 1417
diff changeset
   455
    ].
830
c788d0c93635 allow for base-package only checkin
Claus Gittinger <cg@exept.de>
parents: 816
diff changeset
   456
1066
683643ad5544 better info message (contains ... methods in other packages ..)
Claus Gittinger <cg@exept.de>
parents: 1060
diff changeset
   457
    methodCategoriesInOtherPackages size == 1 ifTrue:[
683643ad5544 better info message (contains ... methods in other packages ..)
Claus Gittinger <cg@exept.de>
parents: 1060
diff changeset
   458
        methodCategoryInOtherPackages := methodCategoriesInOtherPackages anElement.
683643ad5544 better info message (contains ... methods in other packages ..)
Claus Gittinger <cg@exept.de>
parents: 1060
diff changeset
   459
    ].
1518
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   460
    methodCategoriesWithUnassignedMethods size == 1 ifTrue:[
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   461
        methodCategoryWithUnassignedMethods := methodCategoriesWithUnassignedMethods anElement.
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   462
    ].
1066
683643ad5544 better info message (contains ... methods in other packages ..)
Claus Gittinger <cg@exept.de>
parents: 1060
diff changeset
   463
1021
0448114aab01 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1018
diff changeset
   464
    isDefaultAnswer := false.
1077
6b1bcfd27521 renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 1075
diff changeset
   465
    (SourceCodeManagerUtilities yesToAllNotification notNil 
6b1bcfd27521 renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 1075
diff changeset
   466
    and:[SourceCodeManagerUtilities yesToAllNotification isHandled]) ifTrue:[
1021
0448114aab01 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1018
diff changeset
   467
        answer := isDefaultAnswer := true.
830
c788d0c93635 allow for base-package only checkin
Claus Gittinger <cg@exept.de>
parents: 816
diff changeset
   468
    ] ifFalse:[
1518
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   469
        methodCategoriesWithUnassignedMethods size == 1 ifTrue:[
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   470
            unassignedMethods size == 1 ifTrue:[
1520
e5caaecf7681 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   471
                msg := 'The class ''%1'' contains the unassigned (loose) method: %6'.
1518
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   472
                msg := msg , '\(In the ''%4'' category).'.
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   473
            ] ifFalse:[
1520
e5caaecf7681 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   474
                msg := 'The class ''%1'' contains %3 unassigned (loose) method(s)'.
1518
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   475
                msg := msg , '\(In the ''%4'' category).'.
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   476
            ]
1016
ab35c6af1614 yes-to-all option
Claus Gittinger <cg@exept.de>
parents: 1013
diff changeset
   477
        ] ifFalse:[
1520
e5caaecf7681 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   478
            msg := 'The class ''%1'' contains %3 unassigned (loose) methods in %5 categories.'.
1016
ab35c6af1614 yes-to-all option
Claus Gittinger <cg@exept.de>
parents: 1013
diff changeset
   479
        ].
1518
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   480
        unassignedMethods size == 1 ifTrue:[
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   481
            msg := msg , '\\Move this method to the ''%2'' package ?'.
1066
683643ad5544 better info message (contains ... methods in other packages ..)
Claus Gittinger <cg@exept.de>
parents: 1060
diff changeset
   482
        ] ifFalse:[
1518
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   483
            msg := msg , '\\Move those to the ''%2'' package ?'.
1066
683643ad5544 better info message (contains ... methods in other packages ..)
Claus Gittinger <cg@exept.de>
parents: 1060
diff changeset
   484
        ].
1518
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   485
        args := Array
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   486
                    with:aClass name allBold
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   487
                    with:clsPackage allBold
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   488
                    with:unassignedMethods size
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   489
                    with:methodCategoryWithUnassignedMethods
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   490
                    with:methodCategoriesWithUnassignedMethods size
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   491
                    with:unassignedMethods first selector allBold.
1016
ab35c6af1614 yes-to-all option
Claus Gittinger <cg@exept.de>
parents: 1013
diff changeset
   492
1036
2f49ddc6c98e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1032
diff changeset
   493
        SourceCodeManagerUtilities yesToAllNotification isHandled       
2f49ddc6c98e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1032
diff changeset
   494
        ifTrue:[
1077
6b1bcfd27521 renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 1075
diff changeset
   495
            labels := #('Cancel' 'No' 'Browse' 'Yes to all' 'Yes').
1518
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   496
            actions := #(#cancel false #browse #yesToAll true).
1036
2f49ddc6c98e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1032
diff changeset
   497
        ] ifFalse:[
1077
6b1bcfd27521 renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 1075
diff changeset
   498
            labels := #('Cancel' 'No' 'Browse' 'Yes').
1518
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   499
            actions := #(#cancel false #browse true).
1036
2f49ddc6c98e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1032
diff changeset
   500
        ].
2f49ddc6c98e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1032
diff changeset
   501
1016
ab35c6af1614 yes-to-all option
Claus Gittinger <cg@exept.de>
parents: 1013
diff changeset
   502
        answer := OptionBox 
1518
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   503
                      request:(SystemBrowser classResources
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   504
                                stringWithCRs:msg
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   505
                                withArgs:args) 
1016
ab35c6af1614 yes-to-all option
Claus Gittinger <cg@exept.de>
parents: 1013
diff changeset
   506
                      label:'Change packageID ?'
1392
4469708537e8 dont send obsolete message to OptionBox
Claus Gittinger <cg@exept.de>
parents: 1348
diff changeset
   507
                      image:(InfoBox iconBitmap)
1218
7bf09a49d58a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1217
diff changeset
   508
                      buttonLabels:(Dialog resources array:labels)
1036
2f49ddc6c98e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1032
diff changeset
   509
                      values:actions
1520
e5caaecf7681 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   510
                      default:true.
1077
6b1bcfd27521 renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 1075
diff changeset
   511
6b1bcfd27521 renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 1075
diff changeset
   512
        answer == #browse ifTrue:[
1112
c395948357d3 care for userPref-browser-setting (in browse-action)
Claus Gittinger <cg@exept.de>
parents: 1091
diff changeset
   513
            UserPreferences current systemBrowserClass
1077
6b1bcfd27521 renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 1075
diff changeset
   514
                browseMethods:methodsFromOtherPackages
6b1bcfd27521 renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 1075
diff changeset
   515
                title:('Extensions in %1' bindWith:aClass name)
6b1bcfd27521 renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 1075
diff changeset
   516
                sort:true.
1518
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   517
            answer := #cancel.
1077
6b1bcfd27521 renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 1075
diff changeset
   518
        ].
830
c788d0c93635 allow for base-package only checkin
Claus Gittinger <cg@exept.de>
parents: 816
diff changeset
   519
    ].
c788d0c93635 allow for base-package only checkin
Claus Gittinger <cg@exept.de>
parents: 816
diff changeset
   520
1518
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   521
    answer == #cancel ifTrue:[
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   522
        AbortSignal raise
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   523
    ].
1016
ab35c6af1614 yes-to-all option
Claus Gittinger <cg@exept.de>
parents: 1013
diff changeset
   524
    answer == #yesToAll ifTrue:[
ab35c6af1614 yes-to-all option
Claus Gittinger <cg@exept.de>
parents: 1013
diff changeset
   525
        SourceCodeManagerUtilities yesToAllNotification raiseWith:true.
ab35c6af1614 yes-to-all option
Claus Gittinger <cg@exept.de>
parents: 1013
diff changeset
   526
        answer := true.
ab35c6af1614 yes-to-all option
Claus Gittinger <cg@exept.de>
parents: 1013
diff changeset
   527
    ].
851
fcf26a083242 better confirm, when asking for other package methods
Claus Gittinger <cg@exept.de>
parents: 844
diff changeset
   528
1518
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   529
    "/ ok, move them over
851
fcf26a083242 better confirm, when asking for other package methods
Claus Gittinger <cg@exept.de>
parents: 844
diff changeset
   530
    answer == true ifTrue:[
830
c788d0c93635 allow for base-package only checkin
Claus Gittinger <cg@exept.de>
parents: 816
diff changeset
   531
        "/ change all method's packageID to the classes packageId
1077
6b1bcfd27521 renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 1075
diff changeset
   532
        aClass instAndClassSelectorsAndMethodsDo:[:sel :mthd |
1518
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   533
            mthd package == Project noProjectID ifTrue:[
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   534
                mthd makeLocalStringSource.
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   535
                mthd setPackage:clsPackage
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   536
            ]
830
c788d0c93635 allow for base-package only checkin
Claus Gittinger <cg@exept.de>
parents: 816
diff changeset
   537
        ].
1027
6c93b510b86d update private class packages
Claus Gittinger <cg@exept.de>
parents: 1024
diff changeset
   538
        aClass allPrivateClassesDo:[:eachPrivateClass |
1028
e839e2bcf1d7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1027
diff changeset
   539
            aClass setPackage:clsPackage.
1077
6b1bcfd27521 renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 1075
diff changeset
   540
            eachPrivateClass instAndClassSelectorsAndMethodsDo:[:sel :mthd |
1454
b7617ab0033d oops - care for extension method's sources
Claus Gittinger <cg@exept.de>
parents: 1451
diff changeset
   541
                mthd makeLocalStringSource.
1027
6c93b510b86d update private class packages
Claus Gittinger <cg@exept.de>
parents: 1024
diff changeset
   542
                mthd setPackage:clsPackage
6c93b510b86d update private class packages
Claus Gittinger <cg@exept.de>
parents: 1024
diff changeset
   543
            ]
6c93b510b86d update private class packages
Claus Gittinger <cg@exept.de>
parents: 1024
diff changeset
   544
        ].
980
4c0189345206 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 978
diff changeset
   545
        aClass changed:#projectOrganization.
1011
647a8c2fabc1 method category: and package: now send change notifications.
Claus Gittinger <cg@exept.de>
parents: 1005
diff changeset
   546
        Smalltalk changed:#projectOrganization with:(Array with:aClass). 
813
a7daf8306001 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 796
diff changeset
   547
    ].
1518
c6b1f8da85f2 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1499
diff changeset
   548
    ^ #base
1112
c395948357d3 care for userPref-browser-setting (in browse-action)
Claus Gittinger <cg@exept.de>
parents: 1091
diff changeset
   549
1520
e5caaecf7681 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1518
diff changeset
   550
    "Modified: / 10-08-2006 / 12:19:25 / cg"
813
a7daf8306001 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 796
diff changeset
   551
!
a7daf8306001 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 796
diff changeset
   552
179
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   553
containerFromSourceInfo:info
472
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
   554
    "given a sourceInfo, return the classes container"
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
   555
179
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   556
    (info includesKey:#fileName) ifTrue:[
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   557
        ^ info at:#fileName
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   558
    ].
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   559
    (info includesKey:#expectedFileName) ifTrue:[
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   560
        ^ info at:#expectedFileName
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   561
    ].
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   562
    ^ (info at:#classFileNameBase) , '.st'
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   563
472
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
   564
    "Modified: 12.9.1996 / 02:31:52 / cg"
179
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   565
!
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   566
1346
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   567
directoryFromContainerPath:containerPath forClass:aClass
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   568
    "given a full path as in an RCS header, 
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   569
     extract the directory (i.e. package)."
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   570
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   571
    ^ self directoryFromContainerPath:containerPath forPackage:(aClass package)
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   572
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   573
    "
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   574
     CVSSourceCodeManager directoryFromContainerPath:'/files/CVS/stx/libbasic/Array.st' forClass:Array
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   575
    "
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   576
!
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   577
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   578
directoryFromContainerPath:containerPath forPackage:packageID
721
5a2a1f8dc18e always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   579
    "given a full path as in an RCS header, 
5a2a1f8dc18e always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   580
     extract the directory (i.e. package)."
148
dd40327e00b7 commentary
Claus Gittinger <cg@exept.de>
parents: 147
diff changeset
   581
96
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   582
    |path idx|
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   583
1346
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   584
    path := self pathInRepositoryFrom:containerPath forPackage:packageID.
704
9644a88308bf MSDOS changes
Claus Gittinger <cg@exept.de>
parents: 677
diff changeset
   585
    path isNil ifTrue:[^ nil].
9644a88308bf MSDOS changes
Claus Gittinger <cg@exept.de>
parents: 677
diff changeset
   586
9644a88308bf MSDOS changes
Claus Gittinger <cg@exept.de>
parents: 677
diff changeset
   587
    "/ these are always UNIX filenames ...
9644a88308bf MSDOS changes
Claus Gittinger <cg@exept.de>
parents: 677
diff changeset
   588
    idx := path indexOf:$/.
9644a88308bf MSDOS changes
Claus Gittinger <cg@exept.de>
parents: 677
diff changeset
   589
    idx ~~ 0 ifTrue:[
9644a88308bf MSDOS changes
Claus Gittinger <cg@exept.de>
parents: 677
diff changeset
   590
        path := path copyFrom:(idx + 1)
96
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   591
    ].
721
5a2a1f8dc18e always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   592
5a2a1f8dc18e always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   593
    "/ the code below used to be:
5a2a1f8dc18e always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   594
    "/     ^ path asFilename directoryName
5a2a1f8dc18e always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   595
    "/ however, that only works under UNIX, since
5a2a1f8dc18e always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   596
    "/ we MUST return a unix pathname here.
5a2a1f8dc18e always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   597
    "/ therefore, do what unix would do here ...
5a2a1f8dc18e always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   598
5a2a1f8dc18e always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   599
    idx := path lastIndexOf:$/.
5a2a1f8dc18e always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   600
    idx == 0 ifTrue:[
5a2a1f8dc18e always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   601
        "/ huh ?
5a2a1f8dc18e always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   602
        ^ path
5a2a1f8dc18e always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   603
    ].
5a2a1f8dc18e always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   604
    ^ path copyTo:(idx - 1)
96
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   605
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   606
    "
721
5a2a1f8dc18e always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   607
     CVSSourceCodeManager directoryFromContainerPath:'/files/CVS/stx/libbasic/Array.st'
96
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   608
    "
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   609
721
5a2a1f8dc18e always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   610
    "Created: / 25.9.1998 / 15:37:06 / cg"
5a2a1f8dc18e always extract directoryPart as a UNIX fileName
Claus Gittinger <cg@exept.de>
parents: 705
diff changeset
   611
    "Modified: / 25.9.1998 / 15:38:59 / cg"
96
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   612
!
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   613
1523
185f0facd416 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   614
directoryFromPackageID:packageID
185f0facd416 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   615
    "given a sourceInfo, return the classes module directory"
185f0facd416 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   616
185f0facd416 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   617
    |dir|
185f0facd416 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   618
185f0facd416 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   619
    dir := packageID copyFrom:(packageID indexOf:$:)+1.
185f0facd416 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   620
    "/ a backward compatibile kludge from times when the module was separated by two colons...
185f0facd416 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   621
    (dir startsWith:$:) ifTrue:[
185f0facd416 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   622
        dir := dir copyFrom:2.
185f0facd416 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   623
    ].
185f0facd416 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   624
    ^ dir.
185f0facd416 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   625
185f0facd416 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   626
    "
185f0facd416 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   627
     self directoryFromPackageID:'stx:goodies' 
185f0facd416 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   628
    "
185f0facd416 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   629
185f0facd416 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   630
    "Created: / 10-08-2006 / 18:24:39 / cg"
185f0facd416 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   631
!
185f0facd416 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   632
1346
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   633
moduleFromContainerPath:containerPath forClass:aClass
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   634
    "given a full path as in an RCS header, extract the module."
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   635
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   636
    ^ self moduleFromContainerPath:containerPath forPackage:aClass package
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   637
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   638
    "
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   639
     SourceCodeManager moduleFromContainerPath:'/files/CVS/stx/libbasic/Array.st' forClass:Array
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   640
    "
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   641
!
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   642
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   643
moduleFromContainerPath:containerPath forPackage:packageID
148
dd40327e00b7 commentary
Claus Gittinger <cg@exept.de>
parents: 147
diff changeset
   644
    "given a full path as in an RCS header, extract the module."
dd40327e00b7 commentary
Claus Gittinger <cg@exept.de>
parents: 147
diff changeset
   645
96
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   646
    |path idx|
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   647
1346
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   648
    path := self pathInRepositoryFrom:containerPath forPackage:packageID.
704
9644a88308bf MSDOS changes
Claus Gittinger <cg@exept.de>
parents: 677
diff changeset
   649
    path isNil ifTrue:[^ nil].
9644a88308bf MSDOS changes
Claus Gittinger <cg@exept.de>
parents: 677
diff changeset
   650
9644a88308bf MSDOS changes
Claus Gittinger <cg@exept.de>
parents: 677
diff changeset
   651
    "/ these are always UNIX filenames
9644a88308bf MSDOS changes
Claus Gittinger <cg@exept.de>
parents: 677
diff changeset
   652
    idx := path indexOf:$/.
9644a88308bf MSDOS changes
Claus Gittinger <cg@exept.de>
parents: 677
diff changeset
   653
    idx == 0 ifTrue:[^ path].
9644a88308bf MSDOS changes
Claus Gittinger <cg@exept.de>
parents: 677
diff changeset
   654
    ^ path copyTo:(idx - 1)
96
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   655
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   656
    "
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   657
     SourceCodeManager moduleFromContainerPath:'/files/CVS/stx/libbasic/Array.st'
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   658
    "
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   659
704
9644a88308bf MSDOS changes
Claus Gittinger <cg@exept.de>
parents: 677
diff changeset
   660
    "Created: / 25.11.1995 / 18:42:20 / cg"
9644a88308bf MSDOS changes
Claus Gittinger <cg@exept.de>
parents: 677
diff changeset
   661
    "Modified: / 11.8.1998 / 23:01:24 / cg"
96
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   662
!
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   663
1523
185f0facd416 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   664
moduleFromPackageID:packageID
185f0facd416 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   665
    "given a sourceInfo, return the classes module directory"
185f0facd416 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   666
185f0facd416 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   667
    ^ packageID upTo:$:
185f0facd416 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   668
185f0facd416 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   669
    "
185f0facd416 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   670
     self moduleFromPackageID:'stx:goodies'
185f0facd416 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   671
    "
185f0facd416 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   672
185f0facd416 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   673
    "Created: / 10-08-2006 / 18:23:45 / cg"
185f0facd416 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   674
!
185f0facd416 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1520
diff changeset
   675
179
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   676
moduleFromSourceInfo:info
472
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
   677
    "given a sourceInfo, return the classes module directory"
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
   678
179
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   679
    ^ info at:#module.  "/ use the modules name as CVS module
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   680
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   681
    "Created: 6.2.1996 / 17:26:38 / cg"
472
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
   682
    "Modified: 12.9.1996 / 02:32:23 / cg"
179
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   683
!
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   684
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   685
packageFromSourceInfo:info
472
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
   686
    "given a sourceInfo, return the classes package directory"
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
   687
179
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   688
    ^ info at:#directory.
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   689
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   690
    "Created: 6.2.1996 / 17:26:23 / cg"
472
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
   691
    "Modified: 12.9.1996 / 02:32:19 / cg"
179
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   692
!
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   693
1346
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   694
pathInRepositoryFrom:containerPath forPackage:packageID
148
dd40327e00b7 commentary
Claus Gittinger <cg@exept.de>
parents: 147
diff changeset
   695
    "this tries to extract the path within a repository, given some path
dd40327e00b7 commentary
Claus Gittinger <cg@exept.de>
parents: 147
diff changeset
   696
     as present in an RCS Header string.
dd40327e00b7 commentary
Claus Gittinger <cg@exept.de>
parents: 147
diff changeset
   697
     Typically, this ought to be that string directly; 
dd40327e00b7 commentary
Claus Gittinger <cg@exept.de>
parents: 147
diff changeset
   698
     however, if the repository directory is accessed via a symbolic link during
dd40327e00b7 commentary
Claus Gittinger <cg@exept.de>
parents: 147
diff changeset
   699
     ci/co, some systems extract different strings with co.
dd40327e00b7 commentary
Claus Gittinger <cg@exept.de>
parents: 147
diff changeset
   700
     One such system here had a symbolic link from /phys/ibm/CVS... to /file/CVS,
dd40327e00b7 commentary
Claus Gittinger <cg@exept.de>
parents: 147
diff changeset
   701
     and extracted sources had /phys/ibm/CVS in their header.
dd40327e00b7 commentary
Claus Gittinger <cg@exept.de>
parents: 147
diff changeset
   702
     Do not depend on the code below to work correctly all the time."
dd40327e00b7 commentary
Claus Gittinger <cg@exept.de>
parents: 147
diff changeset
   703
501
c3ccbea7930c removed unused vars
Claus Gittinger <cg@exept.de>
parents: 493
diff changeset
   704
    |top lastTop idx|
96
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   705
1346
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   706
    containerPath isNil ifTrue:[^ nil].
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   707
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   708
    packageID notNil ifTrue:[
1348
4b2b7b73098e path extraction
Claus Gittinger <cg@exept.de>
parents: 1346
diff changeset
   709
        idx := containerPath lastIndexOfSubCollection:(packageID copyReplaceAll:$: with:$/).
1346
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   710
        idx ~~ 0 ifTrue:[
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   711
            ^ containerPath copyFrom:idx.
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   712
        ].
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   713
    ].
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   714
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   715
    "/
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   716
    "/ the following is heuristics, in case that the packageID is not known
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   717
    "/ (should not be required)
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   718
    "/
1499
9f17ad89deb7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1498
diff changeset
   719
    top := self repositoryTopDirectoryFromCVSRoot.
1346
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   720
    top notNil ifTrue:[
148
dd40327e00b7 commentary
Claus Gittinger <cg@exept.de>
parents: 147
diff changeset
   721
1346
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   722
        (containerPath startsWith:(top , '/')) ifTrue:[
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   723
            ^ containerPath copyFrom:(top size + 2).
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   724
        ].
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   725
        (containerPath startsWith:(top)) ifTrue:[
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   726
            ^ containerPath copyFrom:(top size + 1).
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   727
        ].
148
dd40327e00b7 commentary
Claus Gittinger <cg@exept.de>
parents: 147
diff changeset
   728
1346
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   729
        "/ hardcase - the repository-filename in the versionInfo
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   730
        "/ does not match my repository top.
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   731
        "/ check for mangled prefix (happens with symbolic links)
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   732
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   733
        lastTop := '/' , top asFilename baseName, '/'.
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   734
        idx := containerPath indexOfSubCollection:lastTop.
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   735
        idx ~~ 0 ifTrue:[
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   736
            ('SourceCodeManager [warning]: warning: repository path mismatch: ' , (containerPath copyTo:idx-1) , lastTop , ' vs. ' , top , '/') infoPrintCR.
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   737
            'SourceCodeManager [info]: warning: assuming that mismatch is ok.' infoPrintCR.
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   738
            ^ containerPath copyFrom:(idx + lastTop size).
148
dd40327e00b7 commentary
Claus Gittinger <cg@exept.de>
parents: 147
diff changeset
   739
        ]
96
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   740
    ].
1346
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   741
501
c3ccbea7930c removed unused vars
Claus Gittinger <cg@exept.de>
parents: 493
diff changeset
   742
    ^ nil
96
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   743
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   744
    "
1346
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   745
     SourceCodeManager pathInRepositoryFrom:'/files/CVS/stx/libbasic/Array.st'    forPackage:Array package 
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   746
     SourceCodeManager pathInRepositoryFrom:'/phys/ibm/CVS/stx/libbasic/Array.st' forPackage:Array package 
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   747
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   748
     SourceCodeManager pathInRepositoryFrom:'/files/CVS/stx/libbasic/Array.st'    forPackage:nil          
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   749
     SourceCodeManager pathInRepositoryFrom:'/phys/ibm/CVS/stx/libbasic/Array.st' forPackage:nil 
96
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   750
    "
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   751
1498
67b278e62f29 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1480
diff changeset
   752
    "Created: / 25-11-1995 / 18:42:20 / cg"
67b278e62f29 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1480
diff changeset
   753
    "Modified: / 21-06-2006 / 12:06:14 / cg"
96
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   754
!
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   755
1091
577e196eb240 condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents: 1077
diff changeset
   756
postCheckInClass:aClass
871
93f994512ade checkin from browser
ps
parents: 870
diff changeset
   757
    "invoked after a checkIn"
870
057c11f9cfe1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 868
diff changeset
   758
928
3fd94a72c76d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 926
diff changeset
   759
    |p|
3fd94a72c76d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 926
diff changeset
   760
3fd94a72c76d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 926
diff changeset
   761
    (p := Project current) notNil ifTrue:[
3fd94a72c76d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 926
diff changeset
   762
        p condenseChangesForClassCheckin:aClass.
3fd94a72c76d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 926
diff changeset
   763
    ]
1091
577e196eb240 condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents: 1077
diff changeset
   764
577e196eb240 condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents: 1077
diff changeset
   765
    "Created: / 5.11.2001 / 14:23:00 / cg"
577e196eb240 condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents: 1077
diff changeset
   766
!
577e196eb240 condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents: 1077
diff changeset
   767
577e196eb240 condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents: 1077
diff changeset
   768
postCheckInExtensionsForPackage:aPackageId
577e196eb240 condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents: 1077
diff changeset
   769
    "invoked after a checkIn"
577e196eb240 condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents: 1077
diff changeset
   770
577e196eb240 condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents: 1077
diff changeset
   771
    |p|
577e196eb240 condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents: 1077
diff changeset
   772
577e196eb240 condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents: 1077
diff changeset
   773
    (p := Project current) notNil ifTrue:[
577e196eb240 condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents: 1077
diff changeset
   774
        p condenseChangesForExtensionsCheckInInPackage:aPackageId.
577e196eb240 condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents: 1077
diff changeset
   775
    ]
577e196eb240 condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents: 1077
diff changeset
   776
577e196eb240 condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents: 1077
diff changeset
   777
    "Created: / 5.11.2001 / 14:23:31 / cg"
577e196eb240 condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents: 1077
diff changeset
   778
    "Modified: / 5.11.2001 / 17:07:38 / cg"
870
057c11f9cfe1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 868
diff changeset
   779
!
057c11f9cfe1 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 868
diff changeset
   780
880
d438ae8d9797 checkin from browser
ps
parents: 871
diff changeset
   781
postFileIn:aClass
d438ae8d9797 checkin from browser
ps
parents: 871
diff changeset
   782
    "invoked after a fileIn"
d438ae8d9797 checkin from browser
ps
parents: 871
diff changeset
   783
928
3fd94a72c76d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 926
diff changeset
   784
    |p|
3fd94a72c76d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 926
diff changeset
   785
3fd94a72c76d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 926
diff changeset
   786
    (p := Project current) notNil ifTrue:[
3fd94a72c76d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 926
diff changeset
   787
        p condenseChangesForClassFilein:aClass.
3fd94a72c76d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 926
diff changeset
   788
    ]
880
d438ae8d9797 checkin from browser
ps
parents: 871
diff changeset
   789
!
d438ae8d9797 checkin from browser
ps
parents: 871
diff changeset
   790
96
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   791
repositoryTopDirectory
472
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
   792
    "return the name of the repository"
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
   793
96
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   794
    ^ nil
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   795
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   796
    "Created: 25.11.1995 / 18:38:59 / cg"
472
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
   797
    "Modified: 12.9.1996 / 02:32:40 / cg"
96
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   798
!
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   799
87
e0f5b58481a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 83
diff changeset
   800
revisionAfter:aRevisionString
472
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
   801
    "generate the next revision number after the given number"
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
   802
501
c3ccbea7930c removed unused vars
Claus Gittinger <cg@exept.de>
parents: 493
diff changeset
   803
    |idx|
87
e0f5b58481a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 83
diff changeset
   804
e0f5b58481a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 83
diff changeset
   805
    idx := aRevisionString lastIndexOf:$..
e0f5b58481a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 83
diff changeset
   806
    idx == 0 ifTrue:[
472
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
   807
        ^ ((Integer readFrom:aRevisionString) + 1) printString
87
e0f5b58481a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 83
diff changeset
   808
    ].
e0f5b58481a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 83
diff changeset
   809
e0f5b58481a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 83
diff changeset
   810
    ^ (aRevisionString copyTo:idx) , ((Integer readFrom:(aRevisionString copyFrom:(idx+1)))+1) printString
e0f5b58481a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 83
diff changeset
   811
e0f5b58481a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 83
diff changeset
   812
    "
e0f5b58481a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 83
diff changeset
   813
     SourceCodeManager revisionAfter:'1.2.3.4' 
e0f5b58481a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 83
diff changeset
   814
     SourceCodeManager revisionAfter:'123'  
e0f5b58481a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 83
diff changeset
   815
     SourceCodeManager revisionAfter:'1.24'  
e0f5b58481a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 83
diff changeset
   816
    "
e0f5b58481a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 83
diff changeset
   817
e0f5b58481a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 83
diff changeset
   818
    "Created: 20.11.1995 / 12:54:05 / cg"
472
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
   819
    "Modified: 12.9.1996 / 02:33:03 / cg"
87
e0f5b58481a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 83
diff changeset
   820
!
e0f5b58481a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 83
diff changeset
   821
71
a8c7364b9bb6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 70
diff changeset
   822
sourceCacheDirectory
472
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
   823
    "return the sourceCache directories name"
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
   824
71
a8c7364b9bb6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 70
diff changeset
   825
    |dir nm|
a8c7364b9bb6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 70
diff changeset
   826
a8c7364b9bb6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 70
diff changeset
   827
    (nm := self cacheDirectoryName) isNil ifTrue:[^ nil].
69
874833ad880c revision log stub method
Claus Gittinger <cg@exept.de>
parents: 68
diff changeset
   828
71
a8c7364b9bb6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 70
diff changeset
   829
    (dir := nm asFilename) exists ifFalse:[
1467
26f9edcb3542 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1463
diff changeset
   830
        OperatingSystem errorSignal catch:[
1060
bf0279994422 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1038
diff changeset
   831
            dir makeDirectory.
bf0279994422 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1038
diff changeset
   832
        ].
173
d73d61190510 make sourceCache rwx-able for all
Claus Gittinger <cg@exept.de>
parents: 160
diff changeset
   833
        dir exists ifFalse:[
535
9e77c32bba75 new infoMessage scheme
Claus Gittinger <cg@exept.de>
parents: 534
diff changeset
   834
            'SourceCodeManager [warning]: could not create cache dir ''' , CacheDirectoryName , '''' infoPrintCR.
173
d73d61190510 make sourceCache rwx-able for all
Claus Gittinger <cg@exept.de>
parents: 160
diff changeset
   835
            ^ nil
d73d61190510 make sourceCache rwx-able for all
Claus Gittinger <cg@exept.de>
parents: 160
diff changeset
   836
        ].
d73d61190510 make sourceCache rwx-able for all
Claus Gittinger <cg@exept.de>
parents: 160
diff changeset
   837
        "/
d73d61190510 make sourceCache rwx-able for all
Claus Gittinger <cg@exept.de>
parents: 160
diff changeset
   838
        "/ make it read/writable for everyone
d73d61190510 make sourceCache rwx-able for all
Claus Gittinger <cg@exept.de>
parents: 160
diff changeset
   839
        "/
d73d61190510 make sourceCache rwx-able for all
Claus Gittinger <cg@exept.de>
parents: 160
diff changeset
   840
        dir makeReadableForAll.
d73d61190510 make sourceCache rwx-able for all
Claus Gittinger <cg@exept.de>
parents: 160
diff changeset
   841
        dir makeWritableForAll.
d73d61190510 make sourceCache rwx-able for all
Claus Gittinger <cg@exept.de>
parents: 160
diff changeset
   842
        dir makeExecutableForAll.
71
a8c7364b9bb6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 70
diff changeset
   843
    ].
a8c7364b9bb6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 70
diff changeset
   844
    ^ dir
173
d73d61190510 make sourceCache rwx-able for all
Claus Gittinger <cg@exept.de>
parents: 160
diff changeset
   845
535
9e77c32bba75 new infoMessage scheme
Claus Gittinger <cg@exept.de>
parents: 534
diff changeset
   846
    "Modified: 10.1.1997 / 15:13:20 / cg"
71
a8c7364b9bb6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 70
diff changeset
   847
!
69
874833ad880c revision log stub method
Claus Gittinger <cg@exept.de>
parents: 68
diff changeset
   848
96
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   849
sourceInfoOfClass:aClass
751
c39b6f348d06 comment
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
   850
    "helper: return a classes sourceCodeInfo by extracting its
c39b6f348d06 comment
Claus Gittinger <cg@exept.de>
parents: 745
diff changeset
   851
     versionString components."
96
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   852
752
5698ea124129 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   853
    |cls packageInfo revInfo actualSourceFileName classFileNameBase
501
c3ccbea7930c removed unused vars
Claus Gittinger <cg@exept.de>
parents: 493
diff changeset
   854
     newInfo container expectedFileName
752
5698ea124129 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   855
     directoryFromVersion moduleFromVersion fileNameFromVersion 
5698ea124129 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   856
     directoryFromPackage moduleFromPackage|
96
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   857
1091
577e196eb240 condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents: 1077
diff changeset
   858
    cls := aClass theNonMetaclass.
96
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   859
179
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   860
    newInfo := IdentityDictionary new.
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   861
96
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   862
    "/
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   863
    "/ the info given by the classes source ...
752
5698ea124129 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   864
    "/ (i.e. its revisionString)
96
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   865
    "/
1223
8ff1171ac4cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1220
diff changeset
   866
    revInfo := cls revisionInfo.
179
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   867
    revInfo notNil ifTrue:[
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   868
        revInfo keysAndValuesDo:[:key :value |
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   869
            newInfo at:key put:value
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   870
        ]
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   871
    ].
96
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   872
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   873
    "/
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   874
    "/ the info given by the classes binary ...
752
5698ea124129 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   875
    "/ (i.e. its package-ID)
96
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   876
    "/ if present, we better trust that one.
752
5698ea124129 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   877
    "/ however, it only contains partial information (module:directory:libName).
179
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   878
    "/ (but is available even without a source)
96
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   879
    "/
752
5698ea124129 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   880
    packageInfo := cls packageSourceCodeInfo.
5698ea124129 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   881
    packageInfo notNil ifTrue:[
5698ea124129 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   882
        packageInfo keysAndValuesDo:[:key :value |
179
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   883
            newInfo at:key put:value
160
dacfc2454cc8 prints replaced by infoPrint
Claus Gittinger <cg@exept.de>
parents: 158
diff changeset
   884
        ]
96
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   885
    ].
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   886
179
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   887
    "/
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   888
    "/ no information
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   889
    "/
752
5698ea124129 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   890
    (packageInfo isNil and:[revInfo isNil]) ifTrue:[
1223
8ff1171ac4cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1220
diff changeset
   891
        ('SourceCodeManager [warning]: class `' , cls name , ''' has neither source nor compiled-in info') infoPrintCR.
179
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   892
        ^ nil
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   893
    ].
96
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   894
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   895
    "/
179
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   896
    "/ validate for conflicts
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   897
    "/ trust binary if in doubt
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   898
    "/ (in case some cheater edited the version string)
752
5698ea124129 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   899
    "/
179
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   900
    revInfo notNil ifTrue:[
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   901
        (revInfo includesKey:#repositoryPathName) ifTrue:[
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   902
            container := revInfo at:#repositoryPathName ifAbsent:nil.
1346
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   903
            moduleFromVersion := self moduleFromContainerPath:container forClass:aClass.
1125
ace27d6ece7f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1112
diff changeset
   904
            moduleFromVersion notNil ifTrue:[
ace27d6ece7f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1112
diff changeset
   905
                newInfo at:#module put:moduleFromVersion.
ace27d6ece7f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1112
diff changeset
   906
            ].
1346
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
   907
            directoryFromVersion := self directoryFromContainerPath:container forClass:aClass.
752
5698ea124129 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   908
            directoryFromVersion notNil ifTrue:[
5698ea124129 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   909
                newInfo at:#directory put:directoryFromVersion.
704
9644a88308bf MSDOS changes
Claus Gittinger <cg@exept.de>
parents: 677
diff changeset
   910
            ].
752
5698ea124129 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   911
            fileNameFromVersion := container asFilename baseName.
5698ea124129 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   912
            (fileNameFromVersion endsWith:',v') ifTrue:[
5698ea124129 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   913
                fileNameFromVersion := fileNameFromVersion copyWithoutLast:2.
704
9644a88308bf MSDOS changes
Claus Gittinger <cg@exept.de>
parents: 677
diff changeset
   914
            ].
752
5698ea124129 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   915
            newInfo at:#fileName put:fileNameFromVersion.
179
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   916
752
5698ea124129 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   917
            packageInfo notNil ifTrue:[
5698ea124129 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   918
                (packageInfo includesKey:#directory) ifTrue:[
5698ea124129 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   919
                    directoryFromPackage := packageInfo at:#directory.
5698ea124129 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   920
                    moduleFromPackage := packageInfo at:#module.
96
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   921
752
5698ea124129 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   922
                    (directoryFromPackage ~= directoryFromVersion 
5698ea124129 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   923
                    or:[moduleFromPackage ~= moduleFromVersion]) ifTrue:[
5698ea124129 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   924
                        (directoryFromVersion isNil or:[moduleFromVersion isNil]) ifTrue:[
5698ea124129 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   925
                            directoryFromPackage ~= 'no package' ifTrue:[
1125
ace27d6ece7f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1112
diff changeset
   926
                                moduleFromVersion notNil ifTrue:[
ace27d6ece7f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1112
diff changeset
   927
                                    ('SourceCodeManager [warning]: conflicting source infos (binary: ' 
ace27d6ece7f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1112
diff changeset
   928
                                        , (moduleFromPackage ? 'nil')  , '/' , (directoryFromPackage  ? 'nil')
ace27d6ece7f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1112
diff changeset
   929
                                        , ' vs. source:'
ace27d6ece7f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1112
diff changeset
   930
                                        , (moduleFromVersion ? 'nil') , '/' , (directoryFromVersion ? 'nil')
ace27d6ece7f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1112
diff changeset
   931
                                        , ')') infoPrintCR.
ace27d6ece7f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1112
diff changeset
   932
                                    ('SourceCodeManager [info]: using binary info: ' 
ace27d6ece7f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1112
diff changeset
   933
                                        , moduleFromPackage , '/' , directoryFromPackage
ace27d6ece7f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1112
diff changeset
   934
                                    ) infoPrintCR.
ace27d6ece7f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1112
diff changeset
   935
                                ].
752
5698ea124129 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   936
                                newInfo at:#directory put:directoryFromPackage.
5698ea124129 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   937
                                newInfo at:#module put:moduleFromPackage.
583
aeb05843bd69 suppress annoying warning message about binary vs. source info,
Claus Gittinger <cg@exept.de>
parents: 582
diff changeset
   938
                            ]
187
fdda79120bbb in sourceInfoOfClass: be prepared for binInfo present, but no sourceInfo
Claus Gittinger <cg@exept.de>
parents: 185
diff changeset
   939
                        ] ifFalse:[
752
5698ea124129 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   940
                            directoryFromPackage ~= 'no package' ifTrue:[
581
2f96268045cb avoid stupid warning message when autoloading
Claus Gittinger <cg@exept.de>
parents: 558
diff changeset
   941
                                ('SourceCodeManager [warning]: conflicting source infos (binary: ' 
752
5698ea124129 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   942
                                    , moduleFromPackage  , '/' , directoryFromPackage
581
2f96268045cb avoid stupid warning message when autoloading
Claus Gittinger <cg@exept.de>
parents: 558
diff changeset
   943
                                    , ' vs. source:'
752
5698ea124129 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 751
diff changeset
   944
                                    , moduleFromVersion  , '/' , directoryFromVersion
581
2f96268045cb avoid stupid warning message when autoloading
Claus Gittinger <cg@exept.de>
parents: 558
diff changeset
   945
                                    , ')') infoPrintCR.
2f96268045cb avoid stupid warning message when autoloading
Claus Gittinger <cg@exept.de>
parents: 558
diff changeset
   946
                            ]
583
aeb05843bd69 suppress annoying warning message about binary vs. source info,
Claus Gittinger <cg@exept.de>
parents: 582
diff changeset
   947
                        ]
179
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   948
                    ]
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   949
                ]
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   950
            ].
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   951
        ]
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   952
    ].
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   953
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   954
    "/
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   955
    "/ the filename I'd expect from its name ...
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   956
    "/
1223
8ff1171ac4cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1220
diff changeset
   957
    classFileNameBase := Smalltalk fileNameForClass:cls owningClassOrYourself.
179
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   958
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   959
    (newInfo includesKey:#fileName) ifFalse:[
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   960
        newInfo at:#fileName put:(classFileNameBase , '.st')
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   961
    ].
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   962
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   963
    "/ guess on the container
1461
15d4f10867df *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 1454
diff changeset
   964
    ((newInfo includesKey:#directory) and:[newInfo includesKey:#module]) ifTrue:[
15d4f10867df *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 1454
diff changeset
   965
        |pathInRepository|
15d4f10867df *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 1454
diff changeset
   966
15d4f10867df *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 1454
diff changeset
   967
        container isNil ifTrue:[
15d4f10867df *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 1454
diff changeset
   968
            container := (newInfo at:#module)
15d4f10867df *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 1454
diff changeset
   969
                         , '/'
15d4f10867df *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 1454
diff changeset
   970
                         , (newInfo at:#directory)
15d4f10867df *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 1454
diff changeset
   971
                         , '/'
15d4f10867df *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 1454
diff changeset
   972
                         , classFileNameBase , '.st,v'.
15d4f10867df *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 1454
diff changeset
   973
        ].
15d4f10867df *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 1454
diff changeset
   974
        pathInRepository := (newInfo at:#module)
15d4f10867df *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 1454
diff changeset
   975
                     , '/'
15d4f10867df *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 1454
diff changeset
   976
                     , (newInfo at:#directory)
15d4f10867df *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 1454
diff changeset
   977
                     , '/'
15d4f10867df *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 1454
diff changeset
   978
                     , classFileNameBase , '.st'.
15d4f10867df *** empty log message ***
Stefan Vogel <sv@exept.de>
parents: 1454
diff changeset
   979
        newInfo at:#pathInRepository put:pathInRepository.
179
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   980
    ].
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   981
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   982
    container notNil ifTrue:[
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   983
        newInfo at:#repositoryPathName put:container.
96
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   984
    ].
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   985
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   986
    "/ check ..
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
   987
    revInfo notNil ifTrue:[
160
dacfc2454cc8 prints replaced by infoPrint
Claus Gittinger <cg@exept.de>
parents: 158
diff changeset
   988
        actualSourceFileName := revInfo at:#fileName ifAbsent:nil.
dacfc2454cc8 prints replaced by infoPrint
Claus Gittinger <cg@exept.de>
parents: 158
diff changeset
   989
        actualSourceFileName notNil ifTrue:[
179
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   990
            expectedFileName := classFileNameBase , '.st'.
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   991
            actualSourceFileName ~= expectedFileName ifTrue:[
1223
8ff1171ac4cb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1220
diff changeset
   992
                ('SourceCodeManager [warning]: source of class ' , cls name , ' in ' , actualSourceFileName , ';') infoPrintCR.
535
9e77c32bba75 new infoMessage scheme
Claus Gittinger <cg@exept.de>
parents: 534
diff changeset
   993
                ('SourceCodeManager [info]: (expected: ' , expectedFileName , '); renamed or missing abbreviation ?') infoPrintCR.
9e77c32bba75 new infoMessage scheme
Claus Gittinger <cg@exept.de>
parents: 534
diff changeset
   994
                ('SourceCodeManager [info]: This may fail to autoload later if left unchanged.') infoPrintCR.
179
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   995
                newInfo at:#expectedFileName put:expectedFileName.
160
dacfc2454cc8 prints replaced by infoPrint
Claus Gittinger <cg@exept.de>
parents: 158
diff changeset
   996
                newInfo at:#renamed put:true.
179
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
   997
                classFileNameBase := actualSourceFileName copyWithoutLast:3
160
dacfc2454cc8 prints replaced by infoPrint
Claus Gittinger <cg@exept.de>
parents: 158
diff changeset
   998
            ]
dacfc2454cc8 prints replaced by infoPrint
Claus Gittinger <cg@exept.de>
parents: 158
diff changeset
   999
        ]
96
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
  1000
    ].
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
  1001
179
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1002
    newInfo at:#classFileNameBase put:classFileNameBase.
96
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
  1003
    ^ newInfo
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
  1004
704
9644a88308bf MSDOS changes
Claus Gittinger <cg@exept.de>
parents: 677
diff changeset
  1005
    "
9644a88308bf MSDOS changes
Claus Gittinger <cg@exept.de>
parents: 677
diff changeset
  1006
     self sourceInfoOfClass:Array
9644a88308bf MSDOS changes
Claus Gittinger <cg@exept.de>
parents: 677
diff changeset
  1007
    "
9644a88308bf MSDOS changes
Claus Gittinger <cg@exept.de>
parents: 677
diff changeset
  1008
1091
577e196eb240 condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents: 1077
diff changeset
  1009
    "Modified: / 5.11.2001 / 16:52:24 / cg"
95
aeda58a2343c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 93
diff changeset
  1010
! !
aeda58a2343c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 93
diff changeset
  1011
513
10707a1c366f use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 507
diff changeset
  1012
!AbstractSourceCodeManager class methodsFor:'source code access'!
95
aeda58a2343c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 93
diff changeset
  1013
127
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1014
checkinClass:aClass fileName:classFileName directory:packageDir module:moduleDir logMessage:logMessage
95
aeda58a2343c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 93
diff changeset
  1015
    "checkin of a class into the source repository.
aeda58a2343c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 93
diff changeset
  1016
     Return true if ok, false if not."
aeda58a2343c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 93
diff changeset
  1017
460
06d089e12054 added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents: 433
diff changeset
  1018
    ^ self
06d089e12054 added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents: 433
diff changeset
  1019
        checkinClass:aClass 
06d089e12054 added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents: 433
diff changeset
  1020
        fileName:classFileName 
06d089e12054 added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents: 433
diff changeset
  1021
        directory:packageDir 
06d089e12054 added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents: 433
diff changeset
  1022
        module:moduleDir 
06d089e12054 added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents: 433
diff changeset
  1023
        logMessage:logMessage
06d089e12054 added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents: 433
diff changeset
  1024
        force:false
06d089e12054 added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents: 433
diff changeset
  1025
06d089e12054 added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents: 433
diff changeset
  1026
    "Modified: 11.9.1996 / 16:15:43 / cg"
06d089e12054 added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents: 433
diff changeset
  1027
!
06d089e12054 added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents: 433
diff changeset
  1028
06d089e12054 added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents: 433
diff changeset
  1029
checkinClass:aClass fileName:classFileName directory:packageDir module:moduleDir logMessage:logMessage force:force
06d089e12054 added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents: 433
diff changeset
  1030
    "checkin of a class into the source repository.
06d089e12054 added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents: 433
diff changeset
  1031
     Return true if ok, false if not."
06d089e12054 added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents: 433
diff changeset
  1032
1159
e5b888912508 fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents: 1141
diff changeset
  1033
    |tempDir tempFile ok packageMode filter className answer allLabel allValue|
e5b888912508 fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents: 1141
diff changeset
  1034
e5b888912508 fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents: 1141
diff changeset
  1035
    className := aClass name.
e5b888912508 fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents: 1141
diff changeset
  1036
    aClass revision isNil ifTrue:[ 
e5b888912508 fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents: 1141
diff changeset
  1037
        force ifFalse:[
e5b888912508 fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents: 1141
diff changeset
  1038
            ('CVSSourceCodeManager [warning]: class ' , className, ' has no revision string') errorPrintCR.
e5b888912508 fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents: 1141
diff changeset
  1039
e5b888912508 fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents: 1141
diff changeset
  1040
            AbortAllSignal isHandled ifTrue:[
e5b888912508 fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents: 1141
diff changeset
  1041
                allLabel := #('Cancel All').
e5b888912508 fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents: 1141
diff changeset
  1042
                allValue := #(cancelAll).
e5b888912508 fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents: 1141
diff changeset
  1043
            ] ifFalse:[
e5b888912508 fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents: 1141
diff changeset
  1044
                allLabel := #().
e5b888912508 fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents: 1141
diff changeset
  1045
                allValue := #().
e5b888912508 fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents: 1141
diff changeset
  1046
            ].
e5b888912508 fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents: 1141
diff changeset
  1047
e5b888912508 fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents: 1141
diff changeset
  1048
            (aClass theMetaclass includesSelector:#version) ifTrue:[
e5b888912508 fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents: 1141
diff changeset
  1049
                answer := OptionBox 
e5b888912508 fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents: 1141
diff changeset
  1050
                            request:('Class %1 has no (usable) revision string.\\Check in as newest ?' bindWith:className allBold) withCRs
e5b888912508 fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents: 1141
diff changeset
  1051
                            label:'Confirm'
e5b888912508 fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents: 1141
diff changeset
  1052
                            buttonLabels:(allLabel , #('Cancel' 'CheckIn')) 
e5b888912508 fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents: 1141
diff changeset
  1053
                            values:(allValue , #(false #checkIn))
e5b888912508 fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents: 1141
diff changeset
  1054
                            default:#checkIn.
e5b888912508 fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents: 1141
diff changeset
  1055
            ] ifFalse:[
e5b888912508 fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents: 1141
diff changeset
  1056
                answer := OptionBox 
e5b888912508 fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents: 1141
diff changeset
  1057
                            request:('Class %1 has no revision string.\\Check in as newest ?' bindWith:className allBold) withCRs
e5b888912508 fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents: 1141
diff changeset
  1058
                            label:'Confirm'
e5b888912508 fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents: 1141
diff changeset
  1059
                            buttonLabels:(allLabel , #('Cancel' 'CheckIn' 'Create & CheckIn')) 
e5b888912508 fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents: 1141
diff changeset
  1060
                            values:(allValue , #(false #checkIn #create))
e5b888912508 fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents: 1141
diff changeset
  1061
                            default:#create.
e5b888912508 fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents: 1141
diff changeset
  1062
            ].
e5b888912508 fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents: 1141
diff changeset
  1063
            answer == false ifTrue:[ AbortSignal raise. ^ false ].
e5b888912508 fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents: 1141
diff changeset
  1064
            answer == #cancelAll ifTrue:[ AbortAllSignal raise. ^ false ].
e5b888912508 fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents: 1141
diff changeset
  1065
            answer == #create ifTrue:[ 
e5b888912508 fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents: 1141
diff changeset
  1066
                aClass theNonMetaclass updateVersionMethodFor:'$' , 'Header' , '$'.  "/ concatenated to avoid RCS expansion
e5b888912508 fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents: 1141
diff changeset
  1067
            ].
e5b888912508 fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents: 1141
diff changeset
  1068
        ]
e5b888912508 fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents: 1141
diff changeset
  1069
    ].
e5b888912508 fixed creation of version method (was done too late)
Claus Gittinger <cg@exept.de>
parents: 1141
diff changeset
  1070
830
c788d0c93635 allow for base-package only checkin
Claus Gittinger <cg@exept.de>
parents: 816
diff changeset
  1071
    packageMode := self checkMethodPackagesOf:aClass.
c788d0c93635 allow for base-package only checkin
Claus Gittinger <cg@exept.de>
parents: 816
diff changeset
  1072
    packageMode == #base ifTrue:[
c788d0c93635 allow for base-package only checkin
Claus Gittinger <cg@exept.de>
parents: 816
diff changeset
  1073
        filter := [:mthd | mthd package = aClass package].
c788d0c93635 allow for base-package only checkin
Claus Gittinger <cg@exept.de>
parents: 816
diff changeset
  1074
    ].
71
a8c7364b9bb6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 70
diff changeset
  1075
619
16b4d6ffaa0e Fix checkinClass:fileName:directory:module... (makeDirectory returns
Stefan Vogel <sv@exept.de>
parents: 616
diff changeset
  1076
    tempDir := (Filename newTemporaryIn:nil) makeDirectory; yourself.
813
a7daf8306001 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 796
diff changeset
  1077
    ok := false.
71
a8c7364b9bb6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 70
diff changeset
  1078
    [
114
bb18f2290ec6 dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
  1079
        |aStream|
75
ea3dcbdb0401 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 73
diff changeset
  1080
127
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1081
        tempFile := tempDir construct:classFileName.
1213
7dae237b6ee8 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 1206
diff changeset
  1082
        [
7dae237b6ee8 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 1206
diff changeset
  1083
            aStream := tempFile writeStream.
7dae237b6ee8 Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 1206
diff changeset
  1084
        ] on:FileStream openErrorSignal do:[:ex|
375
476a8a705f0d show reason why fileOut failed (on stderr)
Claus Gittinger <cg@exept.de>
parents: 266
diff changeset
  1085
            'SOURCEMGR: temporary fileout failed' errorPrintCR.
114
bb18f2290ec6 dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
  1086
            ^ false
bb18f2290ec6 dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
  1087
        ].
71
a8c7364b9bb6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 70
diff changeset
  1088
184
e682441f91cb flush methods fileCache before filingOut
Claus Gittinger <cg@exept.de>
parents: 183
diff changeset
  1089
        Method flushSourceStreamCache.
114
bb18f2290ec6 dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
  1090
        Class fileOutErrorSignal handle:[:ex |
375
476a8a705f0d show reason why fileOut failed (on stderr)
Claus Gittinger <cg@exept.de>
parents: 266
diff changeset
  1091
            'SOURCEMGR: fileout failed.' errorPrintCR.
1246
6c4753421362 #errorSignal -> #description
Stefan Vogel <sv@exept.de>
parents: 1223
diff changeset
  1092
            'SOURCEMGR: reason: ' errorPrint. ex description printCR.
375
476a8a705f0d show reason why fileOut failed (on stderr)
Claus Gittinger <cg@exept.de>
parents: 266
diff changeset
  1093
114
bb18f2290ec6 dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
  1094
            aStream close.
bb18f2290ec6 dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
  1095
            ^ false
bb18f2290ec6 dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
  1096
        ] do:[
830
c788d0c93635 allow for base-package only checkin
Claus Gittinger <cg@exept.de>
parents: 816
diff changeset
  1097
            aClass 
c788d0c93635 allow for base-package only checkin
Claus Gittinger <cg@exept.de>
parents: 816
diff changeset
  1098
                fileOutOn:aStream 
c788d0c93635 allow for base-package only checkin
Claus Gittinger <cg@exept.de>
parents: 816
diff changeset
  1099
                withTimeStamp:false 
c788d0c93635 allow for base-package only checkin
Claus Gittinger <cg@exept.de>
parents: 816
diff changeset
  1100
                withInitialize:true 
c788d0c93635 allow for base-package only checkin
Claus Gittinger <cg@exept.de>
parents: 816
diff changeset
  1101
                withDefinition:true
c788d0c93635 allow for base-package only checkin
Claus Gittinger <cg@exept.de>
parents: 816
diff changeset
  1102
                methodFilter:filter
114
bb18f2290ec6 dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
  1103
        ].
bb18f2290ec6 dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
  1104
        aStream close.
71
a8c7364b9bb6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 70
diff changeset
  1105
127
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1106
        tempFile exists ifFalse:[
375
476a8a705f0d show reason why fileOut failed (on stderr)
Claus Gittinger <cg@exept.de>
parents: 266
diff changeset
  1107
            'SOURCEMGR: temporary fileout failed' errorPrintCR.
813
a7daf8306001 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 796
diff changeset
  1108
        ] ifTrue:[
a7daf8306001 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 796
diff changeset
  1109
            ok := self 
a7daf8306001 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 796
diff changeset
  1110
                checkinClass:aClass
a7daf8306001 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 796
diff changeset
  1111
                fileName:classFileName 
a7daf8306001 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 796
diff changeset
  1112
                directory:packageDir 
a7daf8306001 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 796
diff changeset
  1113
                module:moduleDir
a7daf8306001 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 796
diff changeset
  1114
                source:(tempFile name)
a7daf8306001 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 796
diff changeset
  1115
                logMessage:logMessage
a7daf8306001 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 796
diff changeset
  1116
                force:force.
a7daf8306001 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 796
diff changeset
  1117
        ]
1141
9f0bd4f3d482 #valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents: 1125
diff changeset
  1118
    ] ensure:[
114
bb18f2290ec6 dont write a changeLog if nothing changed (i.e. no checkin was done)
Claus Gittinger <cg@exept.de>
parents: 112
diff changeset
  1119
        tempDir recursiveRemove
71
a8c7364b9bb6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 70
diff changeset
  1120
    ].
813
a7daf8306001 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 796
diff changeset
  1121
    ^ ok
71
a8c7364b9bb6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 70
diff changeset
  1122
a8c7364b9bb6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 70
diff changeset
  1123
    "
a8c7364b9bb6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 70
diff changeset
  1124
     SourceCodeManager checkinClass:Array
a8c7364b9bb6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 70
diff changeset
  1125
    "
a8c7364b9bb6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 70
diff changeset
  1126
375
476a8a705f0d show reason why fileOut failed (on stderr)
Claus Gittinger <cg@exept.de>
parents: 266
diff changeset
  1127
    "Modified: 12.7.1996 / 23:38:36 / cg"
460
06d089e12054 added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents: 433
diff changeset
  1128
    "Created: 11.9.1996 / 16:15:17 / cg"
619
16b4d6ffaa0e Fix checkinClass:fileName:directory:module... (makeDirectory returns
Stefan Vogel <sv@exept.de>
parents: 616
diff changeset
  1129
    "Modified: 25.9.1997 / 12:16:00 / stefan"
127
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1130
!
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1131
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1132
checkinClass:aClass logMessage:logMessage
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1133
    "checkin of a class into the source repository.
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1134
     Return true if ok, false if not."
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1135
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1136
    |sourceInfo packageDir moduleDir classFileName|
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1137
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1138
    sourceInfo := self sourceInfoOfClass:aClass.
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1139
    sourceInfo isNil ifTrue:[
537
240d5b2ab16c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 535
diff changeset
  1140
        ('SourceCodeManager [warning]: no sourceInfo for class: ' , aClass name) errorPrintCR.
127
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1141
        ^ false
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1142
    ].
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1143
179
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1144
    packageDir := self packageFromSourceInfo:sourceInfo.
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1145
    moduleDir := self moduleFromSourceInfo:sourceInfo.  "/ use the modules name as CVS module
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1146
    classFileName := self containerFromSourceInfo:sourceInfo.
127
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1147
460
06d089e12054 added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents: 433
diff changeset
  1148
    ^ self 
06d089e12054 added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents: 433
diff changeset
  1149
        checkinClass:aClass 
06d089e12054 added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents: 433
diff changeset
  1150
        fileName:classFileName 
06d089e12054 added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents: 433
diff changeset
  1151
        directory:packageDir 
06d089e12054 added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents: 433
diff changeset
  1152
        module:moduleDir 
06d089e12054 added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents: 433
diff changeset
  1153
        logMessage:logMessage
127
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1154
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1155
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1156
    "
460
06d089e12054 added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents: 433
diff changeset
  1157
     SourceCodeManager checkinClass:Array logMessage:'foo'
127
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1158
    "
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1159
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1160
    "Created: 6.11.1995 / 18:56:00 / cg"
537
240d5b2ab16c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 535
diff changeset
  1161
    "Modified: 10.1.1997 / 17:26:48 / cg"
71
a8c7364b9bb6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 70
diff changeset
  1162
!
a8c7364b9bb6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 70
diff changeset
  1163
493
ec81df138d8f had to rename sourceStreamFor: to #getSourceStreamFor:
Claus Gittinger <cg@exept.de>
parents: 482
diff changeset
  1164
getMostRecentSourceStreamForClassNamed:aClassName
472
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
  1165
    "given a class, return an open stream to its most recent source
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
  1166
     (not knowing anything about its version).
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
  1167
     Used when autoloading classes."
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
  1168
745
a17a530bb089 fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents: 744
diff changeset
  1169
    ^ self
a17a530bb089 fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents: 744
diff changeset
  1170
        getMostRecentSourceStreamForClassNamed:aClassName 
a17a530bb089 fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents: 744
diff changeset
  1171
        inPackage:nil
a17a530bb089 fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents: 744
diff changeset
  1172
!
a17a530bb089 fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents: 744
diff changeset
  1173
a17a530bb089 fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents: 744
diff changeset
  1174
getMostRecentSourceStreamForClassNamed:aClassName inPackage:forcedPackage
a17a530bb089 fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents: 744
diff changeset
  1175
    "given a class, return an open stream to its most recent source
a17a530bb089 fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents: 744
diff changeset
  1176
     (not knowing anything about its version).
a17a530bb089 fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents: 744
diff changeset
  1177
     Used when autoloading classes or to compare a classes source with the most
a17a530bb089 fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents: 744
diff changeset
  1178
     recent found in the repostitory.
a17a530bb089 fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents: 744
diff changeset
  1179
     The forcePackage argument passes the classes package information
a17a530bb089 fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents: 744
diff changeset
  1180
     and is only required when autoloading or when the class is not already
a17a530bb089 fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents: 744
diff changeset
  1181
     present (i.e. there is no way to extract the package info).
a17a530bb089 fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents: 744
diff changeset
  1182
     If nil, the package is extracted from the class - which must exist."
a17a530bb089 fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents: 744
diff changeset
  1183
1205
41ebb97c4ee6 Remove unused method vars
Stefan Vogel <sv@exept.de>
parents: 1202
diff changeset
  1184
    |cls sourceInfo classFileName packageDir moduleDir s components i|
71
a8c7364b9bb6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 70
diff changeset
  1185
133
888aa2dac89b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 127
diff changeset
  1186
    cls := Smalltalk classNamed:aClassName.
888aa2dac89b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 127
diff changeset
  1187
    cls notNil ifTrue:[
888aa2dac89b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 127
diff changeset
  1188
        sourceInfo := self sourceInfoOfClass:cls.
888aa2dac89b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 127
diff changeset
  1189
    ].
888aa2dac89b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 127
diff changeset
  1190
    sourceInfo notNil ifTrue:[
179
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1191
        packageDir := self packageFromSourceInfo:sourceInfo.
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1192
        moduleDir := self moduleFromSourceInfo:sourceInfo.  "/ use the modules name as CVS module
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1193
        classFileName := self containerFromSourceInfo:sourceInfo.
133
888aa2dac89b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 127
diff changeset
  1194
    ] ifFalse:[
179
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1195
        classFileName := (Smalltalk fileNameForClass:aClassName) , '.st'.
133
888aa2dac89b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 127
diff changeset
  1196
        packageDir := Smalltalk sourceDirectoryNameOfClass:aClassName.
769
35f1e380bd30 moduleDir extraction
Stefan Vogel <sv@exept.de>
parents: 759
diff changeset
  1197
        packageDir notNil ifTrue:[
35f1e380bd30 moduleDir extraction
Stefan Vogel <sv@exept.de>
parents: 759
diff changeset
  1198
            (packageDir startsWith:'stx/') ifTrue:[
35f1e380bd30 moduleDir extraction
Stefan Vogel <sv@exept.de>
parents: 759
diff changeset
  1199
                packageDir := packageDir copyFrom:5.
35f1e380bd30 moduleDir extraction
Stefan Vogel <sv@exept.de>
parents: 759
diff changeset
  1200
            ] ifFalse:[
35f1e380bd30 moduleDir extraction
Stefan Vogel <sv@exept.de>
parents: 759
diff changeset
  1201
                i := packageDir indexOf:$:.
35f1e380bd30 moduleDir extraction
Stefan Vogel <sv@exept.de>
parents: 759
diff changeset
  1202
                i ~~ 0 ifTrue:[
35f1e380bd30 moduleDir extraction
Stefan Vogel <sv@exept.de>
parents: 759
diff changeset
  1203
                    moduleDir := packageDir copyTo:i-1.
35f1e380bd30 moduleDir extraction
Stefan Vogel <sv@exept.de>
parents: 759
diff changeset
  1204
                    packageDir := packageDir copyFrom:i+1
35f1e380bd30 moduleDir extraction
Stefan Vogel <sv@exept.de>
parents: 759
diff changeset
  1205
                ]
35f1e380bd30 moduleDir extraction
Stefan Vogel <sv@exept.de>
parents: 759
diff changeset
  1206
            ]
744
eaf185681d85 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 721
diff changeset
  1207
        ].
769
35f1e380bd30 moduleDir extraction
Stefan Vogel <sv@exept.de>
parents: 759
diff changeset
  1208
        moduleDir isNil ifTrue:[
35f1e380bd30 moduleDir extraction
Stefan Vogel <sv@exept.de>
parents: 759
diff changeset
  1209
            moduleDir := 'stx'
35f1e380bd30 moduleDir extraction
Stefan Vogel <sv@exept.de>
parents: 759
diff changeset
  1210
        ].
133
888aa2dac89b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 127
diff changeset
  1211
    ].
888aa2dac89b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 127
diff changeset
  1212
888aa2dac89b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 127
diff changeset
  1213
    packageDir isNil ifTrue:[
745
a17a530bb089 fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents: 744
diff changeset
  1214
        forcedPackage isNil ifTrue:[
a17a530bb089 fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents: 744
diff changeset
  1215
            'SourceCodeManager [warning]: could not extract packageDir' errorPrintCR.
a17a530bb089 fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents: 744
diff changeset
  1216
            ^ nil
a17a530bb089 fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents: 744
diff changeset
  1217
        ].
a17a530bb089 fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents: 744
diff changeset
  1218
        packageDir := forcedPackage copyFrom:(forcedPackage indexOf:$/) + 1.
a17a530bb089 fixed fileIn of autoloaded class via CVS
Claus Gittinger <cg@exept.de>
parents: 744
diff changeset
  1219
        moduleDir := forcedPackage copyTo:(forcedPackage indexOf:$/) - 1.
133
888aa2dac89b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 127
diff changeset
  1220
    ].
71
a8c7364b9bb6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 70
diff changeset
  1221
557
8466accf9276 if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents: 550
diff changeset
  1222
    s := self 
133
888aa2dac89b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 127
diff changeset
  1223
        streamForClass:nil
888aa2dac89b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 127
diff changeset
  1224
        fileName:classFileName 
888aa2dac89b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 127
diff changeset
  1225
        revision:#newest 
888aa2dac89b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 127
diff changeset
  1226
        directory:packageDir 
888aa2dac89b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 127
diff changeset
  1227
        module:moduleDir
557
8466accf9276 if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents: 550
diff changeset
  1228
        cache:false.
8466accf9276 if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents: 550
diff changeset
  1229
8466accf9276 if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents: 550
diff changeset
  1230
    s isNil ifTrue:[
8466accf9276 if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents: 550
diff changeset
  1231
        "/ guessed moduleDir ?
8466accf9276 if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents: 550
diff changeset
  1232
        
8466accf9276 if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents: 550
diff changeset
  1233
        sourceInfo isNil ifTrue:[
1417
2707849f626a No need to use Filename>>#concreteClass
Stefan Vogel <sv@exept.de>
parents: 1392
diff changeset
  1234
            components := Filename components:packageDir.
557
8466accf9276 if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents: 550
diff changeset
  1235
            moduleDir := components first.
8466accf9276 if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents: 550
diff changeset
  1236
            packageDir := (Filename fromComponents:(components copyFrom:2)) asString.
8466accf9276 if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents: 550
diff changeset
  1237
            s := self 
8466accf9276 if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents: 550
diff changeset
  1238
                streamForClass:nil
8466accf9276 if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents: 550
diff changeset
  1239
                fileName:classFileName 
8466accf9276 if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents: 550
diff changeset
  1240
                revision:#newest 
8466accf9276 if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents: 550
diff changeset
  1241
                directory:packageDir 
8466accf9276 if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents: 550
diff changeset
  1242
                module:moduleDir
8466accf9276 if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents: 550
diff changeset
  1243
                cache:false.
8466accf9276 if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents: 550
diff changeset
  1244
        ]
8466accf9276 if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents: 550
diff changeset
  1245
    ].
8466accf9276 if checkout fails, split packageDirectory into
Claus Gittinger <cg@exept.de>
parents: 550
diff changeset
  1246
    ^ s.
71
a8c7364b9bb6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 70
diff changeset
  1247
493
ec81df138d8f had to rename sourceStreamFor: to #getSourceStreamFor:
Claus Gittinger <cg@exept.de>
parents: 482
diff changeset
  1248
    "Created: 12.10.1996 / 17:22:54 / cg"
611
b1fb7d133e17 filename changes
Claus Gittinger <cg@exept.de>
parents: 583
diff changeset
  1249
    "Modified: 8.9.1997 / 00:21:27 / cg"
71
a8c7364b9bb6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 70
diff changeset
  1250
!
a8c7364b9bb6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 70
diff changeset
  1251
493
ec81df138d8f had to rename sourceStreamFor: to #getSourceStreamFor:
Claus Gittinger <cg@exept.de>
parents: 482
diff changeset
  1252
getSourceStreamFor:aClass
58
9b919d0bfec9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 57
diff changeset
  1253
    "extract a classes source code and return an open readStream on it.
9b919d0bfec9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 57
diff changeset
  1254
     The classes source code is extracted using the revision and the sourceCodeInfo,
9b919d0bfec9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 57
diff changeset
  1255
     which itself is extracted from the classes packageString."
9b919d0bfec9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 57
diff changeset
  1256
493
ec81df138d8f had to rename sourceStreamFor: to #getSourceStreamFor:
Claus Gittinger <cg@exept.de>
parents: 482
diff changeset
  1257
    ^ self getSourceStreamFor:aClass revision:nil
ec81df138d8f had to rename sourceStreamFor: to #getSourceStreamFor:
Claus Gittinger <cg@exept.de>
parents: 482
diff changeset
  1258
ec81df138d8f had to rename sourceStreamFor: to #getSourceStreamFor:
Claus Gittinger <cg@exept.de>
parents: 482
diff changeset
  1259
    "Created: 12.10.1996 / 17:21:03 / cg"
ec81df138d8f had to rename sourceStreamFor: to #getSourceStreamFor:
Claus Gittinger <cg@exept.de>
parents: 482
diff changeset
  1260
    "Modified: 12.10.1996 / 17:22:02 / cg"
83
250202dc956e added sourceStreamFor:revision: - to access a specific (older) revision
Claus Gittinger <cg@exept.de>
parents: 77
diff changeset
  1261
!
250202dc956e added sourceStreamFor:revision: - to access a specific (older) revision
Claus Gittinger <cg@exept.de>
parents: 77
diff changeset
  1262
493
ec81df138d8f had to rename sourceStreamFor: to #getSourceStreamFor:
Claus Gittinger <cg@exept.de>
parents: 482
diff changeset
  1263
getSourceStreamFor:aClass revision:aRevisionStringOrNil
83
250202dc956e added sourceStreamFor:revision: - to access a specific (older) revision
Claus Gittinger <cg@exept.de>
parents: 77
diff changeset
  1264
    "extract a classes source code and return an open readStream on it.
250202dc956e added sourceStreamFor:revision: - to access a specific (older) revision
Claus Gittinger <cg@exept.de>
parents: 77
diff changeset
  1265
     A revision of nil selects the current (in image) revision.
250202dc956e added sourceStreamFor:revision: - to access a specific (older) revision
Claus Gittinger <cg@exept.de>
parents: 77
diff changeset
  1266
     The classes source code is extracted using the revision and the sourceCodeInfo,
250202dc956e added sourceStreamFor:revision: - to access a specific (older) revision
Claus Gittinger <cg@exept.de>
parents: 77
diff changeset
  1267
     which itself is extracted from the classes packageString."
250202dc956e added sourceStreamFor:revision: - to access a specific (older) revision
Claus Gittinger <cg@exept.de>
parents: 77
diff changeset
  1268
96
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
  1269
    |classFileName revision 
501
c3ccbea7930c removed unused vars
Claus Gittinger <cg@exept.de>
parents: 493
diff changeset
  1270
     packageDir moduleDir sourceInfo|
58
9b919d0bfec9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 57
diff changeset
  1271
943
0c58257cb139 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  1272
    aRevisionStringOrNil == #newest ifTrue:[
0c58257cb139 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  1273
        ^ self getMostRecentSourceStreamForClassNamed:(aClass theNonMetaclass name).
0c58257cb139 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  1274
    ].
0c58257cb139 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 935
diff changeset
  1275
83
250202dc956e added sourceStreamFor:revision: - to access a specific (older) revision
Claus Gittinger <cg@exept.de>
parents: 77
diff changeset
  1276
    aRevisionStringOrNil isNil ifTrue:[
179
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1277
        revision := aClass binaryRevision.
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1278
        revision isNil ifTrue:[ 
191
ebdb455a26ce take revision if no binaryRevision is available (in sourceStream for ...)
ca
parents: 187
diff changeset
  1279
            revision := aClass revision.
ebdb455a26ce take revision if no binaryRevision is available (in sourceStream for ...)
ca
parents: 187
diff changeset
  1280
            revision isNil ifTrue:[
535
9e77c32bba75 new infoMessage scheme
Claus Gittinger <cg@exept.de>
parents: 534
diff changeset
  1281
                ('SourceCodeManager [warning]: class `' , aClass name , ''' has no revision string') infoPrintCR.
191
ebdb455a26ce take revision if no binaryRevision is available (in sourceStream for ...)
ca
parents: 187
diff changeset
  1282
                ^ nil.
ebdb455a26ce take revision if no binaryRevision is available (in sourceStream for ...)
ca
parents: 187
diff changeset
  1283
            ].
535
9e77c32bba75 new infoMessage scheme
Claus Gittinger <cg@exept.de>
parents: 534
diff changeset
  1284
            ('SourceCodeManager [info]: trusting classes revision ...') infoPrintCR.
179
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1285
        ]
83
250202dc956e added sourceStreamFor:revision: - to access a specific (older) revision
Claus Gittinger <cg@exept.de>
parents: 77
diff changeset
  1286
    ] ifFalse:[
179
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1287
        revision := aRevisionStringOrNil
58
9b919d0bfec9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 57
diff changeset
  1288
    ].
9b919d0bfec9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 57
diff changeset
  1289
95
aeda58a2343c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 93
diff changeset
  1290
    sourceInfo := self sourceInfoOfClass:aClass.
1066
683643ad5544 better info message (contains ... methods in other packages ..)
Claus Gittinger <cg@exept.de>
parents: 1060
diff changeset
  1291
    sourceInfo isNil ifTrue:[
683643ad5544 better info message (contains ... methods in other packages ..)
Claus Gittinger <cg@exept.de>
parents: 1060
diff changeset
  1292
       ('SourceCodeManager [warning]: no sourceInfo for class `' , aClass name , '''') infoPrintCR.
683643ad5544 better info message (contains ... methods in other packages ..)
Claus Gittinger <cg@exept.de>
parents: 1060
diff changeset
  1293
        ^ nil
683643ad5544 better info message (contains ... methods in other packages ..)
Claus Gittinger <cg@exept.de>
parents: 1060
diff changeset
  1294
    ].
58
9b919d0bfec9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 57
diff changeset
  1295
179
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1296
    packageDir := self packageFromSourceInfo:sourceInfo.
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1297
    moduleDir := self moduleFromSourceInfo:sourceInfo.  "/ use the modules name as CVS module
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1298
    classFileName := self containerFromSourceInfo:sourceInfo.
58
9b919d0bfec9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 57
diff changeset
  1299
    ^ self 
179
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1300
        streamForClass:aClass
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1301
        fileName:classFileName 
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1302
        revision:revision 
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1303
        directory:packageDir 
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1304
        module:moduleDir
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1305
        cache:true
65
098be8484211 dont cache classes of which the newest rev. has been checked out
Claus Gittinger <cg@exept.de>
parents: 64
diff changeset
  1306
704
9644a88308bf MSDOS changes
Claus Gittinger <cg@exept.de>
parents: 677
diff changeset
  1307
    "Created: / 12.10.1996 / 17:21:52 / cg"
9644a88308bf MSDOS changes
Claus Gittinger <cg@exept.de>
parents: 677
diff changeset
  1308
    "Modified: / 11.8.1998 / 22:33:41 / cg"
58
9b919d0bfec9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 57
diff changeset
  1309
! !
9b919d0bfec9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 57
diff changeset
  1310
513
10707a1c366f use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 507
diff changeset
  1311
!AbstractSourceCodeManager class methodsFor:'source code administration'!
59
3bb0b97dffa2 reorganized; shared methods into AbstractSCMMgr
Claus Gittinger <cg@exept.de>
parents: 58
diff changeset
  1312
677
17133f6eddcb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 676
diff changeset
  1313
getExistingContainersInModule:aModule package:aPackage
17133f6eddcb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 676
diff changeset
  1314
    "{ Pragma: +optSpace }"
17133f6eddcb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 676
diff changeset
  1315
17133f6eddcb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 676
diff changeset
  1316
    "return a collection containing the names of existing containers"
17133f6eddcb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 676
diff changeset
  1317
17133f6eddcb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 676
diff changeset
  1318
    ^ self subclassResponsibility
17133f6eddcb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 676
diff changeset
  1319
17133f6eddcb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 676
diff changeset
  1320
    "Modified: / 29.1.1997 / 18:57:29 / cg"
17133f6eddcb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 676
diff changeset
  1321
    "Created: / 20.5.1998 / 19:49:12 / cg"
17133f6eddcb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 676
diff changeset
  1322
!
17133f6eddcb checkin from browser
Claus Gittinger <cg@exept.de>
parents: 676
diff changeset
  1323
676
024f7185c0c4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
  1324
getExistingModules
024f7185c0c4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
  1325
    "{ Pragma: +optSpace }"
024f7185c0c4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
  1326
024f7185c0c4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
  1327
    "return a collection containing the names of existing modules"
024f7185c0c4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
  1328
024f7185c0c4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
  1329
    ^ self subclassResponsibility
024f7185c0c4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
  1330
024f7185c0c4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
  1331
    "Modified: / 29.1.1997 / 18:57:29 / cg"
024f7185c0c4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
  1332
    "Created: / 20.5.1998 / 19:38:23 / cg"
024f7185c0c4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
  1333
!
024f7185c0c4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
  1334
024f7185c0c4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
  1335
getExistingPackagesInModule:aModule
024f7185c0c4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
  1336
    "{ Pragma: +optSpace }"
024f7185c0c4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
  1337
024f7185c0c4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
  1338
    "return a collection containing the names of existing packages"
024f7185c0c4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
  1339
024f7185c0c4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
  1340
    ^ self subclassResponsibility
024f7185c0c4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
  1341
024f7185c0c4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
  1342
    "Modified: / 29.1.1997 / 18:57:29 / cg"
024f7185c0c4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
  1343
    "Created: / 20.5.1998 / 19:38:34 / cg"
024f7185c0c4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
  1344
!
024f7185c0c4 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 674
diff changeset
  1345
545
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
  1346
initialRCSRevisionStringFor:aClass in:dir container:fileName
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
  1347
    "return a string usable as initial revision string"
122
4dd60cb14bc6 dummy entries to check-for & create modules & directories
Claus Gittinger <cg@exept.de>
parents: 121
diff changeset
  1348
545
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
  1349
    "/ do not make the string below into one string;
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
  1350
    "/ RCS would expand it into a wrong rev-string
122
4dd60cb14bc6 dummy entries to check-for & create modules & directories
Claus Gittinger <cg@exept.de>
parents: 121
diff changeset
  1351
545
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
  1352
    |nm oldRev idx special|
472
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
  1353
545
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
  1354
    nm := fileName.
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
  1355
    (nm endsWith:',v') ifTrue:[
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
  1356
        nm := nm copyWithoutLast:2
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
  1357
    ].
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
  1358
    (nm endsWith:'.st') ifFalse:[
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
  1359
        nm := nm , '.st'
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
  1360
    ].
122
4dd60cb14bc6 dummy entries to check-for & create modules & directories
Claus Gittinger <cg@exept.de>
parents: 121
diff changeset
  1361
545
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
  1362
    oldRev := aClass revisionString.
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
  1363
    special := ''.
122
4dd60cb14bc6 dummy entries to check-for & create modules & directories
Claus Gittinger <cg@exept.de>
parents: 121
diff changeset
  1364
545
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
  1365
    oldRev notNil ifTrue:[
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
  1366
        idx := oldRev lastIndexOf:$[.
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
  1367
        idx ~~ 0 ifTrue:[
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
  1368
            idx := oldRev indexOf:$[ startingAt:idx+1.
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
  1369
            idx ~~ 0 ifTrue:[
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
  1370
                special := ' ' , (oldRev copyFrom:idx).
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
  1371
            ]
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
  1372
        ]
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
  1373
    ].
122
4dd60cb14bc6 dummy entries to check-for & create modules & directories
Claus Gittinger <cg@exept.de>
parents: 121
diff changeset
  1374
4dd60cb14bc6 dummy entries to check-for & create modules & directories
Claus Gittinger <cg@exept.de>
parents: 121
diff changeset
  1375
545
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
  1376
    ^ '$' , 'Header: ' , dir , '/' , fileName , ',v $'
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
  1377
      , special
472
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
  1378
545
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
  1379
    "Modified: 17.9.1996 / 15:57:15 / cg"
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
  1380
    "Created: 14.2.1997 / 20:59:28 / cg"
122
4dd60cb14bc6 dummy entries to check-for & create modules & directories
Claus Gittinger <cg@exept.de>
parents: 121
diff changeset
  1381
!
4dd60cb14bc6 dummy entries to check-for & create modules & directories
Claus Gittinger <cg@exept.de>
parents: 121
diff changeset
  1382
460
06d089e12054 added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents: 433
diff changeset
  1383
newestRevisionInFile:classFileName directory:packageDir module:moduleDir
06d089e12054 added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents: 433
diff changeset
  1384
    "return the newest revision found in a container.
06d089e12054 added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents: 433
diff changeset
  1385
     Return nil on failure."
06d089e12054 added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents: 433
diff changeset
  1386
06d089e12054 added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents: 433
diff changeset
  1387
    |log|
06d089e12054 added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents: 433
diff changeset
  1388
534
73fc19a1169e commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents: 516
diff changeset
  1389
    log := self
73fc19a1169e commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents: 516
diff changeset
  1390
            revisionLogOf:nil 
73fc19a1169e commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents: 516
diff changeset
  1391
            fromRevision:0 
73fc19a1169e commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents: 516
diff changeset
  1392
            toRevision:0 
73fc19a1169e commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents: 516
diff changeset
  1393
            fileName:classFileName 
73fc19a1169e commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents: 516
diff changeset
  1394
            directory:packageDir 
73fc19a1169e commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents: 516
diff changeset
  1395
            module:moduleDir.
73fc19a1169e commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents: 516
diff changeset
  1396
460
06d089e12054 added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents: 433
diff changeset
  1397
    log isNil ifTrue:[^ nil].
06d089e12054 added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents: 433
diff changeset
  1398
    ^ log at:#newestRevision ifAbsent:nil
06d089e12054 added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents: 433
diff changeset
  1399
06d089e12054 added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents: 433
diff changeset
  1400
    "
06d089e12054 added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents: 433
diff changeset
  1401
     SourceCodeManager newestRevisionInFile:'Array.st' directory:'libbasic' module:'stx'       
06d089e12054 added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents: 433
diff changeset
  1402
    "
06d089e12054 added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents: 433
diff changeset
  1403
534
73fc19a1169e commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents: 516
diff changeset
  1404
    "Modified: 10.1.1997 / 13:31:42 / cg"
460
06d089e12054 added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents: 433
diff changeset
  1405
!
06d089e12054 added interface to remove a container & to read a containers
Claus Gittinger <cg@exept.de>
parents: 433
diff changeset
  1406
550
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1407
newestRevisionLogEntryOf:aClass
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1408
    "return the newest revisions log found in the repository.
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1409
     Return nil on failure."
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1410
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1411
    ^ self revisionLogOf:aClass fromRevision:0 toRevision:0.
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1412
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1413
    "
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1414
     SourceCodeManager newestRevisionLogEntryOf:Array       
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1415
     SourceCodeManager newestRevisionLogEntryOf:Connection 
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1416
    "
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1417
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1418
    "Modified: 10.1.1997 / 13:30:36 / cg"
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1419
    "Created: 29.1.1997 / 18:50:12 / cg"
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1420
!
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1421
207
9366df6c32ea added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  1422
newestRevisionOf:aClass
9366df6c32ea added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  1423
    "return the newest revision (as string) found in the repository.
9366df6c32ea added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  1424
     Return nil on failure."
9366df6c32ea added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  1425
1205
41ebb97c4ee6 Remove unused method vars
Stefan Vogel <sv@exept.de>
parents: 1202
diff changeset
  1426
    |sourceInfo packageDir moduleDir classFileName|
1005
5f595dc604e0 use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents: 980
diff changeset
  1427
5f595dc604e0 use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents: 980
diff changeset
  1428
    sourceInfo := self sourceInfoOfClass:aClass.
5f595dc604e0 use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents: 980
diff changeset
  1429
    sourceInfo isNil ifTrue:[^ nil].
207
9366df6c32ea added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  1430
1005
5f595dc604e0 use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents: 980
diff changeset
  1431
    packageDir := self packageFromSourceInfo:sourceInfo.
5f595dc604e0 use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents: 980
diff changeset
  1432
    moduleDir := self moduleFromSourceInfo:sourceInfo.  "/ use the modules name as CVS module
5f595dc604e0 use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents: 980
diff changeset
  1433
    classFileName := self containerFromSourceInfo:sourceInfo.
5f595dc604e0 use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents: 980
diff changeset
  1434
5f595dc604e0 use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents: 980
diff changeset
  1435
    ^ self newestRevisionInFile:classFileName directory:packageDir module:moduleDir
5f595dc604e0 use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents: 980
diff changeset
  1436
5f595dc604e0 use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents: 980
diff changeset
  1437
"/    |log|
5f595dc604e0 use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents: 980
diff changeset
  1438
"/
5f595dc604e0 use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents: 980
diff changeset
  1439
"/    log := self revisionLogOf:aClass fromRevision:0 toRevision:0.
5f595dc604e0 use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents: 980
diff changeset
  1440
"/    log isNil ifTrue:[^ nil].
5f595dc604e0 use 'cvs status' to get newest revision (used to be 'cvs log')
Claus Gittinger <cg@exept.de>
parents: 980
diff changeset
  1441
"/    ^ log at:#newestRevision ifAbsent:nil
207
9366df6c32ea added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  1442
9366df6c32ea added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  1443
    "
9366df6c32ea added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  1444
     SourceCodeManager newestRevisionOf:Array       
9366df6c32ea added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  1445
     SourceCodeManager newestRevisionOf:Connection 
9366df6c32ea added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  1446
    "
9366df6c32ea added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  1447
534
73fc19a1169e commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents: 516
diff changeset
  1448
    "Modified: 10.1.1997 / 13:30:36 / cg"
207
9366df6c32ea added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  1449
!
9366df6c32ea added query for newestRevision string
Claus Gittinger <cg@exept.de>
parents: 194
diff changeset
  1450
550
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1451
revisionInfoFromRCSString:aString
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1452
    "{ Pragma: +optSpace }"
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1453
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1454
    "return a dictionary filled with revision info.
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1455
     This extracts the relevant info from aString."
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1456
1463
fd42454f4339 Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents: 1461
diff changeset
  1457
    |words firstWord nextWord info nm|
550
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1458
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1459
    info := IdentityDictionary new.
1463
fd42454f4339 Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents: 1461
diff changeset
  1460
    words := aString asCollectionOfWords readStream.
550
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1461
1463
fd42454f4339 Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents: 1461
diff changeset
  1462
    words atEnd ifFalse:[
fd42454f4339 Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents: 1461
diff changeset
  1463
        firstWord := words next.
1346
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1464
550
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1465
        "/
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1466
        "/ supported formats:
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1467
        "/
1346
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1468
        "/ $-Header:   pathName rev date time user state $
550
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1469
        "/ $-Revision: rev $
1346
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1470
        "/ $-Id:       fileName rev date time user state $
550
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1471
        "/
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1472
1346
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1473
        (firstWord = '$Header:') ifTrue:[
1463
fd42454f4339 Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents: 1461
diff changeset
  1474
            nm := words next.
550
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1475
            info at:#repositoryPathName put:nm.
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1476
            (nm endsWith:',v') ifTrue:[
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1477
                nm := nm copyWithoutLast:2
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1478
            ].
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1479
            info at:#fileName put:nm asFilename baseName.
1463
fd42454f4339 Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents: 1461
diff changeset
  1480
            words atEnd ifFalse:[
fd42454f4339 Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents: 1461
diff changeset
  1481
                nextWord := words next.
fd42454f4339 Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents: 1461
diff changeset
  1482
                nextWord ~= '$' ifTrue:[
fd42454f4339 Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents: 1461
diff changeset
  1483
                    info at:#revision put:nextWord.
fd42454f4339 Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents: 1461
diff changeset
  1484
                    nextWord := words next.
fd42454f4339 Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents: 1461
diff changeset
  1485
                    nextWord ~= '$' ifTrue:[
fd42454f4339 Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents: 1461
diff changeset
  1486
                        info at:#date put:nextWord.
fd42454f4339 Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents: 1461
diff changeset
  1487
                        info at:#time put:words next.
fd42454f4339 Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents: 1461
diff changeset
  1488
                        nextWord := words next.
fd42454f4339 Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents: 1461
diff changeset
  1489
                        (nextWord startsWithAnyOf:'+-') ifTrue:[
fd42454f4339 Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents: 1461
diff changeset
  1490
                            info at:#timezone put:nextWord.
fd42454f4339 Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents: 1461
diff changeset
  1491
                            nextWord := words next.
fd42454f4339 Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents: 1461
diff changeset
  1492
                        ].
fd42454f4339 Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents: 1461
diff changeset
  1493
                        info at:#user put:nextWord.
fd42454f4339 Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents: 1461
diff changeset
  1494
                        info at:#state put:words next.
550
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1495
                    ]
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1496
                ].
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1497
            ].
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1498
            ^ info
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1499
        ].
1346
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1500
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1501
        (firstWord = '$Revision:') ifTrue:[
1463
fd42454f4339 Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents: 1461
diff changeset
  1502
            info at:#revision put:words next.
550
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1503
            ^ info
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1504
        ].
1346
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1505
8657706d79ba generation of relative-path in CVS fixed
Claus Gittinger <cg@exept.de>
parents: 1330
diff changeset
  1506
        (firstWord = '$Id:') ifTrue:[
1463
fd42454f4339 Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents: 1461
diff changeset
  1507
            info at:#fileName put:(words next).
fd42454f4339 Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents: 1461
diff changeset
  1508
            info at:#revision put:(words next).
fd42454f4339 Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents: 1461
diff changeset
  1509
            info at:#date put:(words next).
fd42454f4339 Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents: 1461
diff changeset
  1510
            info at:#time put:(words next).
fd42454f4339 Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents: 1461
diff changeset
  1511
            info at:#user put:(words next).
fd42454f4339 Take care of timezone information in header strings
Stefan Vogel <sv@exept.de>
parents: 1461
diff changeset
  1512
            info at:#state put:(words next).
550
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1513
            ^ info
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1514
        ].
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1515
    ].
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1516
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1517
    ^ nil
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1518
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1519
    "
968
7fa6a836642b comments
Claus Gittinger <cg@exept.de>
parents: 967
diff changeset
  1520
     SourceCodeManager revisionInfoFromString:'$' , 'Revision: 1.122 $'
550
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1521
     SourceCodeManager revisionInfoFromString:(SourceCodeManager version)
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1522
    "
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1523
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1524
    "Modified: 29.1.1997 / 18:56:31 / cg"
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1525
!
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1526
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1527
revisionInfoFromString:aString
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1528
    "{ Pragma: +optSpace }"
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1529
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1530
    "return a dictionary filled with revision info.
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1531
     This extracts the relevant info from aString."
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1532
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1533
    ^ self subclassResponsibility
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1534
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1535
    "Created: 29.1.1997 / 18:54:52 / cg"
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1536
    "Modified: 29.1.1997 / 18:57:29 / cg"
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1537
!
3ddcec87d591 the sourceManager only should extract revision numbers from a revisionString
Claus Gittinger <cg@exept.de>
parents: 549
diff changeset
  1538
93
83042eccb8d1 revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
  1539
revisionLogOf:aClass
95
aeda58a2343c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 93
diff changeset
  1540
    "return info about the repository container and
aeda58a2343c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 93
diff changeset
  1541
     the revisionlog as a collection of revision entries.
aeda58a2343c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 93
diff changeset
  1542
     Return nil on failure.
93
83042eccb8d1 revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
  1543
     The returned information is a structure (IdentityDictionary)
83042eccb8d1 revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
  1544
     filled with:
95
aeda58a2343c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 93
diff changeset
  1545
	    #container          -> the RCS container file name
aeda58a2343c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 93
diff changeset
  1546
	    #filename           -> the actual source file name
aeda58a2343c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 93
diff changeset
  1547
	    #newestRevision     -> the revisionString of the newest revision
aeda58a2343c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 93
diff changeset
  1548
	    #numberOfRevisions  -> the number of revisions in the container
aeda58a2343c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 93
diff changeset
  1549
	    #revisions          -> collection of per-revision info
93
83042eccb8d1 revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
  1550
95
aeda58a2343c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 93
diff changeset
  1551
	    per revision info consists of one record per revision:
93
83042eccb8d1 revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
  1552
95
aeda58a2343c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 93
diff changeset
  1553
	      #revision              -> the revision string
aeda58a2343c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 93
diff changeset
  1554
	      #author                -> who checked that revision into the repository
aeda58a2343c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 93
diff changeset
  1555
	      #date                  -> when was it checked in
aeda58a2343c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 93
diff changeset
  1556
	      #state                 -> the RCS state
aeda58a2343c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 93
diff changeset
  1557
	      #numberOfChangedLines  -> the number of changed line w.r.t the previous
93
83042eccb8d1 revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
  1558
95
aeda58a2343c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 93
diff changeset
  1559
	    revisions are ordered newest first 
aeda58a2343c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 93
diff changeset
  1560
	    (i.e. the last entry is for the initial revision; the first for the most recent one)
aeda58a2343c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 93
diff changeset
  1561
	"
93
83042eccb8d1 revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
  1562
83042eccb8d1 revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
  1563
    ^ self
95
aeda58a2343c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 93
diff changeset
  1564
	revisionLogOf:aClass fromRevision:nil toRevision:nil
93
83042eccb8d1 revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
  1565
83042eccb8d1 revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
  1566
    "
83042eccb8d1 revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
  1567
     SourceCodeManager revisionLogOf:Array 
83042eccb8d1 revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
  1568
    "
83042eccb8d1 revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
  1569
83042eccb8d1 revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
  1570
    "Created: 25.11.1995 / 11:25:02 / cg"
83042eccb8d1 revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
  1571
    "Modified: 25.11.1995 / 11:56:16 / cg"
83042eccb8d1 revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
  1572
!
83042eccb8d1 revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
  1573
110
05097d7fd93c another revisionLog method
Claus Gittinger <cg@exept.de>
parents: 109
diff changeset
  1574
revisionLogOf:aClass fromRevision:rev1
05097d7fd93c another revisionLog method
Claus Gittinger <cg@exept.de>
parents: 109
diff changeset
  1575
    "return info about the repository container and
05097d7fd93c another revisionLog method
Claus Gittinger <cg@exept.de>
parents: 109
diff changeset
  1576
     (part of) the revisionlog as a collection of revision entries.
05097d7fd93c another revisionLog method
Claus Gittinger <cg@exept.de>
parents: 109
diff changeset
  1577
     Return nil on failure.
05097d7fd93c another revisionLog method
Claus Gittinger <cg@exept.de>
parents: 109
diff changeset
  1578
05097d7fd93c another revisionLog method
Claus Gittinger <cg@exept.de>
parents: 109
diff changeset
  1579
     The returned information is a structure (IdentityDictionary)
05097d7fd93c another revisionLog method
Claus Gittinger <cg@exept.de>
parents: 109
diff changeset
  1580
     filled with:
534
73fc19a1169e commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents: 516
diff changeset
  1581
            #container          -> the RCS container file name 
73fc19a1169e commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents: 516
diff changeset
  1582
            #filename           -> the actual source file name
73fc19a1169e commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents: 516
diff changeset
  1583
            #newestRevision     -> the revisionString of the newest revision
73fc19a1169e commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents: 516
diff changeset
  1584
            #numberOfRevisions  -> the number of revisions in the container
73fc19a1169e commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents: 516
diff changeset
  1585
            #revisions          -> collection of per-revision info (see below)
110
05097d7fd93c another revisionLog method
Claus Gittinger <cg@exept.de>
parents: 109
diff changeset
  1586
534
73fc19a1169e commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents: 516
diff changeset
  1587
         for some classes, additional info is returned:
110
05097d7fd93c another revisionLog method
Claus Gittinger <cg@exept.de>
parents: 109
diff changeset
  1588
534
73fc19a1169e commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents: 516
diff changeset
  1589
            #renamed            -> true if the class has been renamed or copied
73fc19a1169e commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents: 516
diff changeset
  1590
                                   and the sourceInfo is from the previous one
73fc19a1169e commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents: 516
diff changeset
  1591
            #expectedFileName   -> the filename we would expect (i.e. for the new class)
110
05097d7fd93c another revisionLog method
Claus Gittinger <cg@exept.de>
parents: 109
diff changeset
  1592
534
73fc19a1169e commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents: 516
diff changeset
  1593
            rev1 specifies from which revisions a logEntry is wanted:
73fc19a1169e commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents: 516
diff changeset
  1594
              If rev1 is nil, the first revision is the initial revision
73fc19a1169e commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents: 516
diff changeset
  1595
              otherwise, the log starts with that revision.
110
05097d7fd93c another revisionLog method
Claus Gittinger <cg@exept.de>
parents: 109
diff changeset
  1596
534
73fc19a1169e commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents: 516
diff changeset
  1597
            per revision info consists of one record per revision:
110
05097d7fd93c another revisionLog method
Claus Gittinger <cg@exept.de>
parents: 109
diff changeset
  1598
534
73fc19a1169e commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents: 516
diff changeset
  1599
              #revision              -> the revision string
73fc19a1169e commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents: 516
diff changeset
  1600
              #author                -> who checked that revision into the repository
73fc19a1169e commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents: 516
diff changeset
  1601
              #date                  -> when was it checked in
73fc19a1169e commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents: 516
diff changeset
  1602
              #state                 -> the RCS state
73fc19a1169e commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents: 516
diff changeset
  1603
              #numberOfChangedLines  -> the number of changed line w.r.t the previous
110
05097d7fd93c another revisionLog method
Claus Gittinger <cg@exept.de>
parents: 109
diff changeset
  1604
534
73fc19a1169e commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents: 516
diff changeset
  1605
            revisions are ordered newest first 
73fc19a1169e commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents: 516
diff changeset
  1606
            (i.e. the last entry is for the initial revision; 
73fc19a1169e commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents: 516
diff changeset
  1607
                  the first for the most recent one)
73fc19a1169e commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents: 516
diff changeset
  1608
        "
110
05097d7fd93c another revisionLog method
Claus Gittinger <cg@exept.de>
parents: 109
diff changeset
  1609
05097d7fd93c another revisionLog method
Claus Gittinger <cg@exept.de>
parents: 109
diff changeset
  1610
    ^ self revisionLogOf:aClass fromRevision:rev1 toRevision:nil
05097d7fd93c another revisionLog method
Claus Gittinger <cg@exept.de>
parents: 109
diff changeset
  1611
05097d7fd93c another revisionLog method
Claus Gittinger <cg@exept.de>
parents: 109
diff changeset
  1612
    "
05097d7fd93c another revisionLog method
Claus Gittinger <cg@exept.de>
parents: 109
diff changeset
  1613
     SourceCodeManager revisionLogOf:Array fromRevision:'1.40'
05097d7fd93c another revisionLog method
Claus Gittinger <cg@exept.de>
parents: 109
diff changeset
  1614
    "
05097d7fd93c another revisionLog method
Claus Gittinger <cg@exept.de>
parents: 109
diff changeset
  1615
05097d7fd93c another revisionLog method
Claus Gittinger <cg@exept.de>
parents: 109
diff changeset
  1616
    "Created: 6.11.1995 / 18:56:00 / cg"
534
73fc19a1169e commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents: 516
diff changeset
  1617
    "Modified: 10.1.1997 / 13:29:50 / cg"
110
05097d7fd93c another revisionLog method
Claus Gittinger <cg@exept.de>
parents: 109
diff changeset
  1618
!
05097d7fd93c another revisionLog method
Claus Gittinger <cg@exept.de>
parents: 109
diff changeset
  1619
93
83042eccb8d1 revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
  1620
revisionLogOf:aClass fromRevision:rev1 toRevision:rev2
95
aeda58a2343c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 93
diff changeset
  1621
    "return info about the repository container and
aeda58a2343c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 93
diff changeset
  1622
     (part of) the revisionlog as a collection of revision entries.
aeda58a2343c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 93
diff changeset
  1623
     Return nil on failure.
aeda58a2343c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 93
diff changeset
  1624
93
83042eccb8d1 revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
  1625
     The returned information is a structure (IdentityDictionary)
83042eccb8d1 revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
  1626
     filled with:
127
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1627
            #container          -> the RCS container file name 
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1628
            #filename           -> the actual source file name
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1629
            #newestRevision     -> the revisionString of the newest revision
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1630
            #numberOfRevisions  -> the number of revisions in the container
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1631
            #revisions          -> collection of per-revision info (see below)
93
83042eccb8d1 revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
  1632
127
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1633
         for some classes, additional info is returned:
96
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
  1634
127
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1635
            #renamed            -> true if the class has been renamed or copied
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1636
                                   and the sourceInfo is from the previous one
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1637
            #expectedFileName   -> the filename we would expect (i.e. for the new class)
93
83042eccb8d1 revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
  1638
127
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1639
            rev1 / rev2 specify from which revisions a logEntry is wanted:
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1640
              If rev1 is nil, the first revision is the initial revision
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1641
              otherwise, the log starts with that revision.
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1642
              If rev2 is nil, the last revision is the newest revision
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1643
              otherwise, the log ends with that revision.
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1644
              If both are nil, no logEntries are extracted (i.e. only the header).
96
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
  1645
127
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1646
            per revision info consists of one record per revision:
93
83042eccb8d1 revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
  1647
127
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1648
              #revision              -> the revision string
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1649
              #author                -> who checked that revision into the repository
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1650
              #date                  -> when was it checked in
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1651
              #state                 -> the RCS state
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1652
              #numberOfChangedLines  -> the number of changed line w.r.t the previous
93
83042eccb8d1 revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
  1653
127
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1654
            revisions are ordered newest first 
534
73fc19a1169e commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents: 516
diff changeset
  1655
            (i.e. the last entry is for the initial revision; 
73fc19a1169e commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents: 516
diff changeset
  1656
                  the first for the most recent one)
127
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1657
        "
93
83042eccb8d1 revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
  1658
501
c3ccbea7930c removed unused vars
Claus Gittinger <cg@exept.de>
parents: 493
diff changeset
  1659
    |sourceInfo packageDir moduleDir classFileName info|
95
aeda58a2343c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 93
diff changeset
  1660
aeda58a2343c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 93
diff changeset
  1661
    sourceInfo := self sourceInfoOfClass:aClass.
aeda58a2343c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 93
diff changeset
  1662
    sourceInfo isNil ifTrue:[^ nil].
93
83042eccb8d1 revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
  1663
179
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1664
    packageDir := self packageFromSourceInfo:sourceInfo.
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1665
    moduleDir := self moduleFromSourceInfo:sourceInfo.  "/ use the modules name as CVS module
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1666
    classFileName := self containerFromSourceInfo:sourceInfo.
93
83042eccb8d1 revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
  1667
96
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
  1668
    info := self 
127
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1669
        revisionLogOf:aClass
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1670
        fromRevision:rev1 
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1671
        toRevision:rev2
179
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1672
        fileName:classFileName
127
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1673
        directory:packageDir 
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1674
        module:moduleDir.
96
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
  1675
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
  1676
    info notNil ifTrue:[
179
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1677
"/        (sourceInfo includesKey:#renamed) ifTrue:[
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1678
"/            info at:#renamed put:(sourceInfo at:#renamed)
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  1679
"/        ].
127
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1680
        (sourceInfo includesKey:#expectedFileName) ifTrue:[
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1681
            info at:#expectedFileName put:(sourceInfo at:#expectedFileName)
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  1682
        ]
96
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
  1683
    ].
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
  1684
    ^ info
93
83042eccb8d1 revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
  1685
83042eccb8d1 revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
  1686
    "
83042eccb8d1 revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
  1687
     SourceCodeManager revisionLogOf:Array fromRevision:'1.40' toRevision:'1.43' 
96
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
  1688
     SourceCodeManager revisionLogOf:XtBoxNew 
93
83042eccb8d1 revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
  1689
    "
83042eccb8d1 revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
  1690
83042eccb8d1 revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
  1691
    "Created: 6.11.1995 / 18:56:00 / cg"
534
73fc19a1169e commentary; faster #newestRevisionOf
Claus Gittinger <cg@exept.de>
parents: 516
diff changeset
  1692
    "Modified: 10.1.1997 / 13:30:00 / cg"
93
83042eccb8d1 revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
  1693
!
83042eccb8d1 revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
  1694
935
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1695
revisionLogOf:aClass numberOfRevisions:numRevisions
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1696
    "return info about the repository container and
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1697
     (part of) the revisionlog (numRevisions newest revisions) 
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1698
     as a collection of revision entries.
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1699
     Return nil on failure.
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1700
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1701
     The returned information is a structure (IdentityDictionary)
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1702
     filled with:
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1703
            #container          -> the RCS container file name 
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1704
            #filename           -> the actual source file name
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1705
            #newestRevision     -> the revisionString of the newest revision
1069
860c5e37c282 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1066
diff changeset
  1706
            #numberOfRevisions  -> the number of revisions in the container (nil for all)
935
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1707
            #revisions          -> collection of per-revision info (see below)
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1708
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1709
         for some classes, additional info is returned:
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1710
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1711
            #renamed            -> true if the class has been renamed or copied
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1712
                                   and the sourceInfo is from the previous one
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1713
            #expectedFileName   -> the filename we would expect (i.e. for the new class)
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1714
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1715
            rev1 / rev2 specify from which revisions a logEntry is wanted:
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1716
              If rev1 is nil, the first revision is the initial revision
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1717
              otherwise, the log starts with that revision.
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1718
              If rev2 is nil, the last revision is the newest revision
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1719
              otherwise, the log ends with that revision.
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1720
              If both are nil, no logEntries are extracted (i.e. only the header).
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1721
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1722
            per revision info consists of one record per revision:
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1723
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1724
              #revision              -> the revision string
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1725
              #author                -> who checked that revision into the repository
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1726
              #date                  -> when was it checked in
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1727
              #state                 -> the RCS state
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1728
              #numberOfChangedLines  -> the number of changed line w.r.t the previous
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1729
              #logMessage            -> the checkIn log message
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1730
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1731
            revisions are ordered newest first 
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1732
            (i.e. the last entry is for the initial revision; 
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1733
                  the first for the most recent one)
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1734
        "
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1735
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1736
    |sourceInfo packageDir moduleDir classFileName info|
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1737
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1738
    sourceInfo := self sourceInfoOfClass:aClass.
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1739
    sourceInfo isNil ifTrue:[^ nil].
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1740
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1741
    packageDir := self packageFromSourceInfo:sourceInfo.
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1742
    moduleDir := self moduleFromSourceInfo:sourceInfo.  "/ use the modules name as CVS module
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1743
    classFileName := self containerFromSourceInfo:sourceInfo.
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1744
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1745
    info := self 
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1746
        revisionLogOf:aClass
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1747
        numberOfRevisions:numRevisions
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1748
        fileName:classFileName
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1749
        directory:packageDir 
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1750
        module:moduleDir.
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1751
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1752
    info notNil ifTrue:[
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1753
"/        (sourceInfo includesKey:#renamed) ifTrue:[
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1754
"/            info at:#renamed put:(sourceInfo at:#renamed)
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1755
"/        ].
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1756
        (sourceInfo includesKey:#expectedFileName) ifTrue:[
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1757
            info at:#expectedFileName put:(sourceInfo at:#expectedFileName)
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1758
        ]
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1759
    ].
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1760
    ^ info
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1761
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1762
    "
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1763
     SourceCodeManager revisionLogOf:Array numberOfRevisions:10 
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1764
    "
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1765
!
f5a8e98c8730 added entry to read the last N newest revision-log.
Claus Gittinger <cg@exept.de>
parents: 928
diff changeset
  1766
922
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1767
revisionLogOfContainer:classFileName directory:packageDir module:moduleDir
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1768
    "return info about the repository container and
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1769
     (part of) the revisionlog as a collection of revision entries.
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1770
     Return nil on failure.
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1771
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1772
     The returned information is a structure (IdentityDictionary)
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1773
     filled with:
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1774
            #container          -> the RCS container file name 
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1775
            #filename           -> the actual source file name
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1776
            #newestRevision     -> the revisionString of the newest revision
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1777
            #numberOfRevisions  -> the number of revisions in the container
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1778
            #revisions          -> collection of per-revision info (see below)
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1779
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1780
            per revision info consists of one record per revision:
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1781
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1782
              #revision              -> the revision string
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1783
              #author                -> who checked that revision into the repository
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1784
              #date                  -> when was it checked in
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1785
              #state                 -> the RCS state
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1786
              #numberOfChangedLines  -> the number of changed line w.r.t the previous
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1787
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1788
            revisions are ordered newest first 
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1789
            (i.e. the last entry is for the initial revision; 
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1790
                  the first for the most recent one)
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1791
        "
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1792
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1793
    ^ self
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1794
        revisionLogOf:nil 
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1795
        fromRevision:nil 
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1796
        toRevision:nil 
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1797
        fileName:classFileName 
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1798
        directory:packageDir 
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1799
        module:moduleDir
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1800
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1801
    "
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1802
     CVSSourceCodeManager
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1803
        revisionLogInFile:'Array.st' directory:'libbasic' module:'stx'
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1804
    "
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1805
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1806
    "Modified: 10.1.1997 / 13:29:06 / cg"
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1807
!
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1808
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1809
revisionLogOfContainer:fileName module:moduleDir package:packageDir fromRevision:rev1 toRevision:rev2
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1810
    "return info about the repository container and
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1811
     (part of) the revisionlog as a collection of revision entries.
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1812
     Return nil on failure.
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1813
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1814
     The returned information is a structure (IdentityDictionary)
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1815
     filled with:
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1816
            #container          -> the RCS container file name 
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1817
            #filename           -> the actual source file name
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1818
            #newestRevision     -> the revisionString of the newest revision
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1819
            #numberOfRevisions  -> the number of revisions in the container
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1820
            #revisions          -> collection of per-revision info (see below)
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1821
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1822
         for some classes, additional info is returned:
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1823
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1824
            #renamed            -> true if the class has been renamed or copied
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1825
                                   and the sourceInfo is from the previous one
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1826
            #expectedFileName   -> the filename we would expect (i.e. for the new class)
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1827
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1828
            rev1 / rev2 specify from which revisions a logEntry is wanted:
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1829
              If rev1 is nil, the first revision is the initial revision
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1830
              otherwise, the log starts with that revision.
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1831
              If rev2 is nil, the last revision is the newest revision
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1832
              otherwise, the log ends with that revision.
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1833
              If both are nil, no logEntries are extracted (i.e. only the header).
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1834
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1835
            per revision info consists of one record per revision:
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1836
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1837
              #revision              -> the revision string
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1838
              #author                -> who checked that revision into the repository
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1839
              #date                  -> when was it checked in
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1840
              #state                 -> the RCS state
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1841
              #numberOfChangedLines  -> the number of changed line w.r.t the previous
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1842
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1843
            revisions are ordered newest first 
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1844
            (i.e. the last entry is for the initial revision; 
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1845
                  the first for the most recent one)
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1846
        "
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1847
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1848
    |info|
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1849
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1850
    info := self 
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1851
        revisionLogOf:nil
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1852
        fromRevision:rev1 
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1853
        toRevision:rev2
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1854
        fileName:fileName
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1855
        directory:packageDir 
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1856
        module:moduleDir.
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1857
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1858
    ^ info
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1859
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1860
    "
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1861
     CVSSourceCodeManager revisionLogOfContainer:'Array.st' module:'stx' package:'libbasic' fromRevision:'1.40' toRevision:'1.43' 
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1862
    "
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1863
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1864
    "Created: 6.11.1995 / 18:56:00 / cg"
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1865
    "Modified: 10.1.1997 / 13:30:00 / cg"
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1866
!
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 919
diff changeset
  1867
213
c6da419116bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 207
diff changeset
  1868
revisionsOf:aClass
c6da419116bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 207
diff changeset
  1869
    "return a collection of revisions (as strings) found in the repository.
c6da419116bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 207
diff changeset
  1870
     The most recent (newest) revision will be the first in the list.
c6da419116bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 207
diff changeset
  1871
     Return nil on failure."
c6da419116bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 207
diff changeset
  1872
c6da419116bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 207
diff changeset
  1873
    |log revisions|
c6da419116bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 207
diff changeset
  1874
c6da419116bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 207
diff changeset
  1875
    log := self revisionLogOf:aClass.
c6da419116bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 207
diff changeset
  1876
    log isNil ifTrue:[^ nil].
c6da419116bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 207
diff changeset
  1877
    revisions := log at:#revisions ifAbsent:nil.
c6da419116bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 207
diff changeset
  1878
    revisions isNil ifTrue:[^ nil].
c6da419116bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 207
diff changeset
  1879
    ^ revisions collect:[:rev | rev at:#revision].
c6da419116bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 207
diff changeset
  1880
c6da419116bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 207
diff changeset
  1881
    "
c6da419116bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 207
diff changeset
  1882
     SourceCodeManager revisionsOf:Array       
c6da419116bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 207
diff changeset
  1883
     SourceCodeManager newestRevisionOf:Array 
c6da419116bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 207
diff changeset
  1884
    "
c6da419116bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 207
diff changeset
  1885
c6da419116bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 207
diff changeset
  1886
    "Modified: 10.4.1996 / 23:14:24 / cg"
c6da419116bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 207
diff changeset
  1887
    "Created: 19.4.1996 / 17:24:34 / cg"
c6da419116bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 207
diff changeset
  1888
!
c6da419116bf checkin from browser
Claus Gittinger <cg@exept.de>
parents: 207
diff changeset
  1889
1038
dc804a50da9b module filter in history
Claus Gittinger <cg@exept.de>
parents: 1036
diff changeset
  1890
writeHistoryLogSince:timeGoal filterSTSources:filter filterUser:userFilter filterRepository:repositoryFilter filterModules:moduleFilter to:aStream
855
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1891
    "send a full historyLog to some stream.
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1892
     This walks over all possible repository roots."
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1893
1205
41ebb97c4ee6 Remove unused method vars
Stefan Vogel <sv@exept.de>
parents: 1202
diff changeset
  1894
    |recordType fileName user date time rev pkgDir 
41ebb97c4ee6 Remove unused method vars
Stefan Vogel <sv@exept.de>
parents: 1202
diff changeset
  1895
     clsName cls clsRev goalString prevUser  
855
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1896
     revInfo cvsRoot prevCvsRoot|
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1897
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1898
    goalString := ''.
1447
2ac1cf09722b isEmptyOrNil / notEmptyOrNil refactoring
Claus Gittinger <cg@exept.de>
parents: 1432
diff changeset
  1899
    (timeGoal notEmptyOrNil) ifTrue:[
855
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1900
        goalString := ' since ' , timeGoal.
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1901
    ].
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1902
    userFilter notNil ifTrue:[
1220
dfe1088826b8 userFilter
Claus Gittinger <cg@exept.de>
parents: 1218
diff changeset
  1903
        userFilter isString ifTrue:[
dfe1088826b8 userFilter
Claus Gittinger <cg@exept.de>
parents: 1218
diff changeset
  1904
            goalString := ', for user ' , userFilter
dfe1088826b8 userFilter
Claus Gittinger <cg@exept.de>
parents: 1218
diff changeset
  1905
        ] ifFalse:[
dfe1088826b8 userFilter
Claus Gittinger <cg@exept.de>
parents: 1218
diff changeset
  1906
            userFilter size == 1 ifTrue:[
dfe1088826b8 userFilter
Claus Gittinger <cg@exept.de>
parents: 1218
diff changeset
  1907
                goalString := ', for user ' , (userFilter first) 
dfe1088826b8 userFilter
Claus Gittinger <cg@exept.de>
parents: 1218
diff changeset
  1908
            ] ifFalse:[
dfe1088826b8 userFilter
Claus Gittinger <cg@exept.de>
parents: 1218
diff changeset
  1909
                goalString := ', for user ' , (userFilter first) , '...' , (userFilter last) 
dfe1088826b8 userFilter
Claus Gittinger <cg@exept.de>
parents: 1218
diff changeset
  1910
            ]
dfe1088826b8 userFilter
Claus Gittinger <cg@exept.de>
parents: 1218
diff changeset
  1911
        ].
855
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1912
    ].
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1913
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1914
    aStream nextPutLine:'**** source repository history' , goalString , ' ****'.
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1915
    aStream cr.
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1916
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1917
    self 
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1918
        reportHistoryLogSince:timeGoal 
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1919
        filterSTSources:filter 
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1920
        filterUser:userFilter 
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1921
        filterRepository:repositoryFilter 
1038
dc804a50da9b module filter in history
Claus Gittinger <cg@exept.de>
parents: 1036
diff changeset
  1922
        filterModules:moduleFilter
855
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1923
        inTo:[:info |
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1924
            user := info at:#user ifAbsent:'?'.
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1925
            recordType := info at:#cvsRecordType ifAbsent:'?'.
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1926
            fileName := info at:#fileName ifAbsent:'?'.
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1927
            date := info at:#date ifAbsent:'?'.
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1928
            time := info at:#time ifAbsent:'?'.
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1929
            rev := info at:#revision ifAbsent:'?'.
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1930
            pkgDir := info at:#directory ifAbsent:'?'.
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1931
            clsName := info at:#className ifAbsent:'?'.
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1932
            cvsRoot := info at:#cvsRoot ifAbsent:'?'.
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1933
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1934
            cvsRoot ~= prevCvsRoot ifTrue:[
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1935
                aStream cr.
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1936
                aStream nextPutLine:'>>>> repository: ' , cvsRoot , ' <<<<'.
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1937
                aStream cr; cr.
1480
c42afcba343a Fix "cvs history"
Stefan Vogel <sv@exept.de>
parents: 1467
diff changeset
  1938
                aStream nextPutLine:'  date  time        user        rev     file                     module/package'.
855
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1939
                prevUser := nil.
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1940
                prevCvsRoot := cvsRoot.
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1941
            ].
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1942
            prevUser ~= user ifTrue:[
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1943
                aStream cr.
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1944
                prevUser := user.
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1945
            ].
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1946
            aStream nextPutAll:recordType; space; 
904
1db5b3ee4b37 *** empty log message ***
ps
parents: 880
diff changeset
  1947
                    nextPutAll:(date printString paddedTo:5); space; nextPutAll:(time printString paddedTo:5); space;
855
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1948
                    nextPutAll:(user leftPaddedTo:10); space;             
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1949
                    nextPutAll:(rev decimalPaddedTo:8 and:3 at:$. withLeft:(Character space) right:nil); tab;              
1480
c42afcba343a Fix "cvs history"
Stefan Vogel <sv@exept.de>
parents: 1467
diff changeset
  1950
                    nextPutAll:(fileName paddedTo:24); space;                 
855
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1951
                    nextPutAll:(pkgDir paddedTo:20).
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1952
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1953
            "/
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1954
            "/ for your convenience:
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1955
            "/  check what the actual version is in the image
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1956
            "/
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1957
            clsName notNil ifTrue:[
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1958
                revInfo := nil.
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1959
                cls := Smalltalk classNamed:clsName.
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1960
                (cls notNil and:[(clsRev := cls revision) notNil]) ifTrue:[
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1961
                    rev ~= clsRev ifTrue:[
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1962
                        revInfo := (' current: ' , clsRev)
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1963
                    ]
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1964
                ] ifFalse:[
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1965
                    cls isNil ifTrue:[
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1966
                        revInfo := (' current: ** none **')
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1967
                    ] ifFalse:[
1480
c42afcba343a Fix "cvs history"
Stefan Vogel <sv@exept.de>
parents: 1467
diff changeset
  1968
                        cls isLoaded ifTrue:[
855
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1969
                            revInfo := (' current: ** no revision info **')
1480
c42afcba343a Fix "cvs history"
Stefan Vogel <sv@exept.de>
parents: 1467
diff changeset
  1970
                        ] ifFalse:[
c42afcba343a Fix "cvs history"
Stefan Vogel <sv@exept.de>
parents: 1467
diff changeset
  1971
                            revInfo := (' current: ** not loaded **')
855
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1972
                        ]    
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1973
                    ]
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1974
                ].
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1975
                revInfo notNil ifTrue:[
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1976
                    aStream nextPutAll:revInfo
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1977
                ].
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1978
            ].
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1979
            aStream cr                              
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1980
        ].
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1981
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1982
    "Modified: / 28.9.1998 / 16:47:08 / cg"
1038
dc804a50da9b module filter in history
Claus Gittinger <cg@exept.de>
parents: 1036
diff changeset
  1983
    "Created: / 17.1.2001 / 13:14:57 / cg"
dc804a50da9b module filter in history
Claus Gittinger <cg@exept.de>
parents: 1036
diff changeset
  1984
!
dc804a50da9b module filter in history
Claus Gittinger <cg@exept.de>
parents: 1036
diff changeset
  1985
dc804a50da9b module filter in history
Claus Gittinger <cg@exept.de>
parents: 1036
diff changeset
  1986
writeHistoryLogSince:timeGoal filterSTSources:filter filterUser:userFilter filterRepository:repositoryFilter to:aStream
dc804a50da9b module filter in history
Claus Gittinger <cg@exept.de>
parents: 1036
diff changeset
  1987
    "send a full historyLog to some stream.
dc804a50da9b module filter in history
Claus Gittinger <cg@exept.de>
parents: 1036
diff changeset
  1988
     This walks over all possible repository roots."
dc804a50da9b module filter in history
Claus Gittinger <cg@exept.de>
parents: 1036
diff changeset
  1989
dc804a50da9b module filter in history
Claus Gittinger <cg@exept.de>
parents: 1036
diff changeset
  1990
    ^self
dc804a50da9b module filter in history
Claus Gittinger <cg@exept.de>
parents: 1036
diff changeset
  1991
        writeHistoryLogSince:timeGoal 
dc804a50da9b module filter in history
Claus Gittinger <cg@exept.de>
parents: 1036
diff changeset
  1992
        filterSTSources:filter 
dc804a50da9b module filter in history
Claus Gittinger <cg@exept.de>
parents: 1036
diff changeset
  1993
        filterUser:userFilter 
dc804a50da9b module filter in history
Claus Gittinger <cg@exept.de>
parents: 1036
diff changeset
  1994
        filterRepository:repositoryFilter 
dc804a50da9b module filter in history
Claus Gittinger <cg@exept.de>
parents: 1036
diff changeset
  1995
        filterModules:nil to:aStream
dc804a50da9b module filter in history
Claus Gittinger <cg@exept.de>
parents: 1036
diff changeset
  1996
dc804a50da9b module filter in history
Claus Gittinger <cg@exept.de>
parents: 1036
diff changeset
  1997
    "Modified: / 17.1.2001 / 13:15:54 / cg"
855
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1998
!
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  1999
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  2000
writeHistoryLogSince:timeGoal filterSTSources:filter filterUser:userFilter to:aStream
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  2001
    "send a full historyLog to some stream.
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  2002
     This walks over all possible repository roots."
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  2003
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  2004
    ^ self
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  2005
        writeHistoryLogSince:timeGoal 
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  2006
        filterSTSources:filter 
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  2007
        filterUser:userFilter 
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  2008
        filterRepository:nil 
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  2009
        to:aStream
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  2010
!
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  2011
147
f6cfa2afc00a history list added
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
  2012
writeHistoryLogSince:timeGoal filterSTSources:filter to:aStream
472
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
  2013
    "send a repositories historyLog to some stream"
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
  2014
855
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  2015
    ^ self 
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  2016
        writeHistoryLogSince:timeGoal 
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  2017
        filterSTSources:filter 
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  2018
        filterUser:nil 
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  2019
        filterRepository:nil
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  2020
        to:aStream
147
f6cfa2afc00a history list added
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
  2021
472
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
  2022
    "Modified: 12.9.1996 / 02:36:32 / cg"
147
f6cfa2afc00a history list added
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
  2023
!
f6cfa2afc00a history list added
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
  2024
f6cfa2afc00a history list added
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
  2025
writeHistoryLogSince:timeGoal to:aStream
472
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
  2026
    "send a repositories historyLog to some stream"
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
  2027
855
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  2028
    ^ self 
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  2029
        writeHistoryLogSince:timeGoal 
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  2030
        filterSTSources:true 
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  2031
        filterUser:nil 
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  2032
        filterRepository:nil
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  2033
        to:aStream
147
f6cfa2afc00a history list added
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
  2034
f6cfa2afc00a history list added
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
  2035
    "Created: 13.12.1995 / 10:28:27 / cg"
472
111878eff048 comments
Claus Gittinger <cg@exept.de>
parents: 460
diff changeset
  2036
    "Modified: 12.9.1996 / 02:36:38 / cg"
147
f6cfa2afc00a history list added
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
  2037
!
f6cfa2afc00a history list added
Claus Gittinger <cg@exept.de>
parents: 138
diff changeset
  2038
96
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
  2039
writeRevisionLogMessagesFrom:log to:aStream
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
  2040
    "helper; send the revisionlog to aStream"
93
83042eccb8d1 revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
  2041
855
ba84e3e5572d made history more useful, by extracting the parsing code
Claus Gittinger <cg@exept.de>
parents: 853
diff changeset
  2042
    ^ self writeRevisionLogMessagesFrom:log withHeader:true to:aStream
138
386f2d831989 optional include header info in revision list
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
  2043
386f2d831989 optional include header info in revision list
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
  2044
    "Created: 10.12.1995 / 16:51:30 / cg"
386f2d831989 optional include header info in revision list
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
  2045
!
386f2d831989 optional include header info in revision list
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
  2046
386f2d831989 optional include header info in revision list
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
  2047
writeRevisionLogMessagesFrom:log withHeader:header to:aStream
386f2d831989 optional include header info in revision list
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
  2048
    "helper; send the revisionlog to aStream"
386f2d831989 optional include header info in revision list
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
  2049
1451
561003a458bb Show tags in revisionLog
Stefan Vogel <sv@exept.de>
parents: 1447
diff changeset
  2050
    |tags|
561003a458bb Show tags in revisionLog
Stefan Vogel <sv@exept.de>
parents: 1447
diff changeset
  2051
138
386f2d831989 optional include header info in revision list
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
  2052
    header ifTrue:[
179
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  2053
"/        (log at:#renamed ifAbsent:false) ifTrue:[
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  2054
"/            aStream nextPutAll:'  Class was probably renamed; revision info is from original class.'.
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  2055
"/            aStream cr; nextPutAll:'  You may have to create a new container for it.'.
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  2056
"/            aStream cr; cr.
0df4c85ebd1f fixes for new classes
Claus Gittinger <cg@exept.de>
parents: 174
diff changeset
  2057
"/        ].
138
386f2d831989 optional include header info in revision list
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
  2058
513
10707a1c366f use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 507
diff changeset
  2059
        aStream nextPutAll:'  Total revisions: '; nextPutLine:(log at:#numberOfRevisions) printString.
10707a1c366f use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 507
diff changeset
  2060
        aStream nextPutAll:'  Newest revision: '; nextPutLine:(log at:#newestRevision) printString.
1451
561003a458bb Show tags in revisionLog
Stefan Vogel <sv@exept.de>
parents: 1447
diff changeset
  2061
        tags := log at:#symbolicNames ifAbsent:nil.
561003a458bb Show tags in revisionLog
Stefan Vogel <sv@exept.de>
parents: 1447
diff changeset
  2062
        tags notNil ifTrue:[
561003a458bb Show tags in revisionLog
Stefan Vogel <sv@exept.de>
parents: 1447
diff changeset
  2063
            aStream nextPutAll:'  Stable revision: '; nextPutAll:(tags at:'stable' ifAbsent:'none'); cr.
561003a458bb Show tags in revisionLog
Stefan Vogel <sv@exept.de>
parents: 1447
diff changeset
  2064
            aStream nextPutAll:'  Symbolic names: '; cr.
561003a458bb Show tags in revisionLog
Stefan Vogel <sv@exept.de>
parents: 1447
diff changeset
  2065
            "sort tags by tag name"
561003a458bb Show tags in revisionLog
Stefan Vogel <sv@exept.de>
parents: 1447
diff changeset
  2066
            tags := tags associations sort:[:a :b| a key < b key].
561003a458bb Show tags in revisionLog
Stefan Vogel <sv@exept.de>
parents: 1447
diff changeset
  2067
            tags do:[:eachAssociation|
561003a458bb Show tags in revisionLog
Stefan Vogel <sv@exept.de>
parents: 1447
diff changeset
  2068
                aStream tab; nextPutAll:eachAssociation key; 
561003a458bb Show tags in revisionLog
Stefan Vogel <sv@exept.de>
parents: 1447
diff changeset
  2069
                             nextPutAll:': '; 
561003a458bb Show tags in revisionLog
Stefan Vogel <sv@exept.de>
parents: 1447
diff changeset
  2070
                             nextPutAll:eachAssociation value; cr.
561003a458bb Show tags in revisionLog
Stefan Vogel <sv@exept.de>
parents: 1447
diff changeset
  2071
            ]
561003a458bb Show tags in revisionLog
Stefan Vogel <sv@exept.de>
parents: 1447
diff changeset
  2072
        ].
96
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
  2073
    ].
93
83042eccb8d1 revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
  2074
83042eccb8d1 revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
  2075
    (log at:#revisions) do:[:entry |
127
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  2076
        |logMsg|
96
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
  2077
127
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  2078
        aStream cr.
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  2079
        aStream nextPutAll:'  revision '; nextPutAll:(entry at:#revision); tab.
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  2080
        aStream nextPutAll:' date: '; nextPutAll:(entry at:#date); tab.
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  2081
        aStream nextPutAll:' author: '; nextPutAll:(entry at:#author); tab.
1451
561003a458bb Show tags in revisionLog
Stefan Vogel <sv@exept.de>
parents: 1447
diff changeset
  2082
        aStream nextPutAll:' lines: '; nextPutAll:(entry at:#numberOfChangedLines); cr.
93
83042eccb8d1 revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
  2083
127
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  2084
        logMsg := entry at:#logMessage.
1467
26f9edcb3542 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1463
diff changeset
  2085
        (logMsg isBlank or:[logMsg withoutSeparators = '.']) ifTrue:[
127
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  2086
            logMsg := '*** empty log message ***'
7686a4413407 more protocol to create containers for new classes
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
  2087
        ].
513
10707a1c366f use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 507
diff changeset
  2088
        aStream tab; nextPutLine:logMsg.
93
83042eccb8d1 revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
  2089
    ].
96
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
  2090
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
  2091
    "Created: 16.11.1995 / 13:25:30 / cg"
513
10707a1c366f use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 507
diff changeset
  2092
    "Modified: 8.11.1996 / 23:52:48 / cg"
549
8b4035c43732 Add lines: +xx -yy to revision log.
Stefan Vogel <sv@exept.de>
parents: 545
diff changeset
  2093
    "Modified: 27.11.1996 / 18:26:30 / stefan"
73
90ab44bd6bff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 72
diff changeset
  2094
!
90ab44bd6bff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 72
diff changeset
  2095
77
4cc959f6b639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 75
diff changeset
  2096
writeRevisionLogOf:aClass fromRevision:rev1 toRevision:rev2 to:aStream
73
90ab44bd6bff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 72
diff changeset
  2097
    "extract a classes log and append it to aStream."
90ab44bd6bff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 72
diff changeset
  2098
96
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
  2099
    |log |
73
90ab44bd6bff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 72
diff changeset
  2100
96
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
  2101
    log := self revisionLogOf:aClass fromRevision:rev1 toRevision:rev2.
545
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
  2102
    log isNil ifTrue:[
1024
7344e4e24b1c missing repository-log message beautified
Claus Gittinger <cg@exept.de>
parents: 1021
diff changeset
  2103
        aStream cr; nextPutAll:'  ** No revision log available **'.
545
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
  2104
        ^ false
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
  2105
    ].
96
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
  2106
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
  2107
    self writeRevisionLogMessagesFrom:log to:aStream.
326cccce2fe7 now also look at revisionInfo
Claus Gittinger <cg@exept.de>
parents: 95
diff changeset
  2108
    ^ true
73
90ab44bd6bff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 72
diff changeset
  2109
90ab44bd6bff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 72
diff changeset
  2110
    "
77
4cc959f6b639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 75
diff changeset
  2111
     SourceCodeManager writeRevisionLogOf:Array fromRevision:'1.40' toRevision:'1.43' to:Transcript 
73
90ab44bd6bff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 72
diff changeset
  2112
    "
90ab44bd6bff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 72
diff changeset
  2113
90ab44bd6bff checkin from browser
Claus Gittinger <cg@exept.de>
parents: 72
diff changeset
  2114
    "Created: 6.11.1995 / 18:56:00 / cg"
545
198957db4e32 restructured & added demo classes
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
  2115
    "Modified: 14.2.1997 / 21:11:57 / cg"
77
4cc959f6b639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 75
diff changeset
  2116
!
4cc959f6b639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 75
diff changeset
  2117
87
e0f5b58481a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 83
diff changeset
  2118
writeRevisionLogOf:aClass to:aStream
e0f5b58481a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 83
diff changeset
  2119
    "extract a classes log and append it to aStream."
e0f5b58481a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 83
diff changeset
  2120
e0f5b58481a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 83
diff changeset
  2121
    ^ self
e0f5b58481a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 83
diff changeset
  2122
	writeRevisionLogOf:aClass fromRevision:nil toRevision:nil to:aStream
77
4cc959f6b639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 75
diff changeset
  2123
87
e0f5b58481a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 83
diff changeset
  2124
    "
e0f5b58481a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 83
diff changeset
  2125
     SourceCodeManager writeRevisionLogOf:Array to:Transcript 
e0f5b58481a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 83
diff changeset
  2126
    "
e0f5b58481a6 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 83
diff changeset
  2127
! !
77
4cc959f6b639 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 75
diff changeset
  2128
1205
41ebb97c4ee6 Remove unused method vars
Stefan Vogel <sv@exept.de>
parents: 1202
diff changeset
  2129
!AbstractSourceCodeManager class methodsFor:'subclass responsibility'!
41ebb97c4ee6 Remove unused method vars
Stefan Vogel <sv@exept.de>
parents: 1202
diff changeset
  2130
41ebb97c4ee6 Remove unused method vars
Stefan Vogel <sv@exept.de>
parents: 1202
diff changeset
  2131
reportHistoryLogSince:timeGoal filterSTSources:filter filterUser:userFilter 
41ebb97c4ee6 Remove unused method vars
Stefan Vogel <sv@exept.de>
parents: 1202
diff changeset
  2132
        filterRepository:repositoryFilter filterModules:moduleFilter inTo:aBlock
41ebb97c4ee6 Remove unused method vars
Stefan Vogel <sv@exept.de>
parents: 1202
diff changeset
  2133
41ebb97c4ee6 Remove unused method vars
Stefan Vogel <sv@exept.de>
parents: 1202
diff changeset
  2134
    ^ self subclassResponsibility
41ebb97c4ee6 Remove unused method vars
Stefan Vogel <sv@exept.de>
parents: 1202
diff changeset
  2135
! !
41ebb97c4ee6 Remove unused method vars
Stefan Vogel <sv@exept.de>
parents: 1202
diff changeset
  2136
1527
8e5b083fefca *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1523
diff changeset
  2137
!AbstractSourceCodeManager class methodsFor:'testing'!
8e5b083fefca *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1523
diff changeset
  2138
8e5b083fefca *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1523
diff changeset
  2139
isCVS
8e5b083fefca *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1523
diff changeset
  2140
    ^ false
8e5b083fefca *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1523
diff changeset
  2141
8e5b083fefca *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1523
diff changeset
  2142
    "Created: / 16-08-2006 / 10:58:27 / cg"
8e5b083fefca *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1523
diff changeset
  2143
!
8e5b083fefca *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1523
diff changeset
  2144
8e5b083fefca *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1523
diff changeset
  2145
isExperimental
8e5b083fefca *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1523
diff changeset
  2146
    ^ false
8e5b083fefca *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1523
diff changeset
  2147
8e5b083fefca *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1523
diff changeset
  2148
    "Created: / 16-08-2006 / 11:22:47 / cg"
8e5b083fefca *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1523
diff changeset
  2149
!
8e5b083fefca *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1523
diff changeset
  2150
8e5b083fefca *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1523
diff changeset
  2151
isStore
8e5b083fefca *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1523
diff changeset
  2152
    ^ false
8e5b083fefca *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1523
diff changeset
  2153
8e5b083fefca *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1523
diff changeset
  2154
    "Created: / 16-08-2006 / 10:59:26 / cg"
8e5b083fefca *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1523
diff changeset
  2155
! !
8e5b083fefca *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1523
diff changeset
  2156
513
10707a1c366f use #nextPutLine instead of #nextPutAll; #cr
Claus Gittinger <cg@exept.de>
parents: 507
diff changeset
  2157
!AbstractSourceCodeManager class methodsFor:'documentation'!
93
83042eccb8d1 revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
  2158
83042eccb8d1 revisionLogOf... extracts the log manager dependent; writeRevisionLog is now here
Claus Gittinger <cg@exept.de>
parents: 87
diff changeset
  2159
version
1527
8e5b083fefca *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1523
diff changeset
  2160
    ^ '$Header: /cvs/stx/stx/libbasic3/AbstractSourceCodeManager.st,v 1.182 2006-08-16 09:26:43 cg Exp $'
123
9a1dff152656 dummy entries to check-for & create modules & directories
Claus Gittinger <cg@exept.de>
parents: 122
diff changeset
  2161
! !
1202
86cb235976ab *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1161
diff changeset
  2162
158
27f76f9d8a25 preparations of workTree-stuff
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
  2163
AbstractSourceCodeManager initialize!