author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Tue, 13 Mar 2012 19:12:43 +0100 | |
changeset 1061 | 1bd5efd9d6f2 |
parent 1059 | f37fb1ed1182 |
child 1064 | 6329f1ac5763 |
permissions | -rw-r--r-- |
665 | 1 |
" |
2 |
Copyright (c) 2007-2010 Jan Vrany |
|
3 |
Copyright (c) 2009-2010 eXept Software AG |
|
4 |
||
5 |
Permission is hereby granted, free of charge, to any person |
|
6 |
obtaining a copy of this software and associated documentation |
|
7 |
files (the 'Software'), to deal in the Software without |
|
8 |
restriction, including without limitation the rights to use, |
|
9 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
10 |
copies of the Software, and to permit persons to whom the |
|
11 |
Software is furnished to do so, subject to the following |
|
12 |
conditions: |
|
13 |
||
14 |
The above copyright notice and this permission notice shall be |
|
15 |
included in all copies or substantial portions of the Software. |
|
16 |
||
17 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
18 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
19 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
20 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
21 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
22 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
23 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
24 |
OTHER DEALINGS IN THE SOFTWARE. |
|
25 |
" |
|
482 | 26 |
"{ Package: 'stx:libsvn' }" |
378 | 27 |
|
28 |
AbstractSourceCodeManager subclass:#SVNSourceCodeManager |
|
956 | 29 |
instanceVariableNames:'' |
30 |
classVariableNames:'LoadInProgressQuery' |
|
31 |
poolDictionaries:'' |
|
32 |
category:'System-SourceCodeManagement' |
|
955 | 33 |
! |
34 |
||
35 |
SourceCodeManagerUtilities subclass:#Utilities |
|
956 | 36 |
instanceVariableNames:'' |
37 |
classVariableNames:'' |
|
38 |
poolDictionaries:'' |
|
39 |
privateIn:SVNSourceCodeManager |
|
378 | 40 |
! |
41 |
||
42 |
!SVNSourceCodeManager class methodsFor:'documentation'! |
|
43 |
||
665 | 44 |
copyright |
45 |
" |
|
46 |
Copyright (c) 2007-2010 Jan Vrany |
|
47 |
Copyright (c) 2009-2010 eXept Software AG |
|
48 |
||
49 |
Permission is hereby granted, free of charge, to any person |
|
50 |
obtaining a copy of this software and associated documentation |
|
51 |
files (the 'Software'), to deal in the Software without |
|
52 |
restriction, including without limitation the rights to use, |
|
53 |
copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
54 |
copies of the Software, and to permit persons to whom the |
|
55 |
Software is furnished to do so, subject to the following |
|
56 |
conditions: |
|
57 |
||
58 |
The above copyright notice and this permission notice shall be |
|
59 |
included in all copies or substantial portions of the Software. |
|
60 |
||
61 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
|
62 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
|
63 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
|
64 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
|
65 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
|
66 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
|
67 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
|
68 |
OTHER DEALINGS IN THE SOFTWARE. |
|
69 |
||
70 |
" |
|
71 |
! |
|
72 |
||
378 | 73 |
documentation |
74 |
" |
|
75 |
For now, this is a dummy SourceCodeManager. |
|
76 |
It is only provided to deliver the correct versionMethodNameTemplates |
|
77 |
and versionMethod names. |
|
78 |
||
79 |
Might get more in the future. |
|
80 |
" |
|
81 |
! ! |
|
82 |
||
955 | 83 |
!SVNSourceCodeManager class methodsFor:'* As yet uncategorized *'! |
84 |
||
85 |
checkin:filename text:contents directory:directory module:module logMessage: message force: force |
|
86 |
||
87 |
| branch wc status | |
|
88 |
||
89 |
self shouldImplement. |
|
90 |
||
91 |
branch := self branchForModule: module directory: directory. |
|
92 |
wc := branch repository workingCopy. |
|
93 |
wc ensureIsValid. |
|
94 |
(wc path / filename) writingFileDo:[:s|s nextPutAll: contents]. |
|
95 |
status := wc status: { filename }. |
|
96 |
||
97 |
"Created: / 27-11-2011 / 22:51:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
98 |
! |
|
99 |
||
100 |
removeContainer:container inModule:module directory:directory |
|
101 |
||
102 |
| repo wc | |
|
103 |
repo := self repositoryForModule: module directory: directory. |
|
104 |
repo isNil ifTrue:[ |
|
105 |
self error:'No SVN repository'. |
|
106 |
^self |
|
107 |
]. |
|
108 |
wc := repo workingCopy. |
|
109 |
wc delete: container |
|
110 |
||
111 |
"Created: / 23-12-2011 / 18:20:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
112 |
! ! |
|
113 |
||
665 | 114 |
!SVNSourceCodeManager class methodsFor:'Signal constants'! |
115 |
||
116 |
loadInProgressQuery |
|
117 |
||
118 |
LoadInProgressQuery ifNil: |
|
955 | 119 |
[LoadInProgressQuery := QuerySignal new]. |
665 | 120 |
^LoadInProgressQuery |
121 |
! ! |
|
122 |
||
955 | 123 |
!SVNSourceCodeManager class methodsFor:'accessing'! |
124 |
||
125 |
repositoryNameForPackage:packageId |
|
126 |
"superclass AbstractSourceCodeManager class says that I am responsible to implement this method" |
|
127 |
||
128 |
|repo| |
|
129 |
||
130 |
repo := SVN::RepositoryManager current repositoryForPackage:packageId. |
|
131 |
repo isNil ifTrue:[ |
|
132 |
^ 'N/A' |
|
133 |
] ifFalse:[ |
|
134 |
^ repo url asString |
|
135 |
] |
|
136 |
||
137 |
"Modified: / 10-10-2011 / 19:49:52 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
138 |
! |
|
139 |
||
968
6d8ea40478b6
added shownInBrowserMenus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
956
diff
changeset
|
140 |
shownInBrowserMenus |
6d8ea40478b6
added shownInBrowserMenus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
956
diff
changeset
|
141 |
"can be redefined in subclasses which can be suppressed in the browser's menus" |
6d8ea40478b6
added shownInBrowserMenus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
956
diff
changeset
|
142 |
|
6d8ea40478b6
added shownInBrowserMenus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
956
diff
changeset
|
143 |
^ UserPreferences current svnEnabled |
6d8ea40478b6
added shownInBrowserMenus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
956
diff
changeset
|
144 |
|
6d8ea40478b6
added shownInBrowserMenus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
956
diff
changeset
|
145 |
"Created: / 08-01-2012 / 19:56:22 / cg" |
6d8ea40478b6
added shownInBrowserMenus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
956
diff
changeset
|
146 |
"Created: / 19-01-2012 / 13:11:03 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
6d8ea40478b6
added shownInBrowserMenus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
956
diff
changeset
|
147 |
! |
6d8ea40478b6
added shownInBrowserMenus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
956
diff
changeset
|
148 |
|
6d8ea40478b6
added shownInBrowserMenus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
956
diff
changeset
|
149 |
shownInBrowserMenus:aBoolean |
6d8ea40478b6
added shownInBrowserMenus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
956
diff
changeset
|
150 |
"can be redefined in subclasses which can be suppressed in the browser's menus" |
6d8ea40478b6
added shownInBrowserMenus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
956
diff
changeset
|
151 |
|
6d8ea40478b6
added shownInBrowserMenus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
956
diff
changeset
|
152 |
^ UserPreferences current svnEnabled: aBoolean |
6d8ea40478b6
added shownInBrowserMenus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
956
diff
changeset
|
153 |
|
6d8ea40478b6
added shownInBrowserMenus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
956
diff
changeset
|
154 |
"Created: / 19-01-2012 / 13:11:19 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
6d8ea40478b6
added shownInBrowserMenus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
956
diff
changeset
|
155 |
! |
6d8ea40478b6
added shownInBrowserMenus
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
956
diff
changeset
|
156 |
|
955 | 157 |
utilities |
158 |
||
159 |
^Utilities forManager: self. |
|
160 |
||
161 |
"Created: / 11-10-2011 / 11:24:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
162 |
! ! |
|
163 |
||
665 | 164 |
!SVNSourceCodeManager class methodsFor:'basic access'! |
165 |
||
166 |
checkinClass:aClass fileName:classFileName directory:packageDir module:moduleDir source:sourceFile logMessage:logMessage force:force |
|
167 |
"checkin of a class into the source repository. |
|
168 |
Return true if ok, false if not." |
|
169 |
||
955 | 170 |
| repo | |
171 |
repo := SVN::RepositoryManager repositoryForModule: moduleDir directory: packageDir. |
|
172 |
repo ifNil:[^false]. |
|
173 |
||
174 |
self shouldImplement: 'Not yet finished'. |
|
175 |
||
176 |
^false |
|
177 |
||
178 |
"Modified: / 12-10-2011 / 18:50:55 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
665 | 179 |
! |
180 |
||
181 |
checkoutModule:aModule directory:aPackage andDo:aBlock |
|
182 |
"check out everything from a package into a temporary directory. |
|
183 |
Then evaluate aBlock, passing the name of that temp-directory. |
|
184 |
Afterwards, the tempDir is removed. |
|
185 |
Return true, if OK, false if any error occurred." |
|
186 |
||
187 |
| pkg tempDir repo workingCopy ok | |
|
188 |
pkg := (PackageId module: aModule directory: aPackage) asSymbol. |
|
189 |
repo := SVN::RepositoryManager repositoryForPackage: pkg. |
|
190 |
repo ifNil:[self error:('No repository for package %1' bindWith: pkg)]. |
|
191 |
[ok := false. |
|
192 |
tempDir := Filename newTemporaryDirectory. |
|
193 |
workingCopy := repo workingCopyIn: tempDir. |
|
194 |
workingCopy checkout. |
|
195 |
ok := true. |
|
196 |
aBlock value: tempDir] ensure: |
|
955 | 197 |
[[tempDir recursiveRemove] |
198 |
on: Error do: |
|
199 |
[:ex| |
|
956 | 200 |
OperatingSystem isMSWINDOWSlike |
955 | 201 |
ifTrue:[Delay waitForSeconds: 3.[tempDir recursiveRemove] on: Error do:["nothing"]] |
202 |
ifFalse:[ex pass]]]. |
|
665 | 203 |
^ok |
204 |
||
205 |
"Modified: / 19-04-2010 / 20:13:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
206 |
! |
|
207 |
||
208 |
streamForClass:aClass fileName:classFileName revision:revisionString directory:packageDir module:moduleDir cache:doCache |
|
209 |
"extract a classes source code and return an open readStream on it. |
|
210 |
A revision of nil selects the current (in image) revision. |
|
211 |
The classes source code is extracted using the revision and the sourceCodeInfo, |
|
212 |
which itself is extracted from the classes packageString." |
|
213 |
||
1061
1bd5efd9d6f2
workaround for CVS HEAD libbasic: #streamForClass:fileName:revision:directory:module:cache:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1059
diff
changeset
|
214 |
| pkg repo rev revInfo | |
665 | 215 |
pkg := moduleDir , ':' , packageDir. |
216 |
repo := SVN::RepositoryManager repositoryForPackage: pkg. |
|
955 | 217 |
repo ifNil:[^nil]. |
218 |
(revisionString notNil and:[revisionString ~~ #newest]) ifTrue:[ |
|
1061
1bd5efd9d6f2
workaround for CVS HEAD libbasic: #streamForClass:fileName:revision:directory:module:cache:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1059
diff
changeset
|
219 |
"JV@2012-03-13: HACK, as binaryRevision does not work reliably on |
1bd5efd9d6f2
workaround for CVS HEAD libbasic: #streamForClass:fileName:revision:directory:module:cache:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1059
diff
changeset
|
220 |
CVS HEAD, sigh" |
1bd5efd9d6f2
workaround for CVS HEAD libbasic: #streamForClass:fileName:revision:directory:module:cache:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1059
diff
changeset
|
221 |
revisionString ~= '0' ifTrue:[ |
1bd5efd9d6f2
workaround for CVS HEAD libbasic: #streamForClass:fileName:revision:directory:module:cache:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1059
diff
changeset
|
222 |
rev := SVN::Revision fromString: revisionString. |
1bd5efd9d6f2
workaround for CVS HEAD libbasic: #streamForClass:fileName:revision:directory:module:cache:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1059
diff
changeset
|
223 |
] ifFalse:[ |
1bd5efd9d6f2
workaround for CVS HEAD libbasic: #streamForClass:fileName:revision:directory:module:cache:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1059
diff
changeset
|
224 |
revInfo := aClass revisionInfoOfManager: self. |
1bd5efd9d6f2
workaround for CVS HEAD libbasic: #streamForClass:fileName:revision:directory:module:cache:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1059
diff
changeset
|
225 |
revInfo notNil ifTrue:[ |
1bd5efd9d6f2
workaround for CVS HEAD libbasic: #streamForClass:fileName:revision:directory:module:cache:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1059
diff
changeset
|
226 |
rev := revInfo revision |
1bd5efd9d6f2
workaround for CVS HEAD libbasic: #streamForClass:fileName:revision:directory:module:cache:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1059
diff
changeset
|
227 |
] ifFalse:[ |
1bd5efd9d6f2
workaround for CVS HEAD libbasic: #streamForClass:fileName:revision:directory:module:cache:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1059
diff
changeset
|
228 |
"Hmmm....what to se here?" |
1bd5efd9d6f2
workaround for CVS HEAD libbasic: #streamForClass:fileName:revision:directory:module:cache:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1059
diff
changeset
|
229 |
rev := SVN::Revision head |
1bd5efd9d6f2
workaround for CVS HEAD libbasic: #streamForClass:fileName:revision:directory:module:cache:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1059
diff
changeset
|
230 |
] |
1bd5efd9d6f2
workaround for CVS HEAD libbasic: #streamForClass:fileName:revision:directory:module:cache:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1059
diff
changeset
|
231 |
] |
955 | 232 |
] ifFalse:[ |
233 |
rev := SVN::Revision head. |
|
234 |
]. |
|
235 |
doCache ifTrue:[ |
|
236 |
^SourceCodeCache default |
|
237 |
streamForClass:aClass |
|
238 |
fileName:classFileName |
|
239 |
revision:revisionString |
|
240 |
repository: 'svn' "TODO: Use repository ID here" |
|
241 |
module:moduleDir |
|
242 |
directory:packageDir |
|
243 |
ifAbsent: [:destination| |
|
1059
f37fb1ed1182
changed: #streamForClass:fileName:revision:directory:module:cache:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1021
diff
changeset
|
244 |
ActivityNotification notify: ('Checking out ', classFileName , '@' , rev asString , '...'). |
955 | 245 |
[SVN::ExportCommand new |
246 |
branch: repo branch; |
|
247 |
path: classFileName; |
|
248 |
revision: rev; |
|
249 |
destination: destination pathName; |
|
250 |
execute. |
|
251 |
destination exists ifTrue:[ |
|
252 |
destination readStream |
|
253 |
] ifFalse:[ |
|
254 |
nil |
|
255 |
] |
|
256 |
] on: SVN::SVNError do:[ |
|
257 |
nil |
|
258 |
] |
|
259 |
] |
|
260 |
] ifFalse:[ |
|
261 |
^[ |
|
262 |
(repo cat: classFileName revision: rev) readStream |
|
263 |
] on: SVN::SVNError do:[ |
|
264 |
nil |
|
265 |
] |
|
266 |
] |
|
665 | 267 |
|
1059
f37fb1ed1182
changed: #streamForClass:fileName:revision:directory:module:cache:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1021
diff
changeset
|
268 |
"Modified: / 13-03-2012 / 15:33:50 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1061
1bd5efd9d6f2
workaround for CVS HEAD libbasic: #streamForClass:fileName:revision:directory:module:cache:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1059
diff
changeset
|
269 |
"Modified: / 13-03-2012 / 18:11:10 / Jan Vrany <jan.vrany.fit.cvut.cz>" |
665 | 270 |
! ! |
271 |
||
272 |
!SVNSourceCodeManager class methodsFor:'basic administration'! |
|
273 |
||
274 |
checkForExistingContainer:fileName inModule:moduleName directory:dirName |
|
275 |
"check for a container to be present" |
|
276 |
||
955 | 277 |
| repo | |
278 |
repo := SVN::RepositoryManager repositoryForModule: moduleName directory: dirName. |
|
279 |
repo isNil ifTrue:[^self]. |
|
280 |
^repo branch exists: fileName. |
|
281 |
||
282 |
"Modified: / 11-10-2011 / 11:15:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
665 | 283 |
! |
284 |
||
285 |
checkForExistingModule:moduleName |
|
286 |
"check for a module directory to be present" |
|
287 |
||
288 |
^ self shouldImplement |
|
289 |
! |
|
290 |
||
291 |
checkForExistingModule:moduleDir directory:packageDir |
|
292 |
"check for a package directory to be present" |
|
293 |
||
955 | 294 |
| pkg repo | |
295 |
pkg := moduleDir , ':' , packageDir. |
|
296 |
repo := SVN::RepositoryManager repositoryForPackage: pkg. |
|
297 |
^repo exists |
|
298 |
||
299 |
"Modified: / 27-11-2011 / 22:46:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
665 | 300 |
! |
301 |
||
302 |
createContainerFor:aClass inModule:moduleName directory:dirName container:fileName |
|
303 |
"create a new container & check into it an initial version of aClass" |
|
304 |
||
305 |
^ self shouldImplement |
|
306 |
! |
|
307 |
||
308 |
createModule:moduleName |
|
309 |
"create a new module directory" |
|
310 |
||
311 |
^ self shouldImplement |
|
312 |
! |
|
313 |
||
314 |
createModule:module directory:directory |
|
315 |
"create a new package directory" |
|
316 |
||
317 |
^ self shouldImplement |
|
318 |
! |
|
319 |
||
320 |
initialRevisionStringFor:aClass inModule:moduleDir directory:packageDir container:fileName |
|
321 |
"return a string usable as initial revision string" |
|
322 |
||
323 |
^ self shouldImplement |
|
324 |
! |
|
325 |
||
326 |
revisionLogOf:clsOrNil fromRevision:rev1OrNil toRevision:rev2OrNil numberOfRevisions:limitOrNil fileName:classFileName directory:packageDir module:moduleDir |
|
955 | 327 |
"Actually do return a revisionLog. The main worker method." |
328 |
" |
|
329 |
If numRevisionsOrNil is notNil, it limits the number of revision records returned - |
|
330 |
only numRevions of the newest revision infos will be collected. |
|
331 |
||
332 |
The returned information is a structure (IdentityDictionary) |
|
333 |
filled with: |
|
334 |
#container -> the RCS/CVS container file name |
|
335 |
#cvsRoot -> the CVS root (repository) |
|
336 |
#filename -> the actual source file name |
|
337 |
#newestRevision -> the revisionString of the newest revision |
|
338 |
#numberOfRevisions -> the number of revisions in the container (nil for all) |
|
339 |
#revisions -> collection of per-revision info (see below) |
|
340 |
||
341 |
firstRevOrNil / lastRevOrNil specify from which revisions a logEntry is wanted: |
|
342 |
-If firstRevOrNil is nil, the first revision is the initial revision |
|
343 |
otherwise, the log starts with that revision. |
|
344 |
-If lastRevOrNil is nil, the last revision is the newest revision |
|
345 |
otherwise, the log ends with that revision. |
|
346 |
||
347 |
-If both are nil, all logEntries are extracted. |
|
348 |
-If both are 0 (not nil), no logEntries are extracted (i.e. only the header). |
|
349 |
||
350 |
per revision info consists of one record per revision: |
|
351 |
||
352 |
#revision -> the revision string |
|
353 |
#author -> who checked that revision into the repository |
|
354 |
#date -> when was it checked in |
|
355 |
#state -> the RCS state |
|
356 |
#numberOfChangedLines -> the number of changed line w.r.t the previous |
|
357 |
#logMessage -> the checkIn log message |
|
358 |
||
359 |
revisions are ordered newest first |
|
360 |
(i.e. the last entry is for the initial revision; the first for the most recent one) |
|
361 |
Attention: if state = 'dead' that revision is no longer valid. |
|
362 |
" |
|
363 |
||
364 |
| repo log rev1 rev2 limit branch info | |
|
365 |
||
366 |
repo := SVN::RepositoryManager repositoryForModule: moduleDir directory: packageDir. |
|
367 |
repo isNil ifTrue:[^nil"No repository..."]. |
|
368 |
||
369 |
(rev1OrNil == 0 and:[rev2OrNil == 0]) ifTrue:[ |
|
370 |
rev1 := SVN::Revision number:0. |
|
371 |
rev2 := SVN::Revision head. |
|
372 |
limit := 1. |
|
373 |
] ifFalse:[ |
|
374 |
(rev1OrNil == nil and:[rev2OrNil == nil]) ifTrue:[ |
|
375 |
rev1 := SVN::Revision number:0. |
|
376 |
rev2 := SVN::Revision head. |
|
377 |
limit := limitOrNil. |
|
378 |
] ifFalse:[ |
|
379 |
rev1 := SVN::Revision number: rev1OrNil ? 0. |
|
380 |
rev2 := rev1OrNil isNil ifTrue:[SVN::Revision head] ifFalse:[SVN::Revision number: rev2OrNil]. |
|
381 |
limit := limitOrNil. |
|
382 |
self breakPoint: #jv info: 'Review'. |
|
383 |
] |
|
384 |
]. |
|
385 |
branch := self branchForModule: moduleDir directory: packageDir. |
|
386 |
branch isNil ifTrue:[ |
|
387 |
self breakPoint: #jv. |
|
388 |
self error:('No branch for package %1:%2' bindWith: moduleDir with: packageDir) mayProceed: true. |
|
389 |
^self |
|
390 |
]. |
|
665 | 391 |
|
955 | 392 |
log := branch log: classFileName limit: limit revisions: (rev2 to: rev1). |
393 |
info := IdentityDictionary new. |
|
394 |
info at:#container put: classFileName. "/ -> the revision string |
|
395 |
info at:#cvsRoot put: branch url asString. "/ -> the CVS root (repository) |
|
396 |
info at:#filename put: classFileName. "/ -> the actual source file name |
|
397 |
info at:#newestRevision put: log first revision asString. "/-> the revisionString of the newest revision |
|
398 |
info at:#numberOfRevisions put: log size. "/-> the number of revisions in the container (nil for all) |
|
399 |
info at:#revisions put: (log collect:[:entry| |
|
400 |
||
401 |
| info | |
|
402 |
info := IdentityDictionary new. |
|
403 |
info at:#revision put: entry revision asString."/ -> the revision string |
|
404 |
info at:#author put: entry author."/ -> who checked that revision into the repository |
|
405 |
info at:#date put: entry date printString."/ -> when was it checked in |
|
406 |
info at:#state put: 'Exp'. "/ -> the RCS state |
|
407 |
info at:#numberOfChangedLines put: 'N/A'. "/ -> the number of changed line w.r.t the previous |
|
408 |
info at:#logMessage put: entry message."/ -> the checkIn log message. |
|
409 |
info |
|
410 |
]). |
|
411 |
||
412 |
||
413 |
^info |
|
414 |
||
415 |
" |
|
416 |
SVNSourceCodeManager revisionLogOf:Array fromRevision:0 toRevision:0. |
|
417 |
SVNSourceCodeManager revisionLogOf:Array fromRevision:'10000' toRevision:'10005' |
|
418 |
" |
|
419 |
||
420 |
"Modified: / 18-11-2011 / 16:11:41 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
421 |
! ! |
|
422 |
||
956 | 423 |
!SVNSourceCodeManager class methodsFor:'misc'! |
424 |
||
425 |
savePreferencesOn:aFileStream |
|
426 |
||
427 |
"Nothing to do, since my preferences are stored in |
|
428 |
UserPreferences dictionary" |
|
429 |
||
430 |
"Created: / 10-06-2011 / 14:15:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
431 |
! ! |
|
432 |
||
955 | 433 |
!SVNSourceCodeManager class methodsFor:'private'! |
434 |
||
435 |
branchForModule: module directory: directory |
|
436 |
||
437 |
| repo | |
|
438 |
repo := self repositoryForModule: module directory: directory . |
|
439 |
^repo notNil ifTrue:[ |
|
440 |
repo branch |
|
441 |
] ifFalse:[ |
|
442 |
nil |
|
443 |
] |
|
444 |
||
445 |
"Created: / 15-10-2011 / 16:26:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
446 |
! |
|
447 |
||
448 |
branchForPackage: package |
|
449 |
||
450 |
| repo | |
|
451 |
repo := SVN::RepositoryManager repositoryForPackage: package. |
|
452 |
^repo notNil ifTrue:[ |
|
453 |
repo branch |
|
454 |
] ifFalse:[ |
|
455 |
nil |
|
456 |
] |
|
457 |
||
458 |
"Created: / 15-10-2011 / 23:26:34 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
459 |
! |
|
460 |
||
461 |
pathInRepositoryFrom:containerPath forPackage:packageID |
|
462 |
||
463 |
^nil |
|
464 |
||
465 |
"Created: / 13-10-2011 / 11:32:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
466 |
! |
|
467 |
||
468 |
repositoryForModule: module directory: directory |
|
469 |
||
470 |
| repo | |
|
471 |
repo := SVN::RepositoryManager repositoryForModule: module directory: directory. |
|
472 |
^repo |
|
473 |
||
474 |
"Created: / 23-12-2011 / 18:57:25 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
665 | 475 |
! ! |
476 |
||
378 | 477 |
!SVNSourceCodeManager class methodsFor:'queries'! |
478 |
||
479 |
isExperimental |
|
665 | 480 |
^ false |
481 |
"/^ OperatingSystem getLoginName ~= 'cg'. |
|
482 |
"/^ true |
|
570 | 483 |
|
665 | 484 |
"Modified: / 05-12-2009 / 10:23:43 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
570 | 485 |
! |
486 |
||
665 | 487 |
isResponsibleForPackage: packageId |
488 |
||
489 |
UserPreferences current svnEnabled ifFalse:[^false]. |
|
490 |
||
491 |
^SVN::RepositoryManager current hasRepositoryForPackage: packageId |
|
492 |
||
493 |
"Created: / 05-12-2009 / 10:36:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
494 |
"Modified: / 15-09-2010 / 14:55:34 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
378 | 495 |
! |
496 |
||
497 |
managerTypeName |
|
665 | 498 |
^ 'SubVersion' |
499 |
||
500 |
"Modified: / 07-07-2011 / 23:11:41 / jv" |
|
378 | 501 |
! |
502 |
||
921
6c3ba44ed3a5
added: #managerTypeNameShort
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
851
diff
changeset
|
503 |
managerTypeNameShort |
956 | 504 |
|
921
6c3ba44ed3a5
added: #managerTypeNameShort
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
851
diff
changeset
|
505 |
"Answers short version manager name suitable for UI, |
6c3ba44ed3a5
added: #managerTypeNameShort
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
851
diff
changeset
|
506 |
i,e., CVS, SVN, P4. Used in cases where sorter strings |
6c3ba44ed3a5
added: #managerTypeNameShort
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
851
diff
changeset
|
507 |
are preferred. Defaults to #managerTypeName" |
6c3ba44ed3a5
added: #managerTypeNameShort
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
851
diff
changeset
|
508 |
|
6c3ba44ed3a5
added: #managerTypeNameShort
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
851
diff
changeset
|
509 |
^'SVN' |
6c3ba44ed3a5
added: #managerTypeNameShort
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
851
diff
changeset
|
510 |
|
6c3ba44ed3a5
added: #managerTypeNameShort
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
851
diff
changeset
|
511 |
"Created: / 03-10-2011 / 13:28:59 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
6c3ba44ed3a5
added: #managerTypeNameShort
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
851
diff
changeset
|
512 |
! |
6c3ba44ed3a5
added: #managerTypeNameShort
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
851
diff
changeset
|
513 |
|
378 | 514 |
nameOfVersionMethodForExtensions |
515 |
^ #'extensionsVersion_SVN' |
|
516 |
! |
|
517 |
||
518 |
nameOfVersionMethodInClasses |
|
519 |
^ #'version_SVN' |
|
586
8f0468063710
added: #settingsApplicationClass
Claus Gittinger <cg@exept.de>
parents:
571
diff
changeset
|
520 |
! |
8f0468063710
added: #settingsApplicationClass
Claus Gittinger <cg@exept.de>
parents:
571
diff
changeset
|
521 |
|
8f0468063710
added: #settingsApplicationClass
Claus Gittinger <cg@exept.de>
parents:
571
diff
changeset
|
522 |
settingsApplicationClass |
587
02d7ed119335
added: #settingsApplicationClass
Claus Gittinger <cg@exept.de>
parents:
586
diff
changeset
|
523 |
"link to my settings application (needed for the settings dialog" |
02d7ed119335
added: #settingsApplicationClass
Claus Gittinger <cg@exept.de>
parents:
586
diff
changeset
|
524 |
|
665 | 525 |
^ SVN::ConfigurationApp |
526 |
||
527 |
"Modified: / 07-07-2011 / 23:12:54 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
528 |
! |
|
529 |
||
851
32edde5d1f19
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
797
diff
changeset
|
530 |
versionMethodKeyword |
956 | 531 |
|
851
32edde5d1f19
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
797
diff
changeset
|
532 |
"Answers the keyword used by the version management system to |
32edde5d1f19
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
797
diff
changeset
|
533 |
expand a current version in a file (_without_ dollars). For |
32edde5d1f19
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
797
diff
changeset
|
534 |
CVS it is 'Header', for SVN 'Id', others may use different |
32edde5d1f19
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
797
diff
changeset
|
535 |
keywords. If nil is returned, then the version management does |
32edde5d1f19
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
797
diff
changeset
|
536 |
not use any keyword." |
665 | 537 |
|
851
32edde5d1f19
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
797
diff
changeset
|
538 |
^'Id' |
665 | 539 |
|
851
32edde5d1f19
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
797
diff
changeset
|
540 |
"Created: / 27-09-2011 / 16:46:59 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
378 | 541 |
! ! |
542 |
||
539 | 543 |
!SVNSourceCodeManager class methodsFor:'source code access'! |
544 |
||
545 |
loadPackageWithId: aPackageId fromRepositoryAsAutoloaded: doLoadAsAutoloaded |
|
546 |
||
541 | 547 |
"Return true if loaded, false otherwise." |
548 |
||
540 | 549 |
| retval loadBlock | |
539 | 550 |
|
551 |
loadBlock := [ |
|
955 | 552 |
| repo packageDir manager| |
553 |
manager := SVN::RepositoryManager current. |
|
554 |
repo := manager repositoryForPackage: aPackageId. |
|
555 |
retval := (repo notNil and:[repo exists]) ifTrue:[ |
|
556 |
repo workingCopy checkout: SVN::Revision head full: true. |
|
557 |
packageDir := Smalltalk packageDirectoryForPackageId:aPackageId. |
|
558 |
"Quick and dirty hack to support old version of Smalltalk/X" |
|
559 |
(Smalltalk respondsTo: #loadPackage:fromDirectory:asAutoloaded:) |
|
560 |
ifTrue: |
|
561 |
["New API" |
|
562 |
Smalltalk |
|
563 |
loadPackage:aPackageId |
|
564 |
fromDirectory:packageDir |
|
565 |
asAutoloaded:doLoadAsAutoloaded] |
|
566 |
ifFalse: |
|
956 | 567 |
["Old API" |
955 | 568 |
Smalltalk |
569 |
loadPackageWithId:aPackageId |
|
570 |
fromDirectory:packageDir |
|
571 |
asAutoloaded:doLoadAsAutoloaded |
|
956 | 572 |
]. |
955 | 573 |
] ifFalse:[false] |
539 | 574 |
]. |
575 |
||
665 | 576 |
(SVNSourceCodeManager loadInProgressQuery query == true) |
955 | 577 |
ifTrue:[loadBlock value] |
578 |
ifFalse:[ |
|
956 | 579 |
SVNSourceCodeManager loadInProgressQuery |
580 |
answer: true |
|
955 | 581 |
do:[ |
582 |
SVN::ProgressDialog |
|
583 |
openOn: loadBlock |
|
584 |
title: ' Loading...' |
|
585 |
subtitle: aPackageId asText allItalic |
|
586 |
] |
|
539 | 587 |
]. |
588 |
||
541 | 589 |
^ retval |
539 | 590 |
|
591 |
"Created: / 09-04-2009 / 17:20:01 / Jan Vrany <vranyj1@fel.cvut.cz>" |
|
665 | 592 |
"Modified: / 25-04-2011 / 15:20:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
539 | 593 |
! ! |
594 |
||
571
28a4f762f3e8
added: #revisionInfoFromString:
Claus Gittinger <cg@exept.de>
parents:
570
diff
changeset
|
595 |
!SVNSourceCodeManager class methodsFor:'source code administration'! |
28a4f762f3e8
added: #revisionInfoFromString:
Claus Gittinger <cg@exept.de>
parents:
570
diff
changeset
|
596 |
|
665 | 597 |
getExistingContainersInModule:aModule directory:aPackage |
598 |
"{ Pragma: +optSpace }" |
|
599 |
||
600 |
^ self shouldImplement |
|
601 |
! |
|
602 |
||
603 |
getExistingDirectoriesInModule:aModule |
|
604 |
"{ Pragma: +optSpace }" |
|
605 |
||
606 |
^ self shouldImplement |
|
607 |
! |
|
608 |
||
609 |
getExistingModules |
|
610 |
"{ Pragma: +optSpace }" |
|
611 |
||
612 |
^ self shouldImplement |
|
613 |
! |
|
614 |
||
571
28a4f762f3e8
added: #revisionInfoFromString:
Claus Gittinger <cg@exept.de>
parents:
570
diff
changeset
|
615 |
revisionInfoFromString:aString |
28a4f762f3e8
added: #revisionInfoFromString:
Claus Gittinger <cg@exept.de>
parents:
570
diff
changeset
|
616 |
"{ Pragma: +optSpace }" |
28a4f762f3e8
added: #revisionInfoFromString:
Claus Gittinger <cg@exept.de>
parents:
570
diff
changeset
|
617 |
|
28a4f762f3e8
added: #revisionInfoFromString:
Claus Gittinger <cg@exept.de>
parents:
570
diff
changeset
|
618 |
"return a dictionary filled with revision info. |
28a4f762f3e8
added: #revisionInfoFromString:
Claus Gittinger <cg@exept.de>
parents:
570
diff
changeset
|
619 |
This extracts the relevant info from aString." |
28a4f762f3e8
added: #revisionInfoFromString:
Claus Gittinger <cg@exept.de>
parents:
570
diff
changeset
|
620 |
|
921
6c3ba44ed3a5
added: #managerTypeNameShort
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
851
diff
changeset
|
621 |
|
797
48f8701af829
changed: #revisionInfoFromString:
Claus Gittinger <cg@exept.de>
parents:
665
diff
changeset
|
622 |
^ SVNVersionInfo fromSVNString:aString |
571
28a4f762f3e8
added: #revisionInfoFromString:
Claus Gittinger <cg@exept.de>
parents:
570
diff
changeset
|
623 |
|
921
6c3ba44ed3a5
added: #managerTypeNameShort
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
851
diff
changeset
|
624 |
|
571
28a4f762f3e8
added: #revisionInfoFromString:
Claus Gittinger <cg@exept.de>
parents:
570
diff
changeset
|
625 |
" |
956 | 626 |
self revisionInfoFromString:(Array version_SVN) |
921
6c3ba44ed3a5
added: #managerTypeNameShort
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
851
diff
changeset
|
627 |
|
956 | 628 |
self revisionInfoFromString:(stx_libbasic2 extensionsVersion_CVS) |
571
28a4f762f3e8
added: #revisionInfoFromString:
Claus Gittinger <cg@exept.de>
parents:
570
diff
changeset
|
629 |
" |
28a4f762f3e8
added: #revisionInfoFromString:
Claus Gittinger <cg@exept.de>
parents:
570
diff
changeset
|
630 |
|
921
6c3ba44ed3a5
added: #managerTypeNameShort
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
851
diff
changeset
|
631 |
|
6c3ba44ed3a5
added: #managerTypeNameShort
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
851
diff
changeset
|
632 |
"Modified: / 29-01-1997 / 19:00:35 / cg" |
6c3ba44ed3a5
added: #managerTypeNameShort
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
851
diff
changeset
|
633 |
"Modified: / 03-10-2011 / 13:02:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
797
48f8701af829
changed: #revisionInfoFromString:
Claus Gittinger <cg@exept.de>
parents:
665
diff
changeset
|
634 |
"Modified (comment): / 29-09-2011 / 21:54:26 / cg" |
921
6c3ba44ed3a5
added: #managerTypeNameShort
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
851
diff
changeset
|
635 |
|
571
28a4f762f3e8
added: #revisionInfoFromString:
Claus Gittinger <cg@exept.de>
parents:
570
diff
changeset
|
636 |
! ! |
28a4f762f3e8
added: #revisionInfoFromString:
Claus Gittinger <cg@exept.de>
parents:
570
diff
changeset
|
637 |
|
665 | 638 |
!SVNSourceCodeManager class methodsFor:'subclass responsibility'! |
639 |
||
640 |
reportHistoryLogSince:timeGoal filterSTSources:filter filterUser:userFilter filterRepository:repositoryFilter filterModules:moduleFilter inTo:aBlock |
|
641 |
"superclass AbstractSourceCodeManager class says that I am responsible to implement this method" |
|
642 |
||
643 |
^ self shouldImplement |
|
644 |
! ! |
|
645 |
||
378 | 646 |
!SVNSourceCodeManager class methodsFor:'testing'! |
647 |
||
648 |
isSVN |
|
649 |
^ true |
|
650 |
! ! |
|
651 |
||
955 | 652 |
!SVNSourceCodeManager::Utilities methodsFor:'utilities-cvs'! |
653 |
||
654 |
checkinClass:aClass withInfo:aLogInfoOrNil withCheck:doCheckClass usingManager:aManagerOrNil |
|
655 |
"check a class into the source repository. |
|
656 |
If the argument, aLogInfoOrNil isNil, ask interactively for log-message. |
|
657 |
If doCheckClass is true, the class is checked for send of halts etc." |
|
658 |
||
659 |
^self checkinClasses:(Array with: aClass) withInfo:aLogInfoOrNil withCheck:doCheckClass usingManager:aManagerOrNil |
|
660 |
||
661 |
"Created: / 25-12-2011 / 23:45:55 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
662 |
! |
|
663 |
||
664 |
checkinClasses:classes withInfo:aLogInfoOrNil withCheck:doCheckClass usingManager:aManagerOrNil |
|
665 |
||
666 |
| classesPerPackage | |
|
667 |
||
668 |
doCheckClass value ifTrue:[ |
|
669 |
classes do:[:cls| |
|
670 |
"/ check if the class contains halts, error-sends etc. |
|
671 |
(self checkAndWarnAboutBadMessagesInClass:cls checkAgainHolder:doCheckClass) ifFalse:[ |
|
672 |
^ false |
|
673 |
]. |
|
674 |
]. |
|
675 |
]. |
|
676 |
||
677 |
classesPerPackage := Dictionary new. |
|
678 |
classes do: |
|
679 |
[:class| |
|
680 |
(classesPerPackage at: class theNonMetaclass package ifAbsentPut:[Set new]) |
|
681 |
add: class theNonMetaclass]. |
|
682 |
classesPerPackage keysAndValuesDo: |
|
683 |
[:package :classes| | repo | |
|
684 |
repo := SVN::RepositoryManager repositoryForPackage:package. |
|
1021
12be1fe92d15
improvements for CommitDialog2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
968
diff
changeset
|
685 |
"/SVN::CommitWizard new |
12be1fe92d15
improvements for CommitDialog2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
968
diff
changeset
|
686 |
SVN::CommitDialog2 new |
955 | 687 |
task: (repo workingCopy commitTask |
688 |
classes: classes; |
|
689 |
message: aLogInfoOrNil; |
|
690 |
extensionMethods: #() |
|
691 |
yourself); |
|
692 |
open]. |
|
693 |
^ true |
|
694 |
||
695 |
"Modified: / 06-05-2011 / 10:32:55 / cg" |
|
696 |
"Created: / 25-12-2011 / 23:46:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
697 |
! |
|
698 |
||
699 |
checkinPackage:packageToCheckIn classes:doClasses extensions:doExtensions buildSupport:doBuild askForMethodsInOtherPackages:askForMethodsInOtherPackages |
|
700 |
||
701 |
| repo task | |
|
702 |
repo := SVN::RepositoryManager repositoryForPackage:packageToCheckIn. |
|
703 |
repo isNil ifTrue:[ |
|
704 |
Dialog warn: (resources string: 'No repository for package %1' with: packageToCheckIn). |
|
705 |
^self |
|
706 |
]. |
|
707 |
task := repo workingCopy commitTask. |
|
708 |
task suppressClasses: doClasses not. |
|
709 |
task suppressExtensions: doExtensions not. |
|
710 |
task suppresBuildSupportFiles: doBuild not. |
|
711 |
||
1021
12be1fe92d15
improvements for CommitDialog2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
968
diff
changeset
|
712 |
"/SVN::CommitWizard new |
12be1fe92d15
improvements for CommitDialog2
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
968
diff
changeset
|
713 |
SVN::CommitDialog2 new |
955 | 714 |
task: task; |
715 |
open |
|
716 |
||
717 |
"Created: / 13-10-2011 / 11:16:52 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
718 |
! |
|
719 |
||
956 | 720 |
compareProject:aProject withRepositoryVersionFrom:aDateOrNilForNewest |
721 |
|diffSet| |
|
722 |
||
723 |
diffSet := self diffSetOfProject:aProject againstRepositoryVersionFrom:aDateOrNilForNewest. |
|
724 |
||
725 |
(Tools::ChangeSetDiffTool new) |
|
726 |
diffset:diffSet; |
|
727 |
title:('Differences of %1' bindWith:aProject); |
|
728 |
open. |
|
729 |
||
730 |
"Created: / 18-01-2012 / 16:04:50 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
731 |
! |
|
732 |
||
955 | 733 |
diffSetOfProject: package againstRepositoryVersionFrom:dateOrNil |
734 |
||
735 |
| rev branch | |
|
736 |
||
737 |
rev := dateOrNil isNil ifTrue:[SVN::Revision head] ifFalse:[SVN::Revision date: dateOrNil]. |
|
738 |
branch := SVNSourceCodeManager branchForPackage: package. |
|
739 |
branch isNil ifTrue:[^nil]. |
|
740 |
^branch diffSetBetweenImageAndRevision: rev. |
|
741 |
||
742 |
"Created: / 15-10-2011 / 23:26:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
743 |
! |
|
744 |
||
745 |
tagClass:aClass as:tag |
|
746 |
||
747 |
Dialog warn: 'Individual class tagging not supported by SubVersion. Tag whole package instead'. |
|
748 |
||
749 |
"Modified: / 12-09-2006 / 13:03:59 / cg" |
|
750 |
"Created: / 15-10-2011 / 22:48:54 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
751 |
! |
|
752 |
||
753 |
tagClasses:classes as:tag |
|
754 |
||
755 |
Dialog warn: 'Individual class tagging not supported by SubVersion. Tag whole package instead'. |
|
756 |
||
757 |
"Modified: / 12-09-2006 / 13:03:59 / cg" |
|
758 |
"Created: / 15-10-2011 / 22:49:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
759 |
! |
|
760 |
||
761 |
tagPackage: package as:tag |
|
762 |
||
763 |
Dialog warn: 'Not yet implemented' |
|
764 |
||
765 |
"Created: / 12-09-2006 / 13:04:29 / cg" |
|
766 |
"Created: / 15-10-2011 / 22:49:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
767 |
! ! |
|
768 |
||
378 | 769 |
!SVNSourceCodeManager class methodsFor:'documentation'! |
770 |
||
851
32edde5d1f19
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
797
diff
changeset
|
771 |
version |
921
6c3ba44ed3a5
added: #managerTypeNameShort
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
851
diff
changeset
|
772 |
^ '$Header$' |
6c3ba44ed3a5
added: #managerTypeNameShort
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
851
diff
changeset
|
773 |
! |
6c3ba44ed3a5
added: #managerTypeNameShort
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
851
diff
changeset
|
774 |
|
6c3ba44ed3a5
added: #managerTypeNameShort
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
851
diff
changeset
|
775 |
version_CVS |
851
32edde5d1f19
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
797
diff
changeset
|
776 |
^ '$Header$' |
32edde5d1f19
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
797
diff
changeset
|
777 |
! |
32edde5d1f19
checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
797
diff
changeset
|
778 |
|
665 | 779 |
version_SVN |
955 | 780 |
^ '§Id: SVNSourceCodeManager.st 467 2011-12-25 22:47:17Z vranyj1 §' |
378 | 781 |
! ! |