author | Claus Gittinger <cg@exept.de> |
Mon, 14 May 2018 02:21:18 +0200 | |
changeset 1048 | 582b3a028cbc |
parent 1047 | 71460ee79b0f |
permissions | -rw-r--r-- |
1047 | 1 |
"{ Encoding: utf8 }" |
2 |
||
344 | 3 |
"{ Package: 'stx:goodies/monticello' }" |
4 |
||
1047 | 5 |
"{ NameSpace: Smalltalk }" |
6 |
||
344 | 7 |
AbstractSourceCodeManager subclass:#MCSourceCodeManager |
683 | 8 |
instanceVariableNames:'' |
9 |
classVariableNames:'' |
|
10 |
poolDictionaries:'' |
|
11 |
category:'SCM-Monticello-St/X support' |
|
344 | 12 |
! |
13 |
||
14 |
||
512 | 15 |
!MCSourceCodeManager class methodsFor:'accessing'! |
16 |
||
513
5172fd274198
added: #repositoryNameForPackage:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
512
diff
changeset
|
17 |
repositoryNameForPackage:packageId |
512 | 18 |
"superclass AbstractSourceCodeManager class says that I am responsible to implement this method" |
513
5172fd274198
added: #repositoryNameForPackage:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
512
diff
changeset
|
19 |
|
512 | 20 |
^ self shouldImplement |
21 |
! ! |
|
22 |
||
344 | 23 |
!MCSourceCodeManager class methodsFor:'basic access'! |
24 |
||
25 |
checkinClass:aClass fileName:classFileName directory:packageDir module:moduleDir source:sourceFile logMessage:logMessage force:force |
|
26 |
"checkin of a class into the source repository. |
|
27 |
Return true if ok, false if not." |
|
28 |
||
29 |
^ self shouldImplement |
|
30 |
! |
|
31 |
||
533 | 32 |
checkinPackage:packageId |
33 |
| mcPackage workingCopy | |
|
34 |
||
35 |
mcPackage := MCPackage named: packageId. |
|
36 |
workingCopy := mcPackage workingCopy. |
|
37 |
MCCommitDialog new |
|
38 |
workingCopy: workingCopy; |
|
39 |
open |
|
40 |
||
41 |
"Created: / 14-09-2010 / 22:54:28 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
42 |
"Modified (format): / 01-12-2011 / 21:47:18 / cg" |
|
43 |
"Created: / 02-12-2011 / 14:42:51 / cg" |
|
44 |
! |
|
45 |
||
344 | 46 |
checkoutModule:aModule directory:aPackage andDo:aBlock |
47 |
"check out everything from a package into a temporary directory. |
|
48 |
Then evaluate aBlock, passing the name of that temp-directory. |
|
49 |
Afterwards, the tempDir is removed. |
|
50 |
Return true, if OK, false if any error occurred." |
|
51 |
||
52 |
^ self shouldImplement |
|
53 |
! |
|
54 |
||
55 |
streamForClass:aClass fileName:classFileName revision:revision directory:packageDir module:moduleDir cache:doCache |
|
56 |
"extract a classes source code and return an open readStream on it. |
|
57 |
A revision of nil selects the current (in image) revision. |
|
58 |
The classes source code is extracted using the revision and the sourceCodeInfo, |
|
59 |
which itself is extracted from the classes packageString." |
|
60 |
||
61 |
^ self shouldImplement |
|
62 |
! ! |
|
63 |
||
64 |
!MCSourceCodeManager class methodsFor:'basic administration'! |
|
65 |
||
66 |
checkForExistingContainer:fileName inModule:moduleName directory:dirName |
|
67 |
"check for a container to be present" |
|
68 |
||
69 |
^ self shouldImplement |
|
70 |
! |
|
71 |
||
72 |
checkForExistingModule:moduleName |
|
73 |
"check for a module directory to be present" |
|
74 |
||
75 |
^ self shouldImplement |
|
76 |
! |
|
77 |
||
78 |
checkForExistingModule:moduleDir directory:packageDir |
|
79 |
"check for a package directory to be present" |
|
80 |
||
81 |
^ self shouldImplement |
|
82 |
! |
|
83 |
||
84 |
createContainerFor:aClass inModule:moduleName directory:dirName container:fileName |
|
85 |
"create a new container & check into it an initial version of aClass" |
|
86 |
||
87 |
^ self shouldImplement |
|
88 |
! |
|
89 |
||
90 |
createModule:moduleName |
|
91 |
"create a new module directory" |
|
92 |
||
93 |
^ self shouldImplement |
|
94 |
! |
|
95 |
||
96 |
createModule:module directory:directory |
|
97 |
"create a new package directory" |
|
98 |
||
99 |
^ self shouldImplement |
|
100 |
! |
|
101 |
||
102 |
initialRevisionStringFor:aClass inModule:moduleDir directory:packageDir container:fileName |
|
103 |
"return a string usable as initial revision string" |
|
104 |
||
105 |
^ self shouldImplement |
|
106 |
! |
|
107 |
||
108 |
revisionLogOf:clsOrNil fromRevision:rev1OrNil toRevision:rev2OrNil numberOfRevisions:limitOrNil fileName:classFileName directory:packageDir module:moduleDir |
|
109 |
"actually do return a revisionLog. The main worker method. |
|
110 |
This must be implemented by a concrete source-code manager" |
|
111 |
||
112 |
^ self shouldImplement |
|
113 |
! ! |
|
114 |
||
533 | 115 |
!MCSourceCodeManager class methodsFor:'misc'! |
116 |
||
117 |
forgetDisabledModules |
|
118 |
||
119 |
"Nothing to do" |
|
120 |
||
121 |
"Created: / 10-06-2011 / 14:11:03 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
122 |
! |
|
123 |
||
124 |
revisionStringForVersion:anMCVersion |
|
125 |
|info| |
|
126 |
||
127 |
info := anMCVersion info. |
|
128 |
||
129 |
^ '%1 %2 %3 %4' |
|
130 |
bindWith:info name |
|
131 |
with:info id |
|
1047 | 132 |
with:info timeStamp printStringIso8601 |
533 | 133 |
with:info author |
134 |
||
135 |
"Created: / 02-12-2011 / 14:25:05 / cg" |
|
136 |
! |
|
137 |
||
138 |
savePreferencesOn:aFileStream |
|
139 |
||
140 |
"Nothing to do now..." |
|
141 |
||
142 |
"Created: / 10-06-2011 / 14:16:12 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
143 |
! ! |
|
144 |
||
344 | 145 |
!MCSourceCodeManager class methodsFor:'queries'! |
146 |
||
512 | 147 |
isResponsibleForPackage:aStringOrSymbol |
530
1180940eea58
changed: #isResponsibleForPackage:
Claus Gittinger <cg@exept.de>
parents:
527
diff
changeset
|
148 |
"Answering true does not imply that receiver is configured default |
1180940eea58
changed: #isResponsibleForPackage:
Claus Gittinger <cg@exept.de>
parents:
527
diff
changeset
|
149 |
manager for that package, it only means that it has a repository |
1180940eea58
changed: #isResponsibleForPackage:
Claus Gittinger <cg@exept.de>
parents:
527
diff
changeset
|
150 |
configured for given package." |
512 | 151 |
|
530
1180940eea58
changed: #isResponsibleForPackage:
Claus Gittinger <cg@exept.de>
parents:
527
diff
changeset
|
152 |
"The real check is too slow. Cache needed here" |
1180940eea58
changed: #isResponsibleForPackage:
Claus Gittinger <cg@exept.de>
parents:
527
diff
changeset
|
153 |
^ true. |
1180940eea58
changed: #isResponsibleForPackage:
Claus Gittinger <cg@exept.de>
parents:
527
diff
changeset
|
154 |
|
1180940eea58
changed: #isResponsibleForPackage:
Claus Gittinger <cg@exept.de>
parents:
527
diff
changeset
|
155 |
"Modified (format): / 01-12-2011 / 20:57:20 / cg" |
512 | 156 |
! |
157 |
||
527
35e176be9ee9
category of: #managerTypeName
Claus Gittinger <cg@exept.de>
parents:
513
diff
changeset
|
158 |
managerTypeName |
35e176be9ee9
category of: #managerTypeName
Claus Gittinger <cg@exept.de>
parents:
513
diff
changeset
|
159 |
|
35e176be9ee9
category of: #managerTypeName
Claus Gittinger <cg@exept.de>
parents:
513
diff
changeset
|
160 |
^'Monticello 1.x' |
533 | 161 |
"/ ^'Monticello' |
527
35e176be9ee9
category of: #managerTypeName
Claus Gittinger <cg@exept.de>
parents:
513
diff
changeset
|
162 |
|
35e176be9ee9
category of: #managerTypeName
Claus Gittinger <cg@exept.de>
parents:
513
diff
changeset
|
163 |
"Created: / 26-10-2010 / 21:52:51 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
533 | 164 |
"Modified: / 03-12-2011 / 11:33:14 / cg" |
165 |
! |
|
166 |
||
167 |
managerTypeNameShort |
|
168 |
"Answers short version manager name suitable for UI, |
|
169 |
i,e., CVS, SVN, P4. Used in cases where sorter strings |
|
170 |
are preferred. Defaults to #managerTypeName" |
|
171 |
||
172 |
^ 'MC' |
|
173 |
||
174 |
"Created: / 03-10-2011 / 13:28:50 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
175 |
"Modified: / 04-12-2011 / 10:15:18 / cg" |
|
176 |
! |
|
177 |
||
178 |
nameOfVersionMethodForExtensions |
|
179 |
^ #'extensionsVersion_MC' |
|
180 |
||
181 |
"Modified: / 02-12-2011 / 14:01:40 / cg" |
|
182 |
! |
|
183 |
||
184 |
nameOfVersionMethodInClasses |
|
185 |
^ #'version_MC' |
|
186 |
||
187 |
"Modified: / 02-12-2011 / 14:01:49 / cg" |
|
527
35e176be9ee9
category of: #managerTypeName
Claus Gittinger <cg@exept.de>
parents:
513
diff
changeset
|
188 |
! |
35e176be9ee9
category of: #managerTypeName
Claus Gittinger <cg@exept.de>
parents:
513
diff
changeset
|
189 |
|
344 | 190 |
settingsApplicationClass |
191 |
"link to my settings application (needed for the settings dialog" |
|
192 |
||
193 |
^ MCSettingsApp |
|
194 |
||
195 |
"Modified: / 20-07-2011 / 16:52:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
196 |
! ! |
|
197 |
||
198 |
!MCSourceCodeManager class methodsFor:'source code administration'! |
|
199 |
||
200 |
getExistingContainersInModule:aModule directory:aPackage |
|
201 |
"{ Pragma: +optSpace }" |
|
202 |
||
203 |
^ self shouldImplement |
|
204 |
! |
|
205 |
||
206 |
getExistingDirectoriesInModule:aModule |
|
207 |
"{ Pragma: +optSpace }" |
|
208 |
||
209 |
^ self shouldImplement |
|
210 |
! |
|
211 |
||
212 |
getExistingModules |
|
213 |
"{ Pragma: +optSpace }" |
|
214 |
||
215 |
^ self shouldImplement |
|
216 |
! |
|
217 |
||
218 |
revisionInfoFromString:aString |
|
219 |
"{ Pragma: +optSpace }" |
|
220 |
||
533 | 221 |
^ MCStxVersionInfo fromMCVersionString:aString |
222 |
||
223 |
"Modified: / 04-12-2011 / 10:05:06 / cg" |
|
344 | 224 |
! ! |
225 |
||
226 |
!MCSourceCodeManager class methodsFor:'subclass responsibility'! |
|
227 |
||
228 |
reportHistoryLogSince:timeGoal filterSTSources:filter filterUser:userFilter filterRepository:repositoryFilter filterModules:moduleFilter inTo:aBlock |
|
229 |
"superclass AbstractSourceCodeManager class says that I am responsible to implement this method" |
|
230 |
||
231 |
^ self shouldImplement |
|
232 |
! ! |
|
233 |
||
234 |
!MCSourceCodeManager class methodsFor:'documentation'! |
|
235 |
||
236 |
version |
|
1047 | 237 |
^ '$Header$' |
344 | 238 |
! |
239 |
||
240 |
version_CVS |
|
1047 | 241 |
^ '$Header$' |
344 | 242 |
! |
243 |
||
244 |
version_SVN |
|
1047 | 245 |
^ '$Id$' |
344 | 246 |
! ! |
1047 | 247 |