added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
comment/format in:
#askForExistingRevision:title:class:
#checkinExtensionMethods:forPackage:withInfo:
changed: #changeSetForExtensionMethodsForPackage:askForRevision:using:
--- a/SourceCodeManagerUtilities.st Fri Nov 06 13:26:45 2009 +0100
+++ b/SourceCodeManagerUtilities.st Tue Dec 01 22:20:33 2009 +0100
@@ -195,6 +195,17 @@
If askForRevision is false, check-out the newest version.
Return a changeSet or nil (if any error occurred)"
+ ^ self
+ changeSetForExtensionMethodsForPackage:packageToCheckOut
+ revision:nil orAskForRevision:askForRevision
+ using:aSourceCodeManager
+!
+
+changeSetForExtensionMethodsForPackage:packageToCheckOut revision:revisionOrNil orAskForRevision:askForRevision using:aSourceCodeManager
+ "check-out an extension container from the source repository, and return the methods there as a change set.
+ If askForRevision is false, check-out the newest version.
+ Return a changeSet or nil (if any error occurred)"
+
|resources directory module file
inChangeSet extensionMethods
aStream sourceToLoad rev msg newestRev
@@ -211,27 +222,28 @@
"/
"/ ask for revision
"/
- newestRev := aSourceCodeManager newestRevisionInFile:file directory:directory module:module.
- askForRevision ifFalse:[
- rev := newestRev ? ''
- ] ifTrue:[
- msg := resources string:'CheckOut which revision of extensions for ''%1'': (empty for newest)' with:packageToCheckOut allBold.
- newestRev notNil ifTrue:[
- msg := msg , '\' , (resources string:'Newest in reporitory is %1.' with:newestRev)
- ].
-
- rev := SourceCodeManagerUtilities
- askForExistingRevision:msg
- title:'CheckOut from repository'
- class:nil
- manager:aSourceCodeManager
- module:module package:directory fileName:file.
-
- rev isNil ifTrue:[
- ^ nil "/ canceled
+ (rev := revisionOrNil) isNil ifTrue:[
+ newestRev := aSourceCodeManager newestRevisionInFile:file directory:directory module:module.
+ askForRevision ifFalse:[
+ rev := newestRev ? ''
+ ] ifTrue:[
+ msg := resources string:'CheckOut which revision of extensions for ''%1'': (empty for newest)' with:packageToCheckOut allBold.
+ newestRev notNil ifTrue:[
+ msg := msg , '\' , (resources string:'Newest in reporitory is %1.' with:newestRev)
+ ].
+
+ rev := SourceCodeManagerUtilities
+ askForExistingRevision:msg
+ title:'CheckOut from repository'
+ class:nil
+ manager:aSourceCodeManager
+ module:module package:directory fileName:file.
+
+ rev isNil ifTrue:[
+ ^ nil "/ canceled
+ ].
].
].
-
rev withoutSpaces isEmpty ifTrue:[
rev := #newest.
msg := 'extracting newest %1 (' , (newestRev ? '???') , ')'.
@@ -620,6 +632,7 @@
resources := self classResources.
+ "/ the following is wrong - must ask the projectDefinition !!
mgr := self sourceCodeManagerFor:aCollectionOfMethods first mclass.
mgr isNil ifTrue:[ ^ false ].
@@ -2690,7 +2703,8 @@
title:title
class:aClass
manager:mgr
- module:module package:package fileName:fileName
+ module:module package:package
+ fileName:fileName
"
SourceCodeManagerUtilities
@@ -3174,9 +3188,9 @@
!SourceCodeManagerUtilities class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic3/SourceCodeManagerUtilities.st,v 1.198 2009-10-31 12:43:46 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic3/SourceCodeManagerUtilities.st,v 1.199 2009-12-01 21:20:33 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic3/SourceCodeManagerUtilities.st,v 1.198 2009-10-31 12:43:46 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic3/SourceCodeManagerUtilities.st,v 1.199 2009-12-01 21:20:33 cg Exp $'
! !