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