631
|
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 |
"
|
380
|
26 |
"{ Package: 'stx:libsvn' }"
|
|
27 |
|
|
28 |
LibraryDefinition subclass:#stx_libsvn
|
919
|
29 |
instanceVariableNames:''
|
|
30 |
classVariableNames:''
|
|
31 |
poolDictionaries:''
|
|
32 |
category:'* Projects & Packages *'
|
380
|
33 |
!
|
|
34 |
|
524
|
35 |
!stx_libsvn class methodsFor:'documentation'!
|
|
36 |
|
631
|
37 |
copyright
|
|
38 |
"
|
|
39 |
Copyright (c) 2007-2010 Jan Vrany
|
|
40 |
Copyright (c) 2009-2010 eXept Software AG
|
|
41 |
|
|
42 |
Permission is hereby granted, free of charge, to any person
|
|
43 |
obtaining a copy of this software and associated documentation
|
|
44 |
files (the 'Software'), to deal in the Software without
|
|
45 |
restriction, including without limitation the rights to use,
|
|
46 |
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
47 |
copies of the Software, and to permit persons to whom the
|
|
48 |
Software is furnished to do so, subject to the following
|
|
49 |
conditions:
|
|
50 |
|
|
51 |
The above copyright notice and this permission notice shall be
|
|
52 |
included in all copies or substantial portions of the Software.
|
|
53 |
|
|
54 |
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
|
55 |
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
56 |
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
57 |
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
58 |
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
59 |
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
60 |
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
61 |
OTHER DEALINGS IN THE SOFTWARE.
|
|
62 |
|
|
63 |
"
|
|
64 |
!
|
|
65 |
|
524
|
66 |
extensionsVersion_CVS
|
|
67 |
^ '$Header$'
|
918
|
68 |
|
524
|
69 |
! !
|
380
|
70 |
|
|
71 |
!stx_libsvn class methodsFor:'description'!
|
|
72 |
|
580
|
73 |
excludedFromPreRequisites
|
|
74 |
"list all packages which should be ignored in the automatic
|
|
75 |
preRequisites scan. See #preRequisites for more."
|
509
|
76 |
|
|
77 |
^ #(
|
|
78 |
)
|
|
79 |
!
|
|
80 |
|
380
|
81 |
postLoadAction
|
|
82 |
|
919
|
83 |
SVN::Configuration flushCaches.
|
|
84 |
SVN::RepositoryManager reset.
|
631
|
85 |
|
|
86 |
"/JV-2011-06-10: Not needed anymore since new version of St/X now supports multiple
|
|
87 |
"/VCS...
|
|
88 |
"
|
|
89 |
NewLauncher
|
919
|
90 |
addSettingsApplicationByClass: SVN::ConfigurationApp fullName asSymbol
|
|
91 |
withName:'Subversion'
|
|
92 |
icon: nil.
|
631
|
93 |
"
|
|
94 |
|
|
95 |
"Autoload tests"
|
|
96 |
Smalltalk isStandAloneApp ifTrue:[^self].
|
|
97 |
self classes do: [:cls|cls isLoaded ifFalse:[cls autoload]]
|
380
|
98 |
|
|
99 |
"Created: / 24-05-2008 / 01:55:31 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
|
100 |
"Modified: / 27-05-2008 / 07:41:29 / Jan Vrany <vranyj1@fel.cvut.cz>"
|
631
|
101 |
"Modified: / 14-12-2010 / 11:07:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
102 |
"Modified: / 10-06-2011 / 14:04:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
103 |
!
|
|
104 |
|
|
105 |
preLoadAction
|
|
106 |
ProgressNotification autoload
|
|
107 |
|
380
|
108 |
!
|
|
109 |
|
|
110 |
preRequisites
|
580
|
111 |
"list all required packages.
|
|
112 |
This list can be maintained manually or (better) generated and
|
|
113 |
updated by scanning the superclass hierarchies and looking for
|
|
114 |
global variable accesses. (the browser has a menu function for that)
|
|
115 |
Howevery, often too much is found, and you may want to explicitely
|
|
116 |
exclude individual packages in the #excludedFromPrerequisites method."
|
|
117 |
|
380
|
118 |
^ #(
|
918
|
119 |
|
919
|
120 |
#'stx:goodies/sunit'
|
|
121 |
#'stx:goodies/xml/vw' "XML::Node - referenced by SVN::WCEntry class>>readFromXml: "
|
|
122 |
#'stx:libbasic' "Object - superclass of SVN::MergeViewApp "
|
|
123 |
#'stx:libbasic2' "List - referenced by SVN::Configuration>>initialize "
|
|
124 |
#'stx:libbasic3' "ClassChange - superclass of extended MethodChange "
|
|
125 |
#'stx:libtool' "AbstractSettingsApplication - superclass of SVN::ConfigurationApp "
|
|
126 |
#'stx:libtool2' "MenuEditor - referenced by SVN::IconLibrary class>>initialize "
|
|
127 |
#'stx:libview' "GraphicsContext - superclass of SVN::DiffViewApp::Diff2TextView "
|
|
128 |
#'stx:libview2' "SimpleDialog - superclass of SVN::BranchSelectionDialog "
|
|
129 |
#'stx:libwidg' "Label - referenced by SVN::WorkingCopy>>inspector2TabBrowser "
|
|
130 |
#'stx:libwidg2' "TwoColumnTextView - superclass of SVN::DiffViewApp::Diff2TextView "
|
380
|
131 |
)
|
567
|
132 |
!
|
|
133 |
|
|
134 |
preUnloadAction
|
|
135 |
|
919
|
136 |
NewLauncher
|
|
137 |
removeSettingsApplicationByClass: SVN::SettingsApp fullName asSymbol
|
380
|
138 |
! !
|
|
139 |
|
|
140 |
!stx_libsvn class methodsFor:'description - contents'!
|
|
141 |
|
|
142 |
classNamesAndAttributes
|
580
|
143 |
"lists the classes which are to be included in the project.
|
|
144 |
Each entry in the list may be: a single class-name (symbol),
|
|
145 |
or an array-literal consisting of class name and attributes.
|
|
146 |
Attributes are: #autoload or #<os> where os is one of win32, unix,..."
|
|
147 |
|
380
|
148 |
^ #(
|
919
|
149 |
"<className> or (<className> attributes...) in load order"
|
|
150 |
#'SVN::Branch'
|
|
151 |
#'SVN::BranchQuery'
|
|
152 |
#'SVN::Browser'
|
|
153 |
#'SVN::Cache'
|
|
154 |
#'SVN::CacheEntry'
|
|
155 |
#'SVN::Command'
|
|
156 |
(#'SVN::CommitTests' autoload)
|
|
157 |
#'SVN::CompatModeQuery'
|
|
158 |
#'SVN::Configuration'
|
|
159 |
#'SVN::ConfigurationApp'
|
|
160 |
(#'SVN::ConfigurationTests' autoload)
|
|
161 |
#'SVN::Credentials'
|
|
162 |
#'SVN::Dialog'
|
|
163 |
#'SVN::DiffViewApp'
|
|
164 |
#'SVN::Entry'
|
|
165 |
#'SVN::Enum'
|
|
166 |
#'SVN::ExternalMergeTool'
|
|
167 |
#'SVN::IconLibrary'
|
|
168 |
#'SVN::MergeBrowser'
|
|
169 |
#'SVN::OSProcess'
|
|
170 |
(#'SVN::PackageAResource' autoload)
|
|
171 |
(#'SVN::PackageBResource' autoload)
|
|
172 |
#'SVN::PackagePattern'
|
|
173 |
(#'SVN::PackagePatternTests' autoload)
|
|
174 |
(#'SVN::PackageResource' autoload)
|
|
175 |
#'SVN::Property'
|
|
176 |
#'SVN::Repository'
|
|
177 |
#'SVN::RepositoryConfiguration'
|
|
178 |
#'SVN::RepositoryManager'
|
|
179 |
(#'SVN::RepositoryResource' autoload)
|
|
180 |
#'SVN::Revision'
|
|
181 |
#'SVN::SVNError'
|
|
182 |
#'SVN::Task'
|
|
183 |
(#'SVN::UpdateLikeWizard' autoload)
|
|
184 |
#'SVN::WCAction'
|
|
185 |
#'SVN::WCActionNotification'
|
|
186 |
#'SVN::WCError'
|
|
187 |
#'SVN::WizardPane'
|
|
188 |
#'SVN::WorkingCopy'
|
|
189 |
#'SVN::XMLObject'
|
|
190 |
SVNSourceCodeManager
|
|
191 |
#'stx_libsvn'
|
|
192 |
#'SVN::AuthorizationError'
|
|
193 |
#'SVN::BranchAndRevisionSelectionDialog'
|
|
194 |
#'SVN::BranchCommand'
|
|
195 |
#'SVN::BranchSelectionDialog'
|
|
196 |
#'SVN::CVSTask'
|
|
197 |
#'SVN::ConfigurationDialog'
|
|
198 |
#'SVN::CreateRepositoryCommand'
|
|
199 |
#'SVN::CredentialsDialog'
|
|
200 |
#'SVN::FileoutLikeTask'
|
|
201 |
#'SVN::KDiff3'
|
|
202 |
#'SVN::MergeViewApp'
|
|
203 |
#'SVN::NodeKind'
|
|
204 |
#'SVN::NonExistentURLError'
|
|
205 |
#'SVN::ProgressDialog'
|
|
206 |
#'SVN::RepositoryDialog'
|
|
207 |
#'SVN::RepositoryEntry'
|
|
208 |
#'SVN::RevisionDate'
|
|
209 |
#'SVN::RevisionHead'
|
|
210 |
#'SVN::RevisionLogBrowser'
|
|
211 |
#'SVN::RevisionLogEntry'
|
|
212 |
#'SVN::RevisionNumber'
|
|
213 |
#'SVN::Status'
|
|
214 |
#'SVN::UnknownError'
|
|
215 |
#'SVN::WCActionAdded'
|
|
216 |
#'SVN::WCActionConflict'
|
|
217 |
#'SVN::WCActionDeleted'
|
|
218 |
#'SVN::WCActionMerged'
|
|
219 |
#'SVN::WCActionModified'
|
|
220 |
#'SVN::WCActionNone'
|
|
221 |
#'SVN::WCActionRestored'
|
|
222 |
#'SVN::WCActionUpdated'
|
|
223 |
#'SVN::WCCommand'
|
|
224 |
#'SVN::WCEntry'
|
|
225 |
#'SVN::WCEntryInfo'
|
|
226 |
#'SVN::Wizard'
|
|
227 |
#'SVN::WorkingCopyBrowser'
|
|
228 |
#'SVN::WorkingCopyLockedError'
|
|
229 |
#'SVN::CatCommand'
|
|
230 |
#'SVN::CleanupCommand'
|
|
231 |
#'SVN::CommitTask'
|
|
232 |
#'SVN::CommitWizard'
|
|
233 |
#'SVN::CopyCommand'
|
|
234 |
#'SVN::ImportFromCVSTask'
|
|
235 |
#'SVN::ListCommand'
|
|
236 |
#'SVN::LogCommand'
|
|
237 |
#'SVN::MoveCommand'
|
|
238 |
#'SVN::NodeKindDir'
|
|
239 |
#'SVN::NodeKindExternal'
|
|
240 |
#'SVN::NodeKindFile'
|
|
241 |
#'SVN::NodeKindNone'
|
|
242 |
#'SVN::NodeKindUnknown'
|
|
243 |
#'SVN::StatusAdded'
|
|
244 |
#'SVN::StatusConflicted'
|
|
245 |
#'SVN::StatusDeleted'
|
|
246 |
#'SVN::StatusExternal'
|
|
247 |
#'SVN::StatusIgnored'
|
|
248 |
#'SVN::StatusIncomplete'
|
|
249 |
#'SVN::StatusMissing'
|
|
250 |
#'SVN::StatusModified'
|
|
251 |
#'SVN::StatusNormal'
|
|
252 |
#'SVN::StatusObstructed'
|
|
253 |
#'SVN::StatusReplaced'
|
|
254 |
#'SVN::StatusUnversioned'
|
|
255 |
#'SVN::SyncWithCVSTask'
|
|
256 |
#'SVN::UpdateLikeCommand'
|
|
257 |
#'SVN::UpdateLikeTask'
|
|
258 |
#'SVN::WCPathCommand'
|
|
259 |
#'SVN::AddCommand'
|
|
260 |
#'SVN::CheckoutCommand'
|
|
261 |
#'SVN::CommitCommand'
|
|
262 |
#'SVN::DeleteCommand'
|
|
263 |
#'SVN::InfoCommand'
|
|
264 |
#'SVN::MergeCommand'
|
|
265 |
#'SVN::MergeTask'
|
|
266 |
#'SVN::PropsetCommand'
|
|
267 |
#'SVN::ResolvedCommand'
|
|
268 |
#'SVN::RevertCommand'
|
|
269 |
#'SVN::StatusCommand'
|
|
270 |
#'SVN::UpdateCommand'
|
|
271 |
#'SVN::UpdateTask'
|
380
|
272 |
)
|
|
273 |
!
|
|
274 |
|
|
275 |
extensionMethodNames
|
580
|
276 |
"lists the extension methods which are to be included in the project.
|
|
277 |
Entries are 2-element array literals, consisting of class-name and selector."
|
|
278 |
|
380
|
279 |
^ #(
|
919
|
280 |
AbstractFileBrowser svnCommit
|
|
281 |
AbstractFileBrowser svnStatus
|
|
282 |
ChangeSet condenseChangesForPackage2:
|
|
283 |
Class fileOutAsMethodIn:selector:
|
|
284 |
Class svnBranch
|
|
285 |
Class svnRepository
|
|
286 |
Date asSVNRevisionSpec
|
|
287 |
Filename directoryContentsAsFilenamesMatching:
|
|
288 |
Filename directoryContentsMatching:
|
|
289 |
FilenameWidgetWithHistory historyList:
|
|
290 |
FilenameWidgetWithHistory modifiedChannel:
|
|
291 |
Integer asSVNRevisionSpec
|
|
292 |
Method makeSourceFileAbsolute
|
|
293 |
MethodChange asAntiChange
|
|
294 |
MethodChange isForGeneratedSubject
|
|
295 |
String asSVNRevisionSpec
|
|
296 |
#'Tools::NewSystemBrowser' classMenuDiffsetFor:againstBranch:revision:
|
|
297 |
#'Tools::NewSystemBrowser' classMenuSubversionBrowseWorkingCopy
|
|
298 |
#'Tools::NewSystemBrowser' classMenuSubversionChangeset
|
|
299 |
#'Tools::NewSystemBrowser' classMenuSubversionChangeset:againstBranch:revision:
|
|
300 |
#'Tools::NewSystemBrowser' classMenuSubversionCommit
|
|
301 |
#'Tools::NewSystemBrowser' classMenuSubversionCompare
|
|
302 |
#'Tools::NewSystemBrowser' classMenuSubversionCompare:withBranch:revision:
|
|
303 |
#'Tools::NewSystemBrowser' classMenuSubversionCompare:withRevision:
|
|
304 |
#'Tools::NewSystemBrowser' classMenuSubversionCompareWithRevisionHead
|
|
305 |
#'Tools::NewSystemBrowser' classMenuSubversionUpdate
|
|
306 |
#'Tools::NewSystemBrowser' classSubversionChangesetMenu
|
|
307 |
#'Tools::NewSystemBrowser' commonMenuSubversionBrowseWorkingCopy
|
|
308 |
#'Tools::NewSystemBrowser' commonMenuSubversionFlushCaches
|
|
309 |
#'Tools::NewSystemBrowser' hasClassesSelectedAndSubversionRepositoryExistsAndBranchSelectedHolder
|
|
310 |
#'Tools::NewSystemBrowser' hasProjectSelectedSubversionRepositoryExistsAndBranchSelectedHolder
|
|
311 |
#'Tools::NewSystemBrowser' hasSingleClassAndSubversionRepositoryExists
|
|
312 |
#'Tools::NewSystemBrowser' hasSubversionRepositoryAndBranchFor:
|
|
313 |
#'Tools::NewSystemBrowser' projectMenuSubversionChangeset
|
|
314 |
#'Tools::NewSystemBrowser' projectMenuSubversionChangesetAgainstBranch:revision:
|
|
315 |
#'Tools::NewSystemBrowser' projectMenuSubversionCommit
|
|
316 |
#'Tools::NewSystemBrowser' projectMenuSubversionCommitMode
|
|
317 |
#'Tools::NewSystemBrowser' projectMenuSubversionCompare
|
|
318 |
#'Tools::NewSystemBrowser' projectMenuSubversionCompareWithBranch:revision:
|
|
319 |
#'Tools::NewSystemBrowser' projectMenuSubversionCompareWithRevisionHead
|
|
320 |
#'Tools::NewSystemBrowser' projectMenuSubversionLoadRevision
|
|
321 |
#'Tools::NewSystemBrowser' projectMenuSubversionLoadRevision:
|
|
322 |
#'Tools::NewSystemBrowser' projectMenuSubversionMergeWith:revision:
|
|
323 |
#'Tools::NewSystemBrowser' projectMenuSubversionRemoveWorkingCopy
|
|
324 |
#'Tools::NewSystemBrowser' projectMenuSubversionShowRevisionLog
|
|
325 |
#'Tools::NewSystemBrowser' projectMenuSubversionUpdate
|
|
326 |
#'Tools::NewSystemBrowser' projectSubversionChangesetMenu
|
|
327 |
#'Tools::NewSystemBrowser' projectSubversionMergeMenu
|
|
328 |
#'Tools::NewSystemBrowser' selectedProjectSubversionRepository
|
|
329 |
#'Tools::NewSystemBrowser' selectedProjectsForSubversion
|
|
330 |
#'Tools::NewSystemBrowser' selectedProjectsFromClasses
|
|
331 |
#'Tools::NewSystemBrowser' svnRepositoryFor:
|
|
332 |
#'Tools::NewSystemBrowser' svnRepositoryManager
|
|
333 |
#'Tools::NewSystemBrowser' theSingleSelectedProjectForSubversion
|
|
334 |
#'Tools::NewSystemBrowser' theSingleSelectedProjectFromClasses
|
|
335 |
UserPreferences svnConfigurations
|
|
336 |
UserPreferences svnConfigurations2
|
|
337 |
UserPreferences svnConfigurations2:
|
|
338 |
UserPreferences svnConfigurations:
|
|
339 |
UserPreferences svnCurrentConfiguration
|
|
340 |
UserPreferences svnCurrentConfiguration:
|
|
341 |
UserPreferences svnEnabled
|
|
342 |
UserPreferences svnEnabled:
|
|
343 |
UserPreferences svnVerbose
|
|
344 |
UserPreferences svnVerbose:
|
|
345 |
#'XML::NodeSet' #'@'
|
|
346 |
'AbstractFileBrowser class' svnMenu
|
|
347 |
'ProjectDefinition class' forEachContentsMethodsCodeToCompileDo:ignoreOldEntries:ignoreOldDefinition:
|
|
348 |
'ProjectDefinition class' svnRepositoryUrl
|
|
349 |
'ProjectDefinition class' #'svnRepositoryUrlString_code'
|
|
350 |
'Tools::NewSystemBrowser class' classMenuSubversion
|
|
351 |
'Tools::NewSystemBrowser class' classSubversionChangesetMenu
|
|
352 |
'Tools::NewSystemBrowser class' classSubversionCompareMenu
|
|
353 |
'Tools::NewSystemBrowser class' projectMenuSubversion
|
|
354 |
'Tools::NewSystemBrowser class' projectSubversionChangesetMenu
|
|
355 |
'Tools::NewSystemBrowser class' projectSubversionCompareMenu
|
|
356 |
'Tools::NewSystemBrowser class' projectSubversionMergeMenu
|
|
357 |
'UserNotification class' notify:progress:
|
380
|
358 |
)
|
|
359 |
! !
|
|
360 |
|
|
361 |
!stx_libsvn class methodsFor:'description - project information'!
|
|
362 |
|
|
363 |
companyName
|
|
364 |
"Return a companyname which will appear in <lib>.rc"
|
|
365 |
|
|
366 |
^ 'CTU-FEI'
|
|
367 |
|
|
368 |
"Modified: / 06-04-2008 / 21:20:20 / janfrog"
|
|
369 |
!
|
|
370 |
|
|
371 |
description
|
|
372 |
"Return a description string which will appear in vc.def / bc.def"
|
|
373 |
|
|
374 |
^ 'SubVersion support for Smalltalk/X'
|
|
375 |
|
|
376 |
"Modified: / 06-04-2008 / 21:20:38 / janfrog"
|
|
377 |
!
|
|
378 |
|
|
379 |
legalCopyright
|
|
380 |
"Return a copyright string which will appear in <lib>.rc"
|
|
381 |
|
|
382 |
^ 'Copyright Jan Vrany 2008'
|
|
383 |
|
|
384 |
"Modified: / 06-04-2008 / 21:20:55 / janfrog"
|
|
385 |
!
|
|
386 |
|
|
387 |
productName
|
|
388 |
"Return a product name which will appear in <lib>.rc"
|
|
389 |
|
|
390 |
^ 'Smalltalk/X Subversion support'
|
|
391 |
|
|
392 |
"Modified: / 06-04-2008 / 21:21:14 / janfrog"
|
|
393 |
! !
|
|
394 |
|
|
395 |
!stx_libsvn class methodsFor:'description - svn'!
|
|
396 |
|
631
|
397 |
svnRepositoryUrlString
|
|
398 |
"Return a SVN repository URL of myself.
|
|
399 |
(Generated since 2011-04-08)
|
|
400 |
"
|
|
401 |
|
|
402 |
^ '$URL$'
|
|
403 |
!
|
|
404 |
|
380
|
405 |
svnRevisionNr
|
|
406 |
"Return a SVN revision number of myself.
|
|
407 |
This number is updated after a commit"
|
|
408 |
|
918
|
409 |
^ "$SVN-Revision:"'372M'"$"
|
631
|
410 |
! !
|
|
411 |
|
|
412 |
!stx_libsvn class methodsFor:'loading'!
|
|
413 |
|
|
414 |
loadAsAutoloaded:asAutoloaded
|
|
415 |
|
|
416 |
"Overriden to ease development. Bit tricky, since we have
|
|
417 |
load libsvn from SVN while libsvn is not installed :-)"
|
|
418 |
|
|
419 |
|
|
420 |
(Smalltalk commandLineArguments includes: '--libsvn-load-from-svn')
|
919
|
421 |
ifTrue: [^self loadAsAutoloadedFromRepository: asAutoloaded]
|
|
422 |
ifFalse:[^super loadAsAutoloaded:asAutoloaded].
|
631
|
423 |
|
|
424 |
"Created: / 24-11-2010 / 12:18:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
425 |
!
|
|
426 |
|
|
427 |
loadAsAutoloadedFromRepository: asAutoloaded
|
|
428 |
|
|
429 |
| wc repo branch url i conf |
|
|
430 |
|
|
431 |
"Checks"
|
|
432 |
(OperatingSystem canExecuteCommand: 'svn') ifFalse:
|
919
|
433 |
[^self error: 'command ''svn'' not found!!'].
|
631
|
434 |
|
|
435 |
"Create a working copy"
|
919
|
436 |
wc := (Filename homeDirectory / '.smalltalk' / 'working-copy' / UUID genUUID printString) .
|
|
437 |
Smalltalk at:'#SVN::RepositoryManager:WorkingCopyBase' put: wc asString.
|
|
438 |
[ wc recursiveMakeDirectory ] on: Error do:[:e|^self error:'cannot make working copy: ', e description].
|
|
439 |
Smalltalk packagePath:
|
|
440 |
(Smalltalk packagePath asOrderedCollection
|
|
441 |
addFirst: wc asString; yourself).
|
631
|
442 |
|
919
|
443 |
"Determine repo and branch"
|
|
444 |
repo := 'https://swing.fit.cvut.cz/svn/stx/libsvn'.
|
|
445 |
branch := 'branches/v2'.
|
|
446 |
i := Smalltalk commandLineArguments indexOf: '--libsvn-load-branch'.
|
|
447 |
(i ~~ 0 and:[Smalltalk commandLineArguments size > i]) ifTrue:
|
|
448 |
[branch := Smalltalk commandLineArguments at: i+1].
|
631
|
449 |
|
919
|
450 |
"Checkout SVN from repository"
|
|
451 |
url := repo , '/' , branch.
|
|
452 |
self info:'Checking out from ', url , '...'.
|
|
453 |
[ (wc / 'stx') makeDirectory ] on: Error do:[:e|^self error:'cannot make working copy: ', e description].
|
631
|
454 |
(OperatingSystem executeCommand:('svn co %1 %2' bindWith: url with: (wc / 'stx' / 'libsvn' ) asString))
|
919
|
455 |
ifFalse:[self error:'svn checkout failed'].
|
631
|
456 |
|
|
457 |
"Reload from checked out directory:"
|
|
458 |
self info:'Reloading...'.
|
|
459 |
stx_libsvn removeFromSystem.
|
|
460 |
Smalltalk commandLineArguments remove: '--libsvn-load-from-svn'.
|
|
461 |
Smalltalk flushPathCaches.
|
|
462 |
|
|
463 |
(Smalltalk loadPackage: 'stx:libsvn')
|
919
|
464 |
ifFalse: [self error:'Cannot load libsvn'].
|
631
|
465 |
|
|
466 |
conf := SVN::Configuration newRepository.
|
|
467 |
conf package: self package; url: repo; branch: branch.
|
|
468 |
SVN::Configuration current repositories addFirst: conf.
|
|
469 |
|
|
470 |
"Created: / 24-11-2010 / 12:42:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
471 |
"Modified: / 24-11-2010 / 15:14:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
472 |
! !
|
|
473 |
|
918
|
474 |
|
707
|
475 |
!stx_libsvn class methodsFor:'others'!
|
|
476 |
|
|
477 |
|
918
|
478 |
!stx_libsvn class methodsFor:'documentation'!
|
785
|
479 |
|
707
|
480 |
version_CVS
|
|
481 |
^ '$Header$'
|
|
482 |
! !
|
|
483 |
|
631
|
484 |
!stx_libsvn class methodsFor:'private'!
|
|
485 |
|
|
486 |
error: aString
|
|
487 |
|
|
488 |
super error: ('libsvn [error]: ' , aString) "errorPrintCR".
|
|
489 |
|
|
490 |
"Created: / 24-11-2010 / 12:50:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
|
491 |
!
|
|
492 |
|
|
493 |
info: aString
|
|
494 |
|
|
495 |
('libsvn [info]: ' , aString) errorPrintCR.
|
|
496 |
|
|
497 |
"Created: / 24-11-2010 / 12:51:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
380
|
498 |
! !
|
|
499 |
|
|
500 |
!stx_libsvn class methodsFor:'documentation'!
|
|
501 |
|
918
|
502 |
version
|
|
503 |
^ '$Header$'
|
|
504 |
!
|
|
505 |
|
919
|
506 |
version_CVS
|
|
507 |
^ '$Header$'
|
|
508 |
!
|
918
|
509 |
|
380
|
510 |
version_SVN
|
918
|
511 |
|
|
512 |
^ '§Id: stx_libsvn.st 372 2011-09-29 10:47:58Z vranyj1 §'
|
380
|
513 |
! !
|