--- a/SourceCodeManagerUtilitiesForContainerBasedManagers.st Sun Feb 05 05:02:49 2017 +0100
+++ b/SourceCodeManagerUtilitiesForContainerBasedManagers.st Sun Feb 05 05:03:19 2017 +0100
@@ -15,7 +15,7 @@
SourceCodeManagerUtilities subclass:#SourceCodeManagerUtilitiesForContainerBasedManagers
instanceVariableNames:''
- classVariableNames:'LastComparedTag'
+ classVariableNames:''
poolDictionaries:''
category:'System-SourceCodeManagement'
!
@@ -557,107 +557,6 @@
"Created: / 13-10-2011 / 11:15:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified: / 04-09-2012 / 14:05:36 / cg"
-!
-
-comparePackages:packages askForRevision:askForRevision
- "Compares code of given packages (loaded in the image) against a specific revision
- and opens a diff browser on differences.
-
- If `askForRevision` is true, then user is asked to specify to which revision to
- update. If `askForRevision` is false, then packages are updated to a 'newest'
- revision.
-
- NOTE: Definition of `newest` revision may vary. For SCMs which allows for multiple
- heads, it is not clear which one it is. In that case, even if `askForRevision` is
- false, this method may result in user interaction, asking user to select which of the
- newest she wants."
-
- self comparePackages:packages askForRevision:askForRevision extensionsOnly:false
-
- "Created: / 04-04-2014 / 15:29:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-comparePackages:packages askForRevision:askForRevision extensionsOnly:extensionsOnly
- "Compares code of given packages (loaded in the image) against a specific revision
- and opens a diff browser on differences.
-
- If `askForRevision` is true, then user is asked to specify to which revision to
- update. If `askForRevision` is false, then packages are updated to a 'newest'
- revision.
-
- NOTE: Definition of `newest` revision may vary. For SCMs which allows for multiple
- heads, it is not clear which one it is. In that case, even if `askForRevision` is
- false, this method may result in user interaction, asking user to select which of the
- newest she wants."
-
- |dateFormat string dateOrNil symbolicNameOrNil
- someDfnClass knownTags includeSubProjectsHolder
- packagesIn packagesCompared|
-
- packagesIn := packages value.
-
- "/ being lazy, assume tags are persistent across packages (which they are not required to be...)
- someDfnClass := ProjectDefinition definitionClassForPackage:packagesIn first.
- someDfnClass isNil ifTrue:[ someDfnClass := Object projectDefinitionClass ].
-
- knownTags := (manager knownTagsFor:someDfnClass) asOrderedCollection sort.
-
- dateFormat := UserPreferences current dateInputFormat.
-
- includeSubProjectsHolder := true asValue.
-
- Dialog
- modifyingBoxWith:[:box |
- box verticalPanel
- add:(CheckBox label:(resources string:'Include Subprojects')
- model:includeSubProjectsHolder).
- ]
- do:[
- |suggestion|
-
- suggestion := LastComparedTag.
- suggestion isNil ifTrue:[ suggestion := Date today printStringFormat:dateFormat ].
-
- string := Dialog
- request:(resources
- string:'Compare with version from date (%2) or tag (any other format) (empty for newest):'
- with:dateFormat)
- initialAnswer:suggestion
- list:knownTags.
- ].
-
- string isNil ifTrue:[^ self].
- string notEmpty ifTrue:[
- dateOrNil := Date readFrom:string printFormat:dateFormat onError:nil.
- dateOrNil isNil ifTrue:[
- symbolicNameOrNil := string
- ].
- ].
-
- LastComparedTag := symbolicNameOrNil.
-
- packagesCompared := packagesIn.
- includeSubProjectsHolder value ifTrue:[
- packagesCompared := Smalltalk allPackageIDs
- select:[:eachPackage |
- packagesIn contains:[:p |
- eachPackage = p
- or:[ (eachPackage startsWith:(p,'-'))
- or:[ (eachPackage startsWith:(p,':')) ]]
- ]
- ]
- ].
-
- packagesCompared value do:[:eachProject |
- dateOrNil notNil ifTrue:[
- self compareProject:eachProject withRepositoryVersionFrom:dateOrNil extensionsOnly:extensionsOnly
- ] ifFalse:[
- self compareProject:eachProject withRepositoryVersionTaggedAs:symbolicNameOrNil extensionsOnly:extensionsOnly
- ]
- ].
-
-
- "Created: / 04-04-2014 / 15:29:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!SourceCodeManagerUtilitiesForContainerBasedManagers class methodsFor:'documentation'!