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