SourceCodeManagerUtilities.st
author Claus Gittinger <cg@exept.de>
Sun, 12 May 2019 13:22:00 +0200
changeset 4421 d992c2e999b4
parent 4416 2868d1f08a0a
child 4436 63490a8e62a7
permissions -rw-r--r--
#DOCUMENTATION by cg class: SourceCodeManagerUtilities comment/format in: #askForExistingRevision:title:class:manager:module:package:fileName:
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
906
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
     1
"
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
     2
 COPYRIGHT (c) 2000 eXept Software AG
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
     3
              All Rights Reserved
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
     4
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
     5
 This software is furnished under a license and may be used
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
     6
 only in accordance with the terms of that license and with the
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
     8
 be provided or otherwise made available to, or used by, any
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
     9
 other person.  No title to or ownership of the software is
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
    10
 hereby transferred.
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
    11
"
920
ab68cf4c6ee6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
    12
"{ Package: 'stx:libbasic3' }"
ab68cf4c6ee6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
    13
3812
173678af0074 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3692
diff changeset
    14
"{ NameSpace: Smalltalk }"
173678af0074 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3692
diff changeset
    15
873
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
Object subclass:#SourceCodeManagerUtilities
2847
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
    17
	instanceVariableNames:'manager resources confirmNewFiles'
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
    18
	classVariableNames:'LastSourceLogMessage LastModule LastPackage YesToAllQuery
4174
3b55c406664f #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4160
diff changeset
    19
		YesToAllNotification LastSourceLogMessages DefaultUtilities
4329
f1a534377d1e #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4320
diff changeset
    20
		LastTag LastComparedTag AlwaysUpdateVersionMethodsIfNoOtherChange'
2847
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
    21
	poolDictionaries:''
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
    22
	category:'System-SourceCodeManagement'
873
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
!
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
!SourceCodeManagerUtilities class methodsFor:'documentation'!
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
906
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
    27
copyright
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
    28
"
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
    29
 COPYRIGHT (c) 2000 eXept Software AG
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
    30
              All Rights Reserved
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
    31
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
    32
 This software is furnished under a license and may be used
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
    33
 only in accordance with the terms of that license and with the
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
    34
 inclusion of the above copyright notice.   This software may not
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
    35
 be provided or otherwise made available to, or used by, any
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
    36
 other person.  No title to or ownership of the software is
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
    37
 hereby transferred.
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
    38
"
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
    39
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
    40
!
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
    41
873
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
documentation
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
"
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
    utility code which is useful at more than one place
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
    (extracted from the browser)
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
    [author:]
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
        Claus Gittinger (cg@exept)
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    50
    [see also:]
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
    [instance variables:]
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
    [class variables:]
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
"
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
! !
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    57
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
    58
!SourceCodeManagerUtilities class methodsFor:'instance creation'!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
    59
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
    60
forManager: aSourceCodeManager
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
    61
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
    62
    ^self new setManager: aSourceCodeManager
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
    63
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
    64
    "Created: / 10-10-2011 / 11:45:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
2597
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
    65
!
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
    66
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
    67
new
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
    68
    "return an initialized instance"
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
    69
2969
3549ac095c10 changed: #new
Claus Gittinger <cg@exept.de>
parents: 2950
diff changeset
    70
    self == SourceCodeManagerUtilities ifTrue:[ 
3549ac095c10 changed: #new
Claus Gittinger <cg@exept.de>
parents: 2950
diff changeset
    71
        self abstractClassInstantiationError
3549ac095c10 changed: #new
Claus Gittinger <cg@exept.de>
parents: 2950
diff changeset
    72
    ].
2597
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
    73
    ^ self basicNew initialize.
2847
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
    74
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
    75
    "Modified: / 25-07-2012 / 17:10:55 / cg"
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
    76
! !
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
    77
992
83f257a4fa0c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
    78
!SourceCodeManagerUtilities class methodsFor:'Signal constants'!
83f257a4fa0c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
    79
83f257a4fa0c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
    80
yesToAllNotification
83f257a4fa0c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
    81
    YesToAllNotification isNil ifTrue:[
83f257a4fa0c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
    82
        YesToAllNotification := QuerySignal new.
83f257a4fa0c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
    83
    ].
83f257a4fa0c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
    84
    ^ YesToAllNotification
83f257a4fa0c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
    85
!
83f257a4fa0c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
    86
83f257a4fa0c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
    87
yesToAllQuery
83f257a4fa0c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
    88
    YesToAllQuery isNil ifTrue:[
83f257a4fa0c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
    89
        YesToAllQuery := QuerySignal new.
83f257a4fa0c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
    90
    ].
83f257a4fa0c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
    91
    ^ YesToAllQuery
83f257a4fa0c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
    92
! !
83f257a4fa0c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
    93
1084
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
    94
!SourceCodeManagerUtilities class methodsFor:'accessing'!
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
    95
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
    96
default
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
    97
3635
765b567f596a oops - a global variable named "Default" was introduced
Claus Gittinger <cg@exept.de>
parents: 3633
diff changeset
    98
    DefaultUtilities isNil ifTrue:[DefaultUtilities := SourceCodeManagerUtilitiesForContainerBasedManagers new].
3642
28683778b9c3 class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3635
diff changeset
    99
    ^ DefaultUtilities
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   100
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   101
    "Created: / 10-10-2011 / 11:28:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
2864
835ad5141223 changed: #default
Claus Gittinger <cg@exept.de>
parents: 2847
diff changeset
   102
    "Modified: / 26-07-2012 / 20:31:52 / cg"
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   103
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   104
1084
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   105
lastModule
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   106
    "return the value of the static variable 'LastModule' (automatically generated)"
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   107
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   108
    ^ LastModule
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   109
!
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   110
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   111
lastModule:something
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   112
    "set the value of the static variable 'LastModule' (automatically generated)"
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   113
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   114
    LastModule := something.
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   115
!
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   116
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   117
lastPackage
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   118
    "return the value of the static variable 'LastPackage' (automatically generated)"
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   119
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   120
    ^ LastPackage
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   121
!
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   122
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   123
lastPackage:something
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   124
    "set the value of the static variable 'LastPackage' (automatically generated)"
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   125
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   126
    LastPackage := something.
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   127
! !
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   128
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   129
!SourceCodeManagerUtilities class methodsFor:'error handling'!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   130
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   131
doesNotUnderstand: aMessage
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   132
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   133
    (self default respondsTo: aMessage selector) ifTrue:[
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   134
        "Bad, method moved to instance side but not forwarded"
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   135
        self breakPoint: #jv.
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   136
        self breakPoint: #cg.
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   137
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   138
        ^aMessage sendTo: self default
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   139
    ] ifFalse:[
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   140
        ^super doesNotUnderstand: aMessage
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   141
    ]
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   142
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   143
    "Created: / 10-10-2011 / 14:04:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   144
! !
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   145
2569
vrany
parents: 2556
diff changeset
   146
!SourceCodeManagerUtilities class methodsFor:'private-migration'!
vrany
parents: 2556
diff changeset
   147
vrany
parents: 2556
diff changeset
   148
compileForwarders
vrany
parents: 2556
diff changeset
   149
vrany
parents: 2556
diff changeset
   150
    "Utility method"
vrany
parents: 2556
diff changeset
   151
vrany
parents: 2556
diff changeset
   152
    "
vrany
parents: 2556
diff changeset
   153
        SourceCodeManagerUtilities compileForwarders.
vrany
parents: 2556
diff changeset
   154
    "
vrany
parents: 2556
diff changeset
   155
vrany
parents: 2556
diff changeset
   156
    self methodsDo:[:m|
vrany
parents: 2556
diff changeset
   157
        | sel |
vrany
parents: 2556
diff changeset
   158
        sel := m selector.
vrany
parents: 2556
diff changeset
   159
        ((self class includesSelector: sel) and: [(self class >> sel) source = m source]) ifTrue:[
vrany
parents: 2556
diff changeset
   160
            | source header |
vrany
parents: 2556
diff changeset
   161
vrany
parents: 2556
diff changeset
   162
            header := m source asStringCollection first.
vrany
parents: 2556
diff changeset
   163
            source := '%1
vrany
parents: 2556
diff changeset
   164
vrany
parents: 2556
diff changeset
   165
    <resource: #obsolete>
vrany
parents: 2556
diff changeset
   166
vrany
parents: 2556
diff changeset
   167
    self obsoleteMethodWarning: ''Please use instance protocol (SourceCodeManagerUtilities default doSomething)''.
vrany
parents: 2556
diff changeset
   168
vrany
parents: 2556
diff changeset
   169
    ^self default %1' bindWith: header with: header.
vrany
parents: 2556
diff changeset
   170
vrany
parents: 2556
diff changeset
   171
            self halt: 'Inspect source'.
vrany
parents: 2556
diff changeset
   172
            self class compile: source classified: m category.    
vrany
parents: 2556
diff changeset
   173
        ].
vrany
parents: 2556
diff changeset
   174
            
vrany
parents: 2556
diff changeset
   175
    ]
vrany
parents: 2556
diff changeset
   176
vrany
parents: 2556
diff changeset
   177
    "Created: / 11-10-2011 / 10:55:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
vrany
parents: 2556
diff changeset
   178
! !
vrany
parents: 2556
diff changeset
   179
1806
fdcaa790756a resources from libtool
Claus Gittinger <cg@exept.de>
parents: 1800
diff changeset
   180
!SourceCodeManagerUtilities class methodsFor:'resources'!
fdcaa790756a resources from libtool
Claus Gittinger <cg@exept.de>
parents: 1800
diff changeset
   181
fdcaa790756a resources from libtool
Claus Gittinger <cg@exept.de>
parents: 1800
diff changeset
   182
resourcePackage
fdcaa790756a resources from libtool
Claus Gittinger <cg@exept.de>
parents: 1800
diff changeset
   183
    ^ #'stx:libtool'
fdcaa790756a resources from libtool
Claus Gittinger <cg@exept.de>
parents: 1800
diff changeset
   184
! !
fdcaa790756a resources from libtool
Claus Gittinger <cg@exept.de>
parents: 1800
diff changeset
   185
873
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   186
!SourceCodeManagerUtilities class methodsFor:'utilities'!
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   187
1882
8b3a4c2a2c2a when creating a new container, set the package of all methods.
Claus Gittinger <cg@exept.de>
parents: 1879
diff changeset
   188
classIsNotYetInRepository:aClass withManager:mgr
2570
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
   189
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
   190
    <resource: #obsolete>
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
   191
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
   192
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
   193
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
   194
    ^self default classIsNotYetInRepository:aClass withManager:mgr
1882
8b3a4c2a2c2a when creating a new container, set the package of all methods.
Claus Gittinger <cg@exept.de>
parents: 1879
diff changeset
   195
!
8b3a4c2a2c2a when creating a new container, set the package of all methods.
Claus Gittinger <cg@exept.de>
parents: 1879
diff changeset
   196
1704
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
   197
nameOfExtensionsContainer
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   198
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   199
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   200
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   201
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   202
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   203
    ^self default nameOfExtensionsContainer
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   204
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   205
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   206
setPackageOfAllMethodsIn:aClass to:aPackage
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   207
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   208
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   209
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   210
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   211
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   212
    ^self default setPackageOfAllMethodsIn:aClass to:aPackage
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   213
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   214
    "Modified: / 10-10-2011 / 14:00:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   215
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   216
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   217
setPackageOfAllMethodsInChangeSet:aChangeSet to:aPackage
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   218
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   219
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   220
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   221
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   222
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   223
    ^self default setPackageOfAllMethodsInChangeSet:aChangeSet to:aPackage
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   224
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   225
    "Created: / 10-10-2011 / 14:00:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   226
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   227
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   228
sourceCodeManagerFor:aClass
3370
9953065c1ea1 class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3354
diff changeset
   229
    |mgr assumption|
9953065c1ea1 class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3354
diff changeset
   230
9953065c1ea1 class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3354
diff changeset
   231
    mgr := aClass theNonMetaclass sourceCodeManager.
9953065c1ea1 class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3354
diff changeset
   232
    mgr isNil ifTrue:[
9953065c1ea1 class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3354
diff changeset
   233
        SourceCodeManager isNil ifTrue:[
9953065c1ea1 class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3354
diff changeset
   234
            "/ self warn:'SourceCodeManagement is disabled or not configured.\\Please setup in the Launcher.' withCRs.
9953065c1ea1 class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3354
diff changeset
   235
            ^ nil.
9953065c1ea1 class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3354
diff changeset
   236
        ].
9953065c1ea1 class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3354
diff changeset
   237
        assumption := AbstractSourceCodeManager defaultManager ? CVSSourceCodeManager.
9953065c1ea1 class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3354
diff changeset
   238
        assumption notNil ifTrue:[
9953065c1ea1 class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3354
diff changeset
   239
            (self confirm:('Class does not seem to provide a valid sourceCodeManager.\\Assume %1 ?' bindWith:assumption managerTypeName) withCRs) ifFalse:[
9953065c1ea1 class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3354
diff changeset
   240
                ^ nil
9953065c1ea1 class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3354
diff changeset
   241
            ].
9953065c1ea1 class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3354
diff changeset
   242
            mgr := assumption.
9953065c1ea1 class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3354
diff changeset
   243
        ].
9953065c1ea1 class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3354
diff changeset
   244
    ].
9953065c1ea1 class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3354
diff changeset
   245
    ^ mgr
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   246
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   247
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   248
sourceCodeOfClass:aClass
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   249
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   250
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   251
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   252
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   253
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   254
    ^self default sourceCodeOfClass:aClass
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   255
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   256
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   257
versionString:a isLessThan:b
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   258
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   259
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   260
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   261
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   262
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   263
    ^self default versionString:a isLessThan:b
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   264
! !
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   265
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   266
!SourceCodeManagerUtilities class methodsFor:'utilities-cvs'!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   267
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   268
changeSetForExtensionMethodsForPackage:packageToCheckOut askForRevision:askForRevision usingManager:aSourceCodeManager
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   269
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   270
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   271
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   272
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   273
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   274
    ^self default changeSetForExtensionMethodsForPackage:packageToCheckOut askForRevision:askForRevision usingManager:aSourceCodeManager
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   275
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   276
    "Created: / 29-12-2011 / 14:28:08 / cg"
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   277
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   278
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   279
changeSetForExtensionMethodsForPackage:packageToCheckOut revision:revisionOrNil orAskForRevision:askForRevision usingManager:aSourceCodeManager
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   280
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   281
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   282
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   283
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   284
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   285
    ^self default 
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   286
        changeSetForExtensionMethodsForPackage:packageToCheckOut 
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   287
        revision:revisionOrNil 
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   288
        orAskForRevision:askForRevision 
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   289
        usingManager:aSourceCodeManager
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   290
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   291
    "Created: / 29-12-2011 / 14:28:14 / cg"
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   292
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   293
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   294
checkForExistingModule:module directory:directory container:containerFileName usingManager:mgr allowCreate:allowCreate
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   295
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   296
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   297
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   298
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   299
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   300
    ^self default checkForExistingModule:module directory:directory container:containerFileName usingManager:mgr allowCreate:allowCreate
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   301
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   302
    "Created: / 29-12-2011 / 14:30:37 / cg"
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   303
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   304
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   305
checkForExistingModule:module directory:directory usingManager:mgr allowCreate:allowCreate
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   306
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   307
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   308
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   309
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   310
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   311
    ^self default checkForExistingModule:module directory:directory usingManager:mgr allowCreate:allowCreate
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   312
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   313
    "Created: / 29-12-2011 / 14:29:02 / cg"
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   314
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   315
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   316
checkForExistingModule:module usingManager:mgr allowCreate:allowCreate
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   317
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   318
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   319
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   320
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   321
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   322
    ^self default checkForExistingModule:module usingManager:mgr allowCreate:allowCreate
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   323
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   324
    "Created: / 29-12-2011 / 14:30:00 / cg"
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   325
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   326
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   327
checkinClass:aClass
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   328
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   329
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   330
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   331
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   332
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   333
    ^self default checkinClass:aClass
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   334
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   335
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   336
checkinClass:aClass withInfo:aLogInfoOrNil
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   337
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   338
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   339
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   340
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   341
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   342
    ^self default checkinClass:aClass withInfo:aLogInfoOrNil
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   343
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   344
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   345
checkinClass:aClass withInfo:aLogInfoOrNil withCheck:doCheckClass
2569
vrany
parents: 2556
diff changeset
   346
vrany
parents: 2556
diff changeset
   347
    <resource: #obsolete>
vrany
parents: 2556
diff changeset
   348
vrany
parents: 2556
diff changeset
   349
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
vrany
parents: 2556
diff changeset
   350
vrany
parents: 2556
diff changeset
   351
    ^self default checkinClass:aClass withInfo:aLogInfoOrNil withCheck:doCheckClass
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   352
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   353
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   354
checkinClasses:aCollectionOfClass
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   355
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   356
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   357
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   358
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   359
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   360
    ^self default checkinClasses:aCollectionOfClass
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   361
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   362
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   363
checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrNil
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   364
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   365
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   366
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   367
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   368
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   369
    ^self default checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrNil
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   370
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   371
4276
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
   372
checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrNil onBranch:branchNameOrNil
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
   373
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
   374
    <resource: #obsolete>
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
   375
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
   376
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
   377
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
   378
    ^self default checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrNil onBranch:branchNameOrNil
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
   379
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
   380
    "Created: / 05-12-2017 / 20:15:04 / cg"
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
   381
!
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
   382
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   383
checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrStringNil withCheck:doCheckClasses
2569
vrany
parents: 2556
diff changeset
   384
vrany
parents: 2556
diff changeset
   385
    <resource: #obsolete>
vrany
parents: 2556
diff changeset
   386
vrany
parents: 2556
diff changeset
   387
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
vrany
parents: 2556
diff changeset
   388
vrany
parents: 2556
diff changeset
   389
    ^self default checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrStringNil withCheck:doCheckClasses
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   390
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   391
4276
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
   392
checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrStringNil withCheck:doCheckClasses onBranch:branchNameOrNil
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
   393
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
   394
    <resource: #obsolete>
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
   395
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
   396
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
   397
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
   398
    ^self default checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrStringNil withCheck:doCheckClasses onBranch:branchNameOrNil
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
   399
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
   400
    "Created: / 05-12-2017 / 20:15:55 / cg"
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
   401
!
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
   402
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   403
checkinExtensionMethods:aCollectionOfMethods forPackage:aPackageID withInfo:aLogInfoOrStringOrNil
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   404
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   405
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   406
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   407
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   408
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   409
    ^self default checkinExtensionMethods:aCollectionOfMethods forPackage:aPackageID withInfo:aLogInfoOrStringOrNil
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   410
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   411
4276
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
   412
checkinExtensionMethods:aCollectionOfMethods forPackage:aPackageID withInfo:aLogInfoOrStringOrNil onBranch:branchNameOrNil
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
   413
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
   414
    <resource: #obsolete>
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
   415
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
   416
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
   417
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
   418
    ^self default checkinExtensionMethods:aCollectionOfMethods forPackage:aPackageID withInfo:aLogInfoOrStringOrNil onBranch:branchNameOrNil
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
   419
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
   420
    "Created: / 05-12-2017 / 20:13:44 / cg"
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
   421
!
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
   422
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   423
checkoutClass:aClass askForMerge:askForMerge
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   424
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   425
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   426
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   427
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   428
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   429
    ^self default checkoutClass:aClass askForMerge:askForMerge
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   430
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   431
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   432
checkoutClass:aClass askForRevision:askForRevision askForMerge:askForMerge
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   433
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   434
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   435
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   436
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   437
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   438
    ^self default checkoutClass:aClass askForRevision:askForRevision askForMerge:askForMerge
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   439
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   440
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   441
checkoutClass:aClass askForRevision:askForRevision askForMerge:askForMerge askForConfirmation:askForConfirmation
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   442
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   443
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   444
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   445
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   446
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   447
    ^self default checkoutClass:aClass askForRevision:askForRevision askForMerge:askForMerge askForConfirmation:askForConfirmation
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   448
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   449
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   450
checkoutExtensionMethodsForPackage:packageToCheckOut askForRevision:askForRevision askForMerge:askForMerge usingManager:aSourceCodeManager
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   451
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   452
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   453
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   454
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   455
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   456
    ^self default checkoutExtensionMethodsForPackage:packageToCheckOut askForRevision:askForRevision askForMerge:askForMerge usingManager:aSourceCodeManager
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   457
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   458
    "Created: / 29-12-2011 / 14:34:24 / cg"
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   459
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   460
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   461
compareClassWithRepository:aClass
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   462
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   463
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   464
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   465
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   466
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   467
    ^self default compareClassWithRepository:aClass
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   468
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   469
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   470
compareClassWithRepository:aClass askForRevision:askForRevision
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   471
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   472
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   473
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   474
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   475
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   476
    ^self default compareClassWithRepository:aClass askForRevision:askForRevision
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   477
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   478
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   479
compareProject:aProject withRepositoryVersionFrom:aDateOrNilForNewest
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   480
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   481
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   482
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   483
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   484
3926
b40b391c71b6 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 3919
diff changeset
   485
    ^self compareProject:aProject withRepositoryVersionFrom:aDateOrNilForNewest extensionsOnly:false
b40b391c71b6 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 3919
diff changeset
   486
!
b40b391c71b6 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 3919
diff changeset
   487
b40b391c71b6 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 3919
diff changeset
   488
compareProject:aProject withRepositoryVersionFrom:aDateOrNilForNewest extensionsOnly:extensionsOnly
b40b391c71b6 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 3919
diff changeset
   489
b40b391c71b6 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 3919
diff changeset
   490
    <resource: #obsolete>
b40b391c71b6 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 3919
diff changeset
   491
b40b391c71b6 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 3919
diff changeset
   492
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
b40b391c71b6 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 3919
diff changeset
   493
b40b391c71b6 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 3919
diff changeset
   494
    ^self default compareProject:aProject withRepositoryVersionFrom:aDateOrNilForNewest extensionsOnly:extensionsOnly
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   495
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   496
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   497
compareProjectWithRepository:aProject
2569
vrany
parents: 2556
diff changeset
   498
vrany
parents: 2556
diff changeset
   499
    <resource: #obsolete>
vrany
parents: 2556
diff changeset
   500
vrany
parents: 2556
diff changeset
   501
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
vrany
parents: 2556
diff changeset
   502
vrany
parents: 2556
diff changeset
   503
    ^self default compareProjectWithRepository:aProject
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   504
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   505
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   506
createSourceContainerForClass:aClass
2569
vrany
parents: 2556
diff changeset
   507
vrany
parents: 2556
diff changeset
   508
    <resource: #obsolete>
vrany
parents: 2556
diff changeset
   509
vrany
parents: 2556
diff changeset
   510
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
vrany
parents: 2556
diff changeset
   511
vrany
parents: 2556
diff changeset
   512
    ^self default createSourceContainerForClass:aClass
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   513
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   514
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   515
defineSourceContainerForClass:aClass title:title text:boxText createDirectories:createDirs createContainer:createContainer
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   516
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   517
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   518
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   519
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   520
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   521
    ^self default defineSourceContainerForClass:aClass title:title text:boxText createDirectories:createDirs createContainer:createContainer
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   522
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   523
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   524
diffSetOfProject:aProject againstRepositoryVersionFrom:aDateOrNilForNewest
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   525
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   526
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   527
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   528
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   529
3926
b40b391c71b6 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 3919
diff changeset
   530
    ^self diffSetOfProject:aProject againstRepositoryVersionFrom:aDateOrNilForNewest extensionsOnly:false
b40b391c71b6 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 3919
diff changeset
   531
!
b40b391c71b6 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 3919
diff changeset
   532
b40b391c71b6 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 3919
diff changeset
   533
diffSetOfProject:aProject againstRepositoryVersionFrom:aDateOrNilForNewest extensionsOnly:extensionsOnly
b40b391c71b6 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 3919
diff changeset
   534
b40b391c71b6 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 3919
diff changeset
   535
    <resource: #obsolete>
b40b391c71b6 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 3919
diff changeset
   536
b40b391c71b6 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 3919
diff changeset
   537
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
b40b391c71b6 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 3919
diff changeset
   538
b40b391c71b6 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 3919
diff changeset
   539
    ^self default 
b40b391c71b6 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 3919
diff changeset
   540
        diffSetOfProject:aProject 
b40b391c71b6 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 3919
diff changeset
   541
        againstRepositoryVersionFrom:aDateOrNilForNewest 
b40b391c71b6 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 3919
diff changeset
   542
        extensionsOnly:extensionsOnly
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   543
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   544
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   545
ensureCorrectVersionMethodsInClass:aClass usingManager:aManager
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   546
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   547
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   548
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   549
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   550
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   551
    ^self default ensureCorrectVersionMethodsInClass:aClass usingManager:aManager
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   552
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   553
    "Created: / 29-12-2011 / 14:33:37 / cg"
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   554
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   555
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   556
getLogMessageForClassCheckinTakingDefaultsFromPreviousLogInfo:aLogInfoOrNil forClass:aClass valuesInto:aBlock
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   557
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   558
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   559
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   560
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   561
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   562
    ^self default getLogMessageForClassCheckinTakingDefaultsFromPreviousLogInfo:aLogInfoOrNil forClass:aClass valuesInto:aBlock
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   563
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   564
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   565
removeSourceContainerForClass:aClass
2569
vrany
parents: 2556
diff changeset
   566
vrany
parents: 2556
diff changeset
   567
    <resource: #obsolete>
vrany
parents: 2556
diff changeset
   568
vrany
parents: 2556
diff changeset
   569
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
vrany
parents: 2556
diff changeset
   570
vrany
parents: 2556
diff changeset
   571
    ^self default removeSourceContainerForClass:aClass
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   572
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   573
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   574
removeSourceContainerForClass:aClass confirm:doConfirm warn:doWarn
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   575
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   576
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   577
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   578
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   579
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   580
    ^self default removeSourceContainerForClass:aClass confirm:doConfirm warn:doWarn
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   581
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   582
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   583
repositoryLogOf:aClass onto:aStream
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   584
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   585
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   586
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   587
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   588
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   589
    ^self default repositoryLogOf:aClass onto:aStream
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   590
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   591
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   592
repositoryLogOf:aClass short:shortOrNot onto:aStream
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   593
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   594
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   595
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   596
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   597
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   598
    ^self default repositoryLogOf:aClass short:shortOrNot onto:aStream
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   599
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   600
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   601
tagClass:aClass as:tag
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   602
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   603
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   604
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   605
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   606
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   607
    ^self default tagClass:aClass as:tag
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   608
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   609
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   610
tagClasses:aCollectionOfClasses as:tag
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   611
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   612
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   613
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   614
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   615
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   616
    ^self default tagClasses:aCollectionOfClasses as:tag
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   617
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   618
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   619
tagPath:aPath as:tag usingManager:aManager
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   620
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   621
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   622
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   623
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   624
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   625
    ^self default tagPath:aPath as:tag usingManager:aManager
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   626
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   627
    "Created: / 29-12-2011 / 14:31:43 / cg"
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   628
! !
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   629
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   630
!SourceCodeManagerUtilities class methodsFor:'utilities-cvs-helpers'!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   631
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   632
getMethodVersionsOfClass:aClass selector:selector numberOfRevisions:numberOfRevisionsOrNil
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   633
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   634
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   635
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   636
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   637
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   638
    ^self default getMethodVersionsOfClass:aClass selector:selector numberOfRevisions:numberOfRevisionsOrNil
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   639
! !
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   640
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   641
!SourceCodeManagerUtilities class methodsFor:'utilities-cvs-user interaction'!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   642
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   643
askForContainer:boxText title:title note:notice initialModule:initialModule initialPackage:initialPackage initialFileName:initialFileName
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   644
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   645
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   646
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   647
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   648
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   649
    ^self default askForContainer:boxText title:title note:notice initialModule:initialModule initialPackage:initialPackage initialFileName:initialFileName
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   650
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   651
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   652
askForContainer:boxText title:title note:notice initialModule:initialModule initialPackage:initialPackage initialFileName:initialFileName forNewContainer:forNewContainer
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   653
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   654
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   655
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   656
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   657
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   658
    ^self default askForContainer:boxText title:title note:notice initialModule:initialModule initialPackage:initialPackage initialFileName:initialFileName forNewContainer:forNewContainer
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   659
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   660
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   661
askForExistingRevision:boxText title:title class:aClass
2570
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
   662
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
   663
    <resource: #obsolete>
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
   664
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
   665
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
   666
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
   667
    ^self default askForExistingRevision:boxText title:title class:aClass
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   668
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   669
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   670
askForExistingRevision:boxText title:title class:clsOrNil manager:aSourceCodeManager module:module package:directory fileName:fileName
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   671
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   672
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   673
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   674
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   675
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   676
    ^self default askForExistingRevision:boxText title:title class:clsOrNil manager:aSourceCodeManager module:module package:directory fileName:fileName
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   677
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   678
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   679
checkAndWarnAboutBadMessagesInClass:aClass checkAgainHolder:checkAgainHolder
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   680
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   681
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   682
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   683
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   684
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   685
    ^self default checkAndWarnAboutBadMessagesInClass:aClass checkAgainHolder:checkAgainHolder
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   686
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   687
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   688
getCheckinInfoFor:aClassNameOrPackageNameString initialAnswer:initialAnswerOrNil
2795
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
   689
    ^self default 
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
   690
        getCheckinInfoFor:aClassNameOrPackageNameString     
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
   691
        initialAnswer:initialAnswerOrNil
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
   692
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
   693
    "Modified: / 12-03-2012 / 12:56:45 / cg"
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   694
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   695
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   696
getCheckinInfoFor:aClassNameOrPackageNameString initialAnswer:initialAnswerOrNil withQuickOption:withQuickOption
2795
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
   697
    ^self default 
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
   698
        getCheckinInfoFor:aClassNameOrPackageNameString 
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
   699
        initialAnswer:initialAnswerOrNil 
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
   700
        withQuickOption:withQuickOption
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
   701
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
   702
    "Modified: / 12-03-2012 / 12:56:50 / cg"
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   703
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   704
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   705
goodInitialLogMessageForCheckinClassOfClass:aClass
4230
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   706
    "figure out, if there were any non-comment changes. 
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   707
     Provide a reasonable initial log message (I am tired of typing in 'comment only').
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   708
     This is a q&d hack - not complete and not correct (for example, it will generate a method change
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   709
     info line, even if the selector was removed afterwards).
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   710
     So check the outcome."
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   711
4301
14f350f36eea #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4295
diff changeset
   712
    |printSelectors initialLogStream additionalInfoPerChangedSelector changesForThisCheckin changesPerClass|
4230
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   713
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   714
    "/ a helper function
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   715
    printSelectors := 
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   716
        [:what :selectors :more |
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   717
            |sel moreInfo|
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   718
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   719
            selectors remove:nil ifAbsent:[].
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   720
            initialLogStream nextPutAll:(what,':').
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   721
            selectors size < 15 ifTrue:[
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   722
                selectors size == 1 ifTrue:[
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   723
                    sel := selectors first.
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   724
                    initialLogStream nextPutAll: ' #'; nextPutAll:sel.
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   725
                    more ifTrue:[
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   726
                        (moreInfo := additionalInfoPerChangedSelector at:sel ifAbsent:nil) notNil ifTrue:[
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   727
                            initialLogStream space; nextPutAll:moreInfo.
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   728
                        ]
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   729
                    ].
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   730
                    initialLogStream cr.
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   731
                ] ifFalse:[
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   732
                    initialLogStream cr.
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   733
                    selectors asSortedCollection do:[:sel | 
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   734
                        initialLogStream tab; nextPutAll:'#'; nextPutAll:sel. 
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   735
                        more ifTrue:[
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   736
                            (moreInfo := additionalInfoPerChangedSelector at:sel ifAbsent:nil) notNil ifTrue:[
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   737
                                initialLogStream space; nextPutAll:moreInfo.
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   738
                            ].
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   739
                        ].
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   740
                        initialLogStream cr
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   741
                    ].
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   742
                ].
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   743
            ] ifFalse:[
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   744
                initialLogStream 
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   745
                    print: (selectors size); nextPutAll: ' methods'; cr.
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   746
            ].
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   747
        ].
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   748
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   749
    changesForThisCheckin := ChangeSet current 
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   750
                                select:[:aChange | 
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   751
                                    |changeClass|
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   752
4241
6aa29eece1bb #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4230
diff changeset
   753
                                    aChange isClassChange 
6aa29eece1bb #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4230
diff changeset
   754
                                    and:[ aChange changeClass notNil
6aa29eece1bb #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4230
diff changeset
   755
                                    and:[
4230
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   756
                                        changeClass := aChange changeClass theNonMetaclass.
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   757
                                        changeClass == aClass or:[changeClass topOwningClass == aClass]
4241
6aa29eece1bb #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4230
diff changeset
   758
                                    ]].
4230
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   759
                                ].
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   760
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   761
    changesForThisCheckin sort:[:a :b| a className < b className].
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   762
    changesPerClass := changesForThisCheckin asCollectionOfSubCollectionsSeparatedByAnyChange:[:prev :curr| prev className ~= curr className].
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   763
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   764
    initialLogStream := '' writeStream.
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   765
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   766
    changesPerClass do:[:changesForThisClass|
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   767
        |selectorsInChangeSet newSelectors modifiedSelectors definitionChangesForThisClass methodChangesForThisClass 
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   768
         allMethodChangesForThisClass modifiedMethodsForThisClass newMethodsForThisClass removedMethodsForThisClass
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   769
         selectorsWithCommentOrFormattingChangeOnly
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   770
         selectorsWithVariableChangeOnly newSelectorsRemoved
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   771
         removedSelectors categoryChanges categoryChangeSelectors|
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   772
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   773
        additionalInfoPerChangedSelector := Dictionary new.
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   774
        definitionChangesForThisClass := changesForThisClass reject:[:aChange | aChange isMethodChange].
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   775
        categoryChanges := changesForThisClass select:[:aChange | aChange isMethodCategoryChange]. 
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   776
        categoryChangeSelectors := categoryChanges collect:[:aChange | aChange changeSelector] as:Set.
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   777
        allMethodChangesForThisClass := changesForThisClass select:[:aChange | aChange isMethodCodeChange].
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   778
        selectorsInChangeSet := allMethodChangesForThisClass collect:[:aChange | aChange changeSelector] as:Set.
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   779
        methodChangesForThisClass := selectorsInChangeSet collect:[:eachSelector |
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   780
                                            allMethodChangesForThisClass detectLast:[:change | change changeSelector = eachSelector]] as:OrderedCollection.
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   781
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   782
        modifiedMethodsForThisClass := methodChangesForThisClass 
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   783
                                    select:[:aChange | aChange previousVersion notNil].
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   784
        modifiedSelectors := modifiedMethodsForThisClass collect:[:aChange | aChange changeSelector] as:Set.
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   785
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   786
        newMethodsForThisClass := allMethodChangesForThisClass 
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   787
                                    select:[:aChange | aChange previousVersion isNil].
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   788
        newSelectors := newMethodsForThisClass collect:[:aChange | aChange changeSelector] as:Set.
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   789
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   790
        removedMethodsForThisClass := changesForThisClass 
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   791
                                    select:[:aChange | aChange isMethodRemoveChange and:[ aChange changeMethod isNil ]].
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   792
        removedSelectors := removedMethodsForThisClass collect:[:aChange | aChange changeSelector] as:Set.
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   793
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   794
        "/ get rid of category changes for new and removed methods
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   795
        categoryChanges := categoryChanges reject:[:chg |
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   796
                                |methodWithChangedCat|
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   797
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   798
                                (methodWithChangedCat := chg changeMethod) isNil
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   799
                                or:[ newMethodsForThisClass contains:[:newChg | newChg changeMethod = methodWithChangedCat]]].
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   800
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   801
        initialLogStream nextPutLine:'class: ', changesForThisClass first className.
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   802
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   803
        "/ definition?
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   804
        "/ suppress definition-message if initial checkin
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   805
        (aClass package isNil or:[aClass revision isNil]) ifFalse:[ 
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   806
            definitionChangesForThisClass notEmpty ifTrue:[
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   807
                "/ self halt.
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   808
                initialLogStream nextPutLine:'class definition'.
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   809
            ].
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   810
        ].
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   811
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   812
        "/ added selectors?
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   813
        newSelectorsRemoved := newSelectors select:[:sel | removedSelectors includes:sel].
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   814
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   815
        newSelectors removeAllFoundIn:removedSelectors.
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   816
        newSelectors notEmpty ifTrue:[
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   817
            printSelectors value:'added' value:newSelectors value:false.
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   818
        ].
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   819
        modifiedSelectors removeAllFoundIn:newSelectors.
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   820
        categoryChangeSelectors removeAllFoundIn:newSelectors.
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   821
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   822
        "/ removed selectors?
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   823
        removedSelectors removeAllFoundIn:newSelectorsRemoved.
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   824
        removedSelectors notEmpty ifTrue:[
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   825
            printSelectors value:'removed' value:removedSelectors value:false.
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   826
        ].
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   827
        modifiedSelectors removeAllFoundIn:removedSelectors.
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   828
        categoryChangeSelectors removeAllFoundIn:removedSelectors.
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   829
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   830
        "/ modifications?
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   831
        modifiedSelectors notEmpty ifTrue:[
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   832
            selectorsWithCommentOrFormattingChangeOnly := Set new.
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   833
            selectorsWithVariableChangeOnly := Set new.
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   834
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   835
            "/ check for format/comment change
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   836
            RBParser notNil ifTrue:[
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   837
                modifiedSelectors do:[:eachSelector |
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   838
                    |oldest newest oldMethod newMethod oldTree newTree 
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   839
                     variableMapping selectorMapping unchangedVariables unchangedSelectors|
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   840
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   841
                    (newSelectors includes:eachSelector) ifFalse:[
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   842
                        oldest := allMethodChangesForThisClass detect:[:change | change changeSelector = eachSelector].
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   843
                        newest := allMethodChangesForThisClass detectLast:[:change | change changeSelector = eachSelector].
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   844
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   845
                        oldest := oldest previousVersion notNil ifTrue:[oldest previousVersion] ifFalse:[oldest].
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   846
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   847
                        oldTree := RBParser parseMethod:oldest source onError:[:aString :pos | nil].
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   848
                        newTree := RBParser parseMethod:newest source onError:[:aString :pos | nil].
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   849
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   850
                        (oldTree notNil and:[newTree notNil]) ifTrue:[
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   851
                            variableMapping := Dictionary new.
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   852
                            (oldTree "semanticallyEqualTo:" equalTo:newTree withMapping: variableMapping) ifTrue:[
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   853
                                unchangedVariables := variableMapping keys select:[:k | (variableMapping at:k) = k].
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   854
                                variableMapping removeAllKeys:unchangedVariables.
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   855
4301
14f350f36eea #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4295
diff changeset
   856
                                (((variableMapping at:'self' ifAbsent:'self') = 'self')
14f350f36eea #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4295
diff changeset
   857
                                and:[ (variableMapping keyAtEqualValue:'self' ifAbsent:'self') = 'self']) ifTrue:[
4230
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   858
                                    ((variableMapping associations count:[:assoc | assoc key ~= assoc value]) == 0) ifTrue:[
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   859
                                        selectorsWithCommentOrFormattingChangeOnly add:eachSelector.
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   860
                                    ] ifFalse:[
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   861
                                        "/ check, if a global has changed (aka sends to another global)
4245
97f781d28031 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4241
diff changeset
   862
                                        ((variableMapping keys contains:[:var | var isUppercaseFirst])
97f781d28031 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4241
diff changeset
   863
                                        or:[ (variableMapping values contains:[:var | var isUppercaseFirst]) ]) ifFalse:[
4230
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   864
                                            selectorsWithVariableChangeOnly add:eachSelector.
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   865
                                        ].
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   866
                                    ].
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   867
                                ].
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   868
                            ] ifFalse:[
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   869
                                selectorMapping := Dictionary new.
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   870
                                (oldTree equalTo:newTree withSelectorMapping: selectorMapping) ifTrue:[
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   871
                                    unchangedSelectors := selectorMapping keys select:[:k | (selectorMapping at:k) = k].
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   872
                                    selectorMapping removeAllKeys:unchangedSelectors.
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   873
                                    (selectorMapping notEmpty and:[selectorMapping size <= 2]) ifTrue:[
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   874
                                        additionalInfoPerChangedSelector at:eachSelector put:(
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   875
                                            String streamContents:[:s |
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   876
                                                |first|
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   877
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   878
                                                s nextPutAll:'('.
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   879
                                                first := true.
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   880
                                                selectorMapping keysAndValuesDo:[:selOld :selNew | 
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   881
                                                    first ifFalse:[s nextPutAll:', '].
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   882
                                                    s print:('send #',selNew,' instead of #',selOld).
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   883
                                                    first := false.
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   884
                                                ].
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   885
                                                s nextPutAll:')'.
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   886
                                            ]).
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   887
                                    ]
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   888
                                ]
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   889
                            ].
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   890
                        ].
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   891
                    ]
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   892
                ].
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   893
            ].
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   894
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   895
            modifiedSelectors removeAllFoundIn:selectorsWithCommentOrFormattingChangeOnly.
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   896
            modifiedSelectors removeAllFoundIn:selectorsWithVariableChangeOnly.
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   897
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   898
            (selectorsWithCommentOrFormattingChangeOnly notEmpty) ifTrue:[
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   899
                printSelectors value:'comment/format in' value:selectorsWithCommentOrFormattingChangeOnly value:false.
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   900
            ].
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   901
            (selectorsWithVariableChangeOnly notEmpty) ifTrue:[
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   902
                printSelectors value:'variable renamed in' value:selectorsWithVariableChangeOnly value:false.
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   903
            ].
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   904
            (modifiedSelectors notEmpty) ifTrue:[
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   905
                printSelectors value:'changed' value:modifiedSelectors value:true.
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   906
            ].
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   907
        ].
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   908
        categoryChanges notEmpty ifTrue:[
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   909
            printSelectors value:'category of' value:categoryChangeSelectors value:false.
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   910
        ].
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   911
    ] separatedBy:[
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   912
        initialLogStream cr.
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   913
    ].
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   914
    ^ initialLogStream contents
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   915
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
   916
    "Modified: / 17-03-2017 / 18:39:28 / stefan"
4245
97f781d28031 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4241
diff changeset
   917
    "Modified: / 22-06-2017 / 06:54:44 / cg"
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   918
! !
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   919
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   920
!SourceCodeManagerUtilities class methodsFor:'utilities-encoding'!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   921
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   922
guessEncodingOfFile:aFilename
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   923
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   924
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   925
2818
82c73234ac2d changed: #guessEncodingOfFile:
Stefan Vogel <sv@exept.de>
parents: 2817
diff changeset
   926
    self obsoleteMethodWarning:'ask CharacterEncoder'.
82c73234ac2d changed: #guessEncodingOfFile:
Stefan Vogel <sv@exept.de>
parents: 2817
diff changeset
   927
    ^ CharacterEncoder guessEncodingOfFile:aFilename
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   928
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   929
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   930
guessEncodingOfStream:aStream
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   931
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   932
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   933
2817
8a836ca902d4 changed: #guessEncodingOfStream:
Stefan Vogel <sv@exept.de>
parents: 2796
diff changeset
   934
    self obsoleteMethodWarning:'ask CharacterEncoder'.
8a836ca902d4 changed: #guessEncodingOfStream:
Stefan Vogel <sv@exept.de>
parents: 2796
diff changeset
   935
    ^ CharacterEncoder guessEncodingOfStream:aStream
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   936
! !
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   937
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   938
!SourceCodeManagerUtilities methodsFor:'accessing'!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   939
2847
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   940
confirmNewFiles:aBoolean
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   941
    "if true, ask if new files are about to be added to the repo"
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   942
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   943
    confirmNewFiles := aBoolean.
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   944
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   945
    "Modified (comment): / 24-07-2012 / 18:18:34 / cg"
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   946
!
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   947
2795
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
   948
lastSourceLogMessageHeadlines
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
   949
    LastSourceLogMessage isNil ifTrue:[
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
   950
        LastSourceLogMessages := OrderedCollection new.
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
   951
    ].
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
   952
    ^ LastSourceLogMessages 
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
   953
        collect:[:msg |
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
   954
            msg withoutLeadingSeparators asCollectionOfLines first , '...'
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
   955
        ]
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
   956
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
   957
    "Created: / 12-03-2012 / 12:34:35 / cg"
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
   958
!
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
   959
2569
vrany
parents: 2556
diff changeset
   960
yesToAllNotification
vrany
parents: 2556
diff changeset
   961
vrany
parents: 2556
diff changeset
   962
    ^self class yesToAllNotification
vrany
parents: 2556
diff changeset
   963
vrany
parents: 2556
diff changeset
   964
    "Created: / 11-10-2011 / 12:01:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
vrany
parents: 2556
diff changeset
   965
!
vrany
parents: 2556
diff changeset
   966
vrany
parents: 2556
diff changeset
   967
yesToAllQuery
vrany
parents: 2556
diff changeset
   968
vrany
parents: 2556
diff changeset
   969
    ^self class yesToAllQuery
vrany
parents: 2556
diff changeset
   970
vrany
parents: 2556
diff changeset
   971
    "Created: / 11-10-2011 / 12:01:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   972
! !
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   973
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   974
!SourceCodeManagerUtilities methodsFor:'error handling'!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   975
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   976
doesNotUnderstand: aMessage
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   977
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   978
    (self class respondsTo: aMessage selector) ifTrue:[
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   979
        "Bad, method is not moved the the instance side"
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   980
        self breakPoint: #jv.
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   981
        self breakPoint: #cg.
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   982
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   983
        ^aMessage sendTo: self class
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   984
    ] ifFalse:[
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   985
        ^super doesNotUnderstand: aMessage
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   986
    ]
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   987
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   988
    "Created: / 10-10-2011 / 14:02:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   989
! !
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   990
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   991
!SourceCodeManagerUtilities methodsFor:'initialization'!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   992
2597
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
   993
initialize
2847
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   994
    confirmNewFiles := true.
3551
e8feddd829f9 class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3546
diff changeset
   995
    resources := self class classResources.
2597
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
   996
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
   997
    "Modified: / 13-10-2011 / 11:03:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
2847
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   998
    "Modified: / 24-07-2012 / 18:17:57 / cg"
2597
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
   999
!
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1000
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
  1001
setManager: aSourceCodeManager
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
  1002
2847
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  1003
    manager := aSourceCodeManager.
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  1004
    manager isContainerBased ifFalse:[
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  1005
        confirmNewFiles isNil "not yet set by user" ifTrue:[
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  1006
            confirmNewFiles := false.
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  1007
        ]
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  1008
    ].
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
  1009
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
  1010
    "Created: / 10-10-2011 / 11:47:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
2847
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  1011
    "Modified: / 25-07-2012 / 08:35:35 / cg"
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
  1012
! !
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
  1013
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
  1014
!SourceCodeManagerUtilities methodsFor:'utilities'!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
  1015
2569
vrany
parents: 2556
diff changeset
  1016
classIsNotYetInRepository:aClass withManager:mgr
vrany
parents: 2556
diff changeset
  1017
    |info|
vrany
parents: 2556
diff changeset
  1018
vrany
parents: 2556
diff changeset
  1019
    info := mgr sourceInfoOfClass:aClass.
vrany
parents: 2556
diff changeset
  1020
vrany
parents: 2556
diff changeset
  1021
    ^ (info isNil 
vrany
parents: 2556
diff changeset
  1022
    or:[(info at:#fileName ifAbsent:nil) isNil
vrany
parents: 2556
diff changeset
  1023
    or:[(info at:#module ifAbsent:nil) isNil
vrany
parents: 2556
diff changeset
  1024
    or:[(info at:#directory ifAbsent:nil) isNil]]])
vrany
parents: 2556
diff changeset
  1025
vrany
parents: 2556
diff changeset
  1026
    "Created: / 25-10-2006 / 09:43:00 / cg"
vrany
parents: 2556
diff changeset
  1027
!
vrany
parents: 2556
diff changeset
  1028
2673
06f4f56d7818 added: #defaultManager
Claus Gittinger <cg@exept.de>
parents: 2670
diff changeset
  1029
defaultManager
06f4f56d7818 added: #defaultManager
Claus Gittinger <cg@exept.de>
parents: 2670
diff changeset
  1030
    ^ manager
06f4f56d7818 added: #defaultManager
Claus Gittinger <cg@exept.de>
parents: 2670
diff changeset
  1031
06f4f56d7818 added: #defaultManager
Claus Gittinger <cg@exept.de>
parents: 2670
diff changeset
  1032
    "Created: / 22-12-2011 / 10:59:28 / cg"
06f4f56d7818 added: #defaultManager
Claus Gittinger <cg@exept.de>
parents: 2670
diff changeset
  1033
!
06f4f56d7818 added: #defaultManager
Claus Gittinger <cg@exept.de>
parents: 2670
diff changeset
  1034
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
  1035
nameOfExtensionsContainer
1704
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  1036
    ^ 'extensions.st'
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  1037
!
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  1038
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  1039
setPackageOfAllMethodsIn:aClass to:aPackage
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  1040
    "make all methods belong to the classes project"
933
84fd7806afaf offer existing modules/packages in source-container dialog
Claus Gittinger <cg@exept.de>
parents: 923
diff changeset
  1041
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  1042
    |anyChange anyChangeHere|
893
09543b968f15 added askFor... utility.
Claus Gittinger <cg@exept.de>
parents: 886
diff changeset
  1043
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  1044
    anyChange := false.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  1045
    aClass withAllPrivateClassesDo:[:eachClass |
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  1046
        anyChangeHere := false.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  1047
        eachClass instAndClassSelectorsAndMethodsDo:[:sel :mthd | 
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  1048
            mthd package ~= aPackage ifTrue:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  1049
                mthd setPackage:aPackage.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  1050
                anyChangeHere := true.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  1051
            ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  1052
        ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  1053
        anyChangeHere ifTrue:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  1054
            eachClass changed:#projectOrganization
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  1055
        ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  1056
        anyChangeHere ifTrue:[anyChange := true].
893
09543b968f15 added askFor... utility.
Claus Gittinger <cg@exept.de>
parents: 886
diff changeset
  1057
    ].
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  1058
    anyChange ifTrue:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  1059
       Smalltalk changed:#projectOrganization
1185
e86907810d1f handle abortAll in checkIn
Claus Gittinger <cg@exept.de>
parents: 1160
diff changeset
  1060
    ].
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  1061
    ^ anyChange
893
09543b968f15 added askFor... utility.
Claus Gittinger <cg@exept.de>
parents: 886
diff changeset
  1062
!
09543b968f15 added askFor... utility.
Claus Gittinger <cg@exept.de>
parents: 886
diff changeset
  1063
2193
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
  1064
setPackageOfAllMethodsInChangeSet:aChangeSet to:aPackage
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
  1065
    "make all methods belong to the classes project"
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
  1066
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
  1067
    aChangeSet do:[:eachChange |
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
  1068
        eachChange isMethodCodeChange ifTrue:[
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
  1069
            eachChange changeMethod package ~= aPackage ifTrue:[
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
  1070
                Transcript showCR:'change package of ',eachChange changeMethod whoString.
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
  1071
                eachChange changeMethod setPackage:aPackage.        
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
  1072
            ]
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
  1073
        ]
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
  1074
    ].
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
  1075
!
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
  1076
3134
93b8f75424c5 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 2977
diff changeset
  1077
sourceCodeForExtensions:aCollectionOfMethods package:aPackageID forManager:scmManagerOrNil
2847
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  1078
    |s methodsSortedByName defClass|
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  1079
3201
f0993e3fdf02 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3199
diff changeset
  1080
    s := CharacterWriteStream on:(String new:1000).
2847
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  1081
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  1082
    s nextPutAll:'"{ Package: '''.
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  1083
    s nextPutAll:aPackageID asString.
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  1084
    s nextPutAll:''' }"'; nextPutChunkSeparator; cr; cr.
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  1085
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  1086
    "/ don't write a timestamp. Otherwise we would always generate a new version, even if nothing changed
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  1087
    "/ s nextPutAll:(Smalltalk timeStamp).
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  1088
    "/ s nextPutChunkSeparator. 
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  1089
    "/ s cr; cr.
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  1090
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  1091
    "/ sort them by name (to avoid conflicts due to SCM merge)
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  1092
    methodsSortedByName := aCollectionOfMethods asOrderedCollection.
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  1093
    methodsSortedByName sort:[:a :b |
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  1094
                                |clsA clsB|
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  1095
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  1096
                                clsA := a mclass name.
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  1097
                                clsB := b mclass name.
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  1098
                                clsA < clsB ifTrue:[
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  1099
                                    true
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  1100
                                ] ifFalse:[
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  1101
                                    clsA > clsB ifTrue:[
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  1102
                                        false
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  1103
                                    ] ifFalse:[
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  1104
                                        a selector < b selector
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  1105
                                    ]
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  1106
                                ]
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  1107
                              ].
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  1108
    methodsSortedByName do:[:aMethod |
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  1109
        aMethod mclass fileOutMethod:aMethod on:s.
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  1110
        s cr.
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  1111
    ].
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  1112
3134
93b8f75424c5 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 2977
diff changeset
  1113
    scmManagerOrNil notNil ifTrue:[
93b8f75424c5 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 2977
diff changeset
  1114
        defClass := ProjectDefinition definitionClassForPackage:aPackageID.
93b8f75424c5 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 2977
diff changeset
  1115
        defClass notNil ifTrue:[
93b8f75424c5 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 2977
diff changeset
  1116
            "/ make sure, an extensionVersion_XXX method is included...
93b8f75424c5 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 2977
diff changeset
  1117
            "/ (notice: no need to support a secondary backward compatible non-manager related version method here)
93b8f75424c5 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 2977
diff changeset
  1118
            (methodsSortedByName contains:[:aMethod | aMethod selector == scmManagerOrNil nameOfVersionMethodForExtensions]) ifFalse:[
93b8f75424c5 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 2977
diff changeset
  1119
                s nextPutLine:('!!%1 class methodsFor:''documentation''!!' bindWith:defClass name).
93b8f75424c5 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 2977
diff changeset
  1120
                s cr.
93b8f75424c5 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 2977
diff changeset
  1121
                s nextChunkPut:
93b8f75424c5 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 2977
diff changeset
  1122
                    (scmManagerOrNil versionMethodTemplateForSmalltalkFor:(scmManagerOrNil nameOfVersionMethodForExtensions)).
93b8f75424c5 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 2977
diff changeset
  1123
                s space; nextPutChunkSeparator; cr.
93b8f75424c5 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 2977
diff changeset
  1124
            ].
2847
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  1125
        ].
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  1126
    ].
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  1127
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  1128
    ^ s contents.
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  1129
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  1130
    "Created: / 25-07-2012 / 18:38:05 / cg"
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  1131
!
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  1132
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  1133
sourceCodeManagerFor:aClass
3370
9953065c1ea1 class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3354
diff changeset
  1134
    manager notNil ifTrue:[^ manager].
9953065c1ea1 class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3354
diff changeset
  1135
    ^ self class sourceCodeManagerFor:aClass.    
1449
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  1136
!
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  1137
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  1138
sourceCodeOfClass:aClass
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  1139
    |stream src|
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  1140
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  1141
    stream := '' writeStream.
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  1142
    Method flushSourceStreamCache.
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  1143
    aClass fileOutOn:stream withTimeStamp:false.
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  1144
    src := stream contents asString.
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  1145
    stream close.
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  1146
    ^ src
2326
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
  1147
!
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
  1148
3140
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
  1149
validateConsistencyOfPackage:aPackage
3146
913e76c86499 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
  1150
    ^ self validateConsistencyOfPackage:aPackage doClasses:true  doExtensions:true
913e76c86499 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
  1151
!
913e76c86499 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
  1152
4359
f46715e6c974 #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 4349
diff changeset
  1153
validateConsistencyOfPackage:aPackageSymbolOrClass doClasses:doClasses doExtensions:doExtensions
3692
ce00ca02e94a class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3683
diff changeset
  1154
    |checker report msg answer dialog problems numProblems|
3155
9c22d8b4315b class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3153
diff changeset
  1155
9c22d8b4315b class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3153
diff changeset
  1156
    "/ also done by ProjectChecker...
9c22d8b4315b class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3153
diff changeset
  1157
    "/ defClass := aPackage asPackageId projectDefinitionClass.
3140
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
  1158
    "/ defClass validateDescription.
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
  1159
3146
913e76c86499 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
  1160
    checker := ProjectChecker new.
913e76c86499 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
  1161
    checker checkExtensionsOnly:(doClasses not and:[ doExtensions ]).
4359
f46715e6c974 #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 4349
diff changeset
  1162
    report := checker check: aPackageSymbolOrClass.
3692
ce00ca02e94a class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3683
diff changeset
  1163
    (report notNil and:[(problems := report problems) notEmptyOrNil]) ifTrue:[
ce00ca02e94a class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3683
diff changeset
  1164
        numProblems := problems size.
ce00ca02e94a class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3683
diff changeset
  1165
        numProblems == 1 ifTrue:[
3140
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
  1166
            msg := 'The ProblemChecker found the following error/inconsistency:\\    %2\\Need more detail or help for repair?'
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
  1167
        ] ifFalse:[
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
  1168
            msg := 'The ProblemChecker found %1 errors/inconsistencies.\\Browse them for detail or repair?'
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
  1169
        ].
4402
799e4a103839 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4362
diff changeset
  1170
        answer := Dialog confirmWithRaiseAbortOnCancel:
799e4a103839 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4362
diff changeset
  1171
                                (msg bindWith:numProblems 
799e4a103839 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4362
diff changeset
  1172
                                     with:problems first label) withCRs.
3140
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
  1173
        answer == true ifTrue:[
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
  1174
            dialog := Tools::ProjectCheckerBrowser new.
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
  1175
            dialog
4359
f46715e6c974 #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 4349
diff changeset
  1176
                projectChecker: (ProjectChecker forPackage: aPackageSymbolOrClass);
3692
ce00ca02e94a class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3683
diff changeset
  1177
                problemList:problems;
3140
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
  1178
                showCancel:true;
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
  1179
                openModal.
3155
9c22d8b4315b class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3153
diff changeset
  1180
3140
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
  1181
            dialog accepted ifFalse:[
3433
eee3079d18d3 AbortSignal -> AbortOperationRequest
Stefan Vogel <sv@exept.de>
parents: 3425
diff changeset
  1182
                AbortOperationRequest raiseRequest
3140
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
  1183
            ].
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
  1184
        ].
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
  1185
    ].
4402
799e4a103839 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4362
diff changeset
  1186
799e4a103839 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4362
diff changeset
  1187
    "Modified: / 15-02-2019 / 09:27:46 / Claus Gittinger"
3140
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
  1188
!
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
  1189
2326
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
  1190
versionString:a isLessThan:b
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
  1191
    "compare two strings of the form: a.b.c..."
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
  1192
4287
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  1193
    |i1 i2 a1 b1 restA restB|
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  1194
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  1195
    restA := a.
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  1196
    restB := b.
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  1197
    [
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  1198
        i1 := restA indexOf:$. .
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  1199
        i2 := restB indexOf:$. .
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  1200
        i1 == 0 ifTrue:[
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  1201
            i1 := restA size + 1.
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  1202
        ].
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  1203
        i2 == 0 ifTrue:[
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  1204
            i2 := restB size + 1.
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  1205
        ].
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  1206
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  1207
        a1 := Integer readFrom:(restA copyTo:i1-1).
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  1208
        b1 := Integer readFrom:(restB copyTo:i2-1).
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  1209
        a1 < b1 ifTrue:[^ true].
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  1210
        a1 > b1 ifTrue:[^ false].
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  1211
        restA := (restA copyFrom:i1+1).
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  1212
        restB := (restB copyFrom:i2+1).
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  1213
        restA isEmpty ifTrue:[
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  1214
            ^ restB notEmpty
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  1215
        ].
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  1216
        restB isEmpty ifTrue:[
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  1217
            ^ false
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  1218
        ].
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  1219
    ] loop.
2326
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
  1220
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
  1221
    "
4287
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  1222
     self assert:(self default versionString:'12.34.66' isLessThan:'12.35.66').
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  1223
     self assert:(self default versionString:'12.34.66' isLessThan:'12.35.67').
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  1224
     self assert:(self default versionString:'11.34.66' isLessThan:'12.34.67').
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  1225
     self assert:(self default versionString:'11.35.66' isLessThan:'12.34.67').
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  1226
     self assert:(self default versionString:'13.35.66' isLessThan:'12.34.67') not.
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  1227
     self assert:(self default versionString:'13.35.66' isLessThan:'13.34.67') not.
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  1228
     self assert:(self default versionString:'13.35.66' isLessThan:'13.35.67').
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  1229
     self assert:(self default versionString:'13.35.66' isLessThan:'13.35.65') not.
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  1230
     self assert:(self default versionString:'13.35.66.1' isLessThan:'13.35.66') not.
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  1231
     self assert:(self default versionString:'13.35.66' isLessThan:'13.35.66.1').
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  1232
     self assert:(self default versionString:'13.35.66.2' isLessThan:'13.35.66.1') not.
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  1233
     self assert:(self default versionString:'13.35.66.1' isLessThan:'13.35.66.2').
2326
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
  1234
    "
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
  1235
4287
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  1236
    "Modified (comment): / 06-12-2017 / 12:21:56 / cg"
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  1237
! !
1160
d56159f5a86f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1158
diff changeset
  1238
4226
e4ab49b2ce35 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4204
diff changeset
  1239
!SourceCodeManagerUtilities methodsFor:'utilities-encoding'!
e4ab49b2ce35 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4204
diff changeset
  1240
e4ab49b2ce35 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4204
diff changeset
  1241
guessEncodingOfFile:aFilename
e4ab49b2ce35 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4204
diff changeset
  1242
    "look for a string
e4ab49b2ce35 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4204
diff changeset
  1243
        encoding #name
e4ab49b2ce35 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4204
diff changeset
  1244
     or:
e4ab49b2ce35 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4204
diff changeset
  1245
        encoding: name
e4ab49b2ce35 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4204
diff changeset
  1246
     within the given buffer 
e4ab49b2ce35 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4204
diff changeset
  1247
     (which is usually the first few bytes of a textFile).
e4ab49b2ce35 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4204
diff changeset
  1248
     If that's not found, use heuristics (in CharacterArray) to guess."
e4ab49b2ce35 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4204
diff changeset
  1249
e4ab49b2ce35 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4204
diff changeset
  1250
    <resource: #obsolete>
e4ab49b2ce35 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4204
diff changeset
  1251
e4ab49b2ce35 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4204
diff changeset
  1252
    self obsoleteMethodWarning:'ask CharacterEncoder'.
e4ab49b2ce35 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4204
diff changeset
  1253
    ^ CharacterEncoder guessEncodingOfFile:aFilename
e4ab49b2ce35 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4204
diff changeset
  1254
e4ab49b2ce35 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4204
diff changeset
  1255
    "
e4ab49b2ce35 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4204
diff changeset
  1256
     SourceCodeManagerUtilities guessEncodingOfFile:'../../libview2/resources/ApplicationModel_de.rs' asFilename
e4ab49b2ce35 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4204
diff changeset
  1257
     SourceCodeManagerUtilities guessEncodingOfFile:'../../libview2/resources/ApplicationModel_ru.rs' asFilename
e4ab49b2ce35 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4204
diff changeset
  1258
    "
e4ab49b2ce35 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4204
diff changeset
  1259
e4ab49b2ce35 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4204
diff changeset
  1260
    "Modified (comment): / 14-01-2012 / 20:54:35 / cg"
e4ab49b2ce35 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4204
diff changeset
  1261
!
e4ab49b2ce35 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4204
diff changeset
  1262
e4ab49b2ce35 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4204
diff changeset
  1263
guessEncodingOfStream:aStream
e4ab49b2ce35 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4204
diff changeset
  1264
    "look for a string of the form
e4ab49b2ce35 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4204
diff changeset
  1265
            encoding #name
e4ab49b2ce35 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4204
diff changeset
  1266
     or:
e4ab49b2ce35 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4204
diff changeset
  1267
            encoding: name
e4ab49b2ce35 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4204
diff changeset
  1268
     in the first few bytes of aStream."
e4ab49b2ce35 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4204
diff changeset
  1269
e4ab49b2ce35 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4204
diff changeset
  1270
    <resource: #obsolete>
e4ab49b2ce35 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4204
diff changeset
  1271
e4ab49b2ce35 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4204
diff changeset
  1272
    self obsoleteMethodWarning:'ask CharacterEncoder'.
e4ab49b2ce35 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4204
diff changeset
  1273
    ^ CharacterEncoder guessEncodingOfStream:aStream
e4ab49b2ce35 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4204
diff changeset
  1274
! !
e4ab49b2ce35 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4204
diff changeset
  1275
e4ab49b2ce35 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4204
diff changeset
  1276
!SourceCodeManagerUtilities methodsFor:'utilities-scm'!
973
b9004b37290a check for #halt and #error when checking in
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  1277
4201
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  1278
askForPackageVersion:question with:includeSubProjectsHolderOrNil knownTags:knownTags into:aTwoArgBlock
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  1279
    |dateFormat string dateOrNil symbolicNameOrNil|
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  1280
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  1281
    dateFormat := UserPreferences current dateInputFormat.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  1282
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  1283
    Dialog 
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  1284
        modifyingBoxWith:[:box |
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  1285
            includeSubProjectsHolderOrNil notNil ifTrue:[
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  1286
                box verticalPanel 
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  1287
                    add:(CheckBox label:(resources string:'Include Subprojects')
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  1288
                                  model:includeSubProjectsHolderOrNil).
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  1289
            ]
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  1290
        ]
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  1291
        do:[
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  1292
            |suggestion|
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  1293
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  1294
            suggestion := LastComparedTag.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  1295
            suggestion isNil ifTrue:[ suggestion := Date today printStringFormat:dateFormat ].
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  1296
            
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  1297
            string := Dialog
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  1298
                        request:(resources string:question with:dateFormat)
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  1299
                        initialAnswer:suggestion
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  1300
                        list:knownTags.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  1301
        ].
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  1302
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  1303
    string notEmptyOrNil ifTrue:[
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  1304
        dateOrNil := Date readFrom:string printFormat:dateFormat onError:nil.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  1305
        dateOrNil isNil ifTrue:[
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  1306
            symbolicNameOrNil := string
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  1307
        ].
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  1308
        aTwoArgBlock value:dateOrNil value:symbolicNameOrNil.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  1309
    ].
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  1310
    ^ string
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  1311
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  1312
    "Created: / 04-02-2017 / 18:39:11 / cg"
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  1313
    "Modified: / 05-02-2017 / 04:24:23 / cg"
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  1314
!
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  1315
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
  1316
changeSetForExtensionMethodsForPackage:packageToCheckOut askForRevision:askForRevision usingManager:aSourceCodeManager
4266
11f91cdde31c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4255
diff changeset
  1317
    "check-out an extension container from the source repository, 
11f91cdde31c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4255
diff changeset
  1318
     and return the methods there as a change set.
1841
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1319
     If askForRevision is false, check-out the newest version.
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1320
     Return a changeSet or nil (if any error occurred)"
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1321
2242
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
  1322
    ^ self
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
  1323
        changeSetForExtensionMethodsForPackage:packageToCheckOut 
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
  1324
        revision:nil orAskForRevision:askForRevision 
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
  1325
        usingManager:aSourceCodeManager
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
  1326
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
  1327
    "Created: / 29-12-2011 / 14:26:01 / cg"
4266
11f91cdde31c #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4255
diff changeset
  1328
    "Modified (comment): / 21-11-2017 / 13:08:54 / cg"
2242
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
  1329
!
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
  1330
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
  1331
changeSetForExtensionMethodsForPackage:packageToCheckOut revision:revisionOrNil orAskForRevision:askForRevision usingManager:aSourceCodeManager
2242
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
  1332
    "check-out an extension container from the source repository, and return the methods there as a change set.
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
  1333
     If askForRevision is false, check-out the newest version.
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
  1334
     Return a changeSet or nil (if any error occurred)"
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
  1335
2948
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  1336
    |directory module file aStream sourceToLoad rev msg newestRev |
1841
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1337
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1338
    directory := packageToCheckOut asPackageId directory.
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1339
    module := packageToCheckOut asPackageId module.
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1340
    file := self nameOfExtensionsContainer.
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1341
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1342
    "/
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1343
    "/ ask for revision
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1344
    "/
2242
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
  1345
    (rev := revisionOrNil) isNil ifTrue:[
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
  1346
        newestRev := aSourceCodeManager newestRevisionInFile:file directory:directory module:module.
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
  1347
        askForRevision ifFalse:[
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
  1348
            rev := newestRev ? ''
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
  1349
        ] ifTrue:[
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
  1350
            msg := resources string:'CheckOut which revision of extensions for ''%1'': (empty for newest)' with:packageToCheckOut allBold.
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
  1351
            newestRev notNil ifTrue:[
3261
7a585999dcef class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3259
diff changeset
  1352
                msg := msg , '\' , (resources string:'Newest in repository is %1.' with:newestRev)
2242
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
  1353
            ].
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
  1354
2791
0601ded0300b changed:
Stefan Vogel <sv@exept.de>
parents: 2775
diff changeset
  1355
            rev := self
2242
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
  1356
                    askForExistingRevision:msg 
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
  1357
                    title:'CheckOut from repository' 
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
  1358
                    class:nil 
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
  1359
                    manager:aSourceCodeManager 
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
  1360
                    module:module package:directory fileName:file.
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
  1361
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
  1362
            rev isNil ifTrue:[
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
  1363
                ^ nil   "/ canceled
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
  1364
            ].
1841
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1365
        ].
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1366
    ].
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1367
    rev withoutSpaces isEmpty ifTrue:[
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1368
        rev := #newest.
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1369
        msg := 'extracting newest %1 (' , (newestRev ? '???') , ')'.
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1370
    ] ifFalse:[
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1371
        msg := 'extracting previous %1'.
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1372
    ].
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1373
    aStream := aSourceCodeManager  
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1374
        streamForClass:nil
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1375
        fileName:file 
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1376
        revision:rev 
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1377
        directory:directory 
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1378
        module:module
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1379
        cache:true.
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1380
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1381
    aStream isNil ifTrue:[
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1382
        self warn:(resources string:'Could not extract "extensions.st" for %1 from repository' with:packageToCheckOut allBold).
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1383
        ^ nil
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1384
    ].
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1385
    aStream class readErrorSignal handle:[:ex |
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1386
        self warn:('read error while reading extracted source\\' , ex description) withCRs.
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1387
        aStream close.
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1388
        ^ nil
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1389
    ] do:[
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1390
        sourceToLoad := aStream contents asString.
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1391
    ].
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1392
    aStream close.
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1393
    ^ ChangeSet fromStream:(sourceToLoad readStream).
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1394
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
  1395
    "Created: / 29-12-2011 / 14:27:00 / cg"
1841
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1396
!
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1397
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
  1398
checkForExistingModule:module directory:directory container:containerFileName usingManager:mgr allowCreate:allowCreate
2948
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  1399
    |moduleName directoryName containerName|
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  1400
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1401
    moduleName := module allBold.
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
  1402
    directoryName := directory allBold.
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1403
    containerName := containerFileName allBold.
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1404
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1405
    "/
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1406
    "/ check for the container
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1407
    "/
1787
db6157670930 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1782
diff changeset
  1408
    (mgr checkForExistingContainer:containerFileName inModule:module directory:directory) ifFalse:[
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1409
        allowCreate ifFalse:[
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1410
            self warn:(resources string:'A container for ''%1'' does not exist in ''%2:%3''' 
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
  1411
                                   with:containerName with:moduleName with:directoryName) withCRs.
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1412
            ^ false
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1413
        ].
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1414
        (Dialog 
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1415
            confirm:(resources string:'''%1'' is a new container (in ''%2:%3'').\\Create it ?' 
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
  1416
                                 with:containerName with:moduleName with:directoryName) withCRs
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1417
            noLabel:'Cancel') 
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1418
        ifFalse:[
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1419
            ^ false.
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1420
        ].
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
  1421
        (mgr createContainerForText:'' inModule:module package:directory container:containerFileName) ifFalse:[
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1422
            self warn:(resources string:'Cannot create new container: ''%1'' (in ''%2:%3'')' 
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
  1423
                                 with:containerName with:moduleName with:directoryName).
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1424
            ^ false.
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1425
        ]
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1426
    ].
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1427
    ^ true.
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
  1428
1787
db6157670930 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1782
diff changeset
  1429
    "Modified: / 13-09-2006 / 18:24:57 / cg"
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
  1430
    "Created: / 29-12-2011 / 14:35:36 / cg"
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1431
!
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1432
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
  1433
checkForExistingModule:module directory:directory usingManager:mgr allowCreate:allowCreate
2948
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  1434
    |moduleNameBold directoryNameBold|
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  1435
1704
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  1436
    moduleNameBold := module allBold.
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  1437
    directoryNameBold := directory allBold.
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1438
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1439
    "/
1704
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  1440
    "/ check for the directory
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1441
    "/
1840
c993a1c045cc obsolete method calls
Claus Gittinger <cg@exept.de>
parents: 1835
diff changeset
  1442
    (mgr checkForExistingModule:module directory:directory) ifFalse:[
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1443
        allowCreate ifFalse:[
1704
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  1444
            self warn:(resources string:'A directory for ''%1'' does not exist in module ''%2''' 
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  1445
                                   with:directoryNameBold with:moduleNameBold) withCRs.
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1446
            ^ false
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1447
        ].
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1448
        (Dialog 
2651
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  1449
            confirm:(resources stringWithCRs:'''%1'' is a new directory in module ''%2''.\\Create it in %3?' 
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  1450
                                with:directoryNameBold 
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  1451
                                with:moduleNameBold
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  1452
                                with:mgr managerTypeName)
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1453
            noLabel:'Cancel') 
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1454
        ifFalse:[
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1455
            ^ false.
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1456
        ].
1840
c993a1c045cc obsolete method calls
Claus Gittinger <cg@exept.de>
parents: 1835
diff changeset
  1457
        (mgr createModule:module directory:directory) ifFalse:[
2651
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  1458
            self warn:(resources stringWithCRs:'Cannot create new directory: ''%1'' in module ''%2'' in %3' 
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  1459
                                 with:directoryNameBold 
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  1460
                                 with:moduleNameBold
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  1461
                                 with:mgr managerTypeName).
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1462
            ^ false.
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1463
        ]
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1464
    ].
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1465
    ^ true.
1840
c993a1c045cc obsolete method calls
Claus Gittinger <cg@exept.de>
parents: 1835
diff changeset
  1466
2651
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  1467
    "Modified: / 21-12-2011 / 18:46:11 / cg"
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
  1468
    "Created: / 29-12-2011 / 14:35:20 / cg"
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1469
!
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1470
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
  1471
checkForExistingModule:module usingManager:mgr allowCreate:allowCreate
2948
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  1472
    |moduleName answer|
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1473
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1474
    (mgr checkForExistingModule:module) ifFalse:[
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1475
        moduleName := module allBold.
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1476
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1477
        allowCreate ifFalse:[
1423
d15575ef3dba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1414
diff changeset
  1478
            self warn:(resources stringWithCRs:'A module named ''%1'' does not exist in the repository' 
d15575ef3dba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1414
diff changeset
  1479
                                  with:moduleName) .
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1480
            ^ false
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1481
        ].
2325
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  1482
        AbortAllOperationWantedQuery query ifTrue:[
1483
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  1483
            answer := Dialog 
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  1484
                confirmWithCancel:(resources stringWithCRs:'''%1'' is a new module.\\create it ?' with:moduleName)
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  1485
                labels:(resources array:#('Cancel All' 'Cancel' 'Yes' )).
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  1486
            answer isNil ifTrue:[ AbortAllOperationRequest raise ].
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  1487
        ] ifFalse:[
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  1488
            answer := Dialog 
2651
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  1489
                confirm:(resources stringWithCRs:'''%1'' is a new module in %2.\\create it ?' with:moduleName with:mgr managerTypeName) 
1483
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  1490
                noLabel:'Cancel'
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  1491
        ].
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  1492
        answer ifFalse:[ ^ false].
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1493
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1494
        (mgr createModule:module) ifFalse:[
2651
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  1495
            self warn:(resources stringWithCRs:'Cannot create new module: ''%1'' in %2' with:moduleName with:mgr managerTypeName) .
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1496
            ^ false.
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1497
        ]
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1498
    ].
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1499
    ^ true.
2325
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  1500
2651
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  1501
    "Modified: / 21-12-2011 / 18:42:03 / cg"
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
  1502
    "Created: / 29-12-2011 / 14:35:06 / cg"
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1503
!
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1504
3534
914309d517ed class: SourceCodeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3514
diff changeset
  1505
checkOutPackages: packages askForRevision: askForRevision
914309d517ed class: SourceCodeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3514
diff changeset
  1506
    "Updates code of given packages (loaded in the image) to a specific revision.
914309d517ed class: SourceCodeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3514
diff changeset
  1507
     If `askForRevision` is true, then user is asked to specify to which revision to
914309d517ed class: SourceCodeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3514
diff changeset
  1508
     update. If `askForRevision` is false, then packages are updated to a 'newest'
914309d517ed class: SourceCodeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3514
diff changeset
  1509
     revision. 
914309d517ed class: SourceCodeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3514
diff changeset
  1510
914309d517ed class: SourceCodeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3514
diff changeset
  1511
     NOTE: Definition of `newest` revision may vary. For SCMs which allows for multiple
914309d517ed class: SourceCodeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3514
diff changeset
  1512
     heads, it is not clear which one it is. In that case, even if `askForRevision` is
914309d517ed class: SourceCodeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3514
diff changeset
  1513
     false, this method may result in user interation, asking user to select which of the
914309d517ed class: SourceCodeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3514
diff changeset
  1514
     newest she wants.
914309d517ed class: SourceCodeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3514
diff changeset
  1515
914309d517ed class: SourceCodeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3514
diff changeset
  1516
     NOTE: Naming is bit confusing, it should be something like #updatePackages:ask...
914309d517ed class: SourceCodeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3514
diff changeset
  1517
     but to keep this in line with other methods, we use #checkOutPackages"
914309d517ed class: SourceCodeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3514
diff changeset
  1518
914309d517ed class: SourceCodeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3514
diff changeset
  1519
    ^ self subclassResponsibility.
914309d517ed class: SourceCodeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3514
diff changeset
  1520
914309d517ed class: SourceCodeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3514
diff changeset
  1521
    "Created: / 01-04-2014 / 21:50:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
914309d517ed class: SourceCodeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3514
diff changeset
  1522
!
914309d517ed class: SourceCodeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3514
diff changeset
  1523
3602
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1524
checkinClass:aClass
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1525
    "check a class into the source repository.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1526
     Asks interactively for a log-message."
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1527
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1528
    ^ self checkinClass:aClass withInfo:nil
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1529
!
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1530
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1531
checkinClass:aClass withInfo:aLogInfoOrNil
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1532
    "check a class into the source repository.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1533
     If the argument, aLogInfoOrNil isNil, ask interactively for a log-message."
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1534
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1535
    ^ self checkinClass:aClass withInfo:aLogInfoOrNil withCheck:true
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1536
!
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1537
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1538
checkinClass:aClass withInfo:aLogInfoOrNil withCheck:doCheckClass
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1539
    "check a class into the source repository.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1540
     If the argument, aLogInfoOrNil isNil, ask interactively for log-message.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1541
     If doCheckClass is true, the class is checked for send of halts etc."
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1542
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1543
    ^ self 
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1544
        checkinClass:aClass 
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1545
        withInfo:aLogInfoOrNil 
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1546
        withCheck:doCheckClass 
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1547
        usingManager:(self sourceCodeManagerFor:aClass)
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1548
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1549
    "Modified: / 21-12-2011 / 18:19:55 / cg"
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1550
!
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1551
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1552
checkinClass:aClass withInfo:aLogInfoOrNil withCheck:doCheckClassHolder usingManager:managerOrNil
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1553
    "check a class into the source repository.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1554
     If the argument, aLogInfoOrNil isNil, ask interactively for log-message.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1555
     If doCheckClass is true, the class is checked for send of halts etc."
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1556
3992
bf6479f38b32 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1557
    ^ self
bf6479f38b32 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1558
        checkinClass:aClass 
bf6479f38b32 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1559
        withInfo:aLogInfoOrNil withCheck:doCheckClassHolder 
bf6479f38b32 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1560
        usingManager:managerOrNil 
bf6479f38b32 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1561
        confirmNewContainer:confirmNewFiles
bf6479f38b32 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1562
!
bf6479f38b32 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1563
bf6479f38b32 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1564
checkinClass:aClass withInfo:aLogInfoOrNil withCheck:doCheckClassHolder usingManager:managerOrNil confirmNewContainer:confirmNewContainer
bf6479f38b32 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1565
    "check a class into the source repository.
bf6479f38b32 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1566
     If the argument, aLogInfoOrNil isNil, ask interactively for log-message.
bf6479f38b32 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1567
     If doCheckClass is true, the class is checked for send of halts etc."
bf6479f38b32 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1568
4276
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1569
    ^ self
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1570
        checkinClass:aClass 
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1571
        withInfo:aLogInfoOrNil withCheck:doCheckClassHolder 
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1572
        usingManager:managerOrNil confirmNewContainer:confirmNewContainer 
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1573
        onBranch:nil
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1574
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1575
    "Created: / 21-12-2011 / 18:19:14 / cg"
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1576
    "Modified: / 05-12-2017 / 20:26:38 / cg"
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1577
!
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1578
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1579
checkinClass:aClass withInfo:aLogInfoOrNil withCheck:doCheckClassHolder usingManager:managerOrNil confirmNewContainer:confirmNewContainer onBranch:branchNameOrNil
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1580
    "check a class into the source repository.
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1581
     If the argument, aLogInfoOrNil isNil, ask interactively for log-message.
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1582
     If doCheckClass is true, the class is checked for send of halts etc."
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1583
3602
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1584
    |logMessage checkinInfo mgr pri|
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1585
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1586
    aClass isLoaded ifFalse:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1587
        self information:(resources string:'Cannot checkin unloaded classes (%1)' with:aClass name).
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1588
        ^ false.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1589
    ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1590
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1591
    mgr := managerOrNil.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1592
    mgr isNil ifTrue:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1593
        mgr := self sourceCodeManagerFor:aClass.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1594
        mgr isNil ifTrue:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1595
            ^ false
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1596
        ]
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1597
    ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1598
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1599
    self ensureCorrectVersionMethodsInClass:aClass usingManager:mgr.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1600
    mgr supportsCheckinLogMessages ifTrue:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1601
        (self 
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1602
            getLogMessageForClassCheckinTakingDefaultsFromPreviousLogInfo:aLogInfoOrNil 
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1603
            forClass:aClass
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1604
            valuesInto:[:logMessageRet :checkinInfoRet |
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1605
                logMessage := logMessageRet.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1606
                checkinInfo := checkinInfoRet.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1607
            ]
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1608
        ) ifFalse:[^ false].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1609
    ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1610
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1611
    (self classIsNotYetInRepository:aClass withManager:mgr) ifTrue:[
3992
bf6479f38b32 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1612
        (self createSourceContainerForClass:aClass usingManager:mgr confirmNewContainer:confirmNewContainer) ifFalse:[
3602
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1613
"/            self warn:'did not create a container for ''' , aClass name , ''''.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1614
            ^ false
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1615
        ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1616
        ^ true.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1617
    ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1618
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1619
    self activityNotification:(resources string:'checking in %1' with:aClass name).
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1620
    pri := Processor activePriority.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1621
    Processor activeProcess withPriority:pri-1 to:pri
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1622
    do:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1623
        |revision aborted freshCreated|
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1624
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1625
        freshCreated := false.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1626
        revision := aClass revision.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1627
        revision isNil ifTrue:[ 
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1628
            mgr isContainerBased ifTrue:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1629
                "/ mhmh - check if it has a container.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1630
                (mgr checkForExistingContainerForClass:aClass) ifFalse:[
3992
bf6479f38b32 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1631
                    (self createSourceContainerForClass:aClass usingManager:mgr confirmNewContainer:confirmNewContainer) ifFalse:[
3602
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1632
                        self warn:'Did not create/change repository container for ''' , aClass name allBold , ''''.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1633
                        ^ false.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1634
                    ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1635
                    freshCreated := true.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1636
                ]
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1637
            ]
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1638
        ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1639
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1640
        doCheckClassHolder value ifTrue:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1641
            "/ check if the class contains halts, error-sends etc.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1642
            (self checkAndWarnAboutBadMessagesInClass:aClass checkAgainHolder:doCheckClassHolder) ifFalse:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1643
                ^ false
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1644
            ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1645
        ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1646
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1647
        freshCreated ifFalse:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1648
            aborted := false.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1649
            AbortOperationRequest handle:[:ex |
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1650
                aborted := true.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1651
                ex return.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1652
            ] do:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1653
                |checkinState cause|
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1654
                checkinState := false.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1655
                cause := ''.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1656
                [
4276
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1657
                    checkinState := mgr checkinClass:aClass logMessage:logMessage onBranch:branchNameOrNil
3602
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1658
                ] on:SourceCodeManagerError do:[:ex| 
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1659
                    cause := ex description.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1660
                    "/ ex proceed.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1661
                ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1662
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1663
                checkinState ifFalse:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1664
                    Transcript showCR:'checkin of ''' , aClass name , ''' failed - ', cause.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1665
                    self warn:(resources stringWithCRs:'Checkin of "%1" failed\\' with:aClass name allBold),cause.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1666
                    AbortOperationRequest raise.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1667
                    "/ ^ false.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1668
                ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1669
                checkinInfo notNil ifTrue:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1670
                    checkinInfo isStable ifTrue:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1671
                        "set stable tag for class that has been checked in"
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1672
                        self tagClass:aClass as:#stable.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1673
                    ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1674
                    checkinInfo tagIt ifTrue:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1675
                        "set any additional tags for the class that has been checked in"
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1676
                        (checkinInfo tag asCollectionOfSubstringsSeparatedByAny:',;') do:[:eachTag |
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1677
                            self tagClass:aClass as:eachTag withoutSeparators.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1678
                        ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1679
                    ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1680
                    CVSSourceCodeManager recentTag:checkinInfo tag.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1681
                ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1682
            ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1683
            aborted ifTrue:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1684
                Transcript showCR:'Checkin of ''' , aClass name , ''' aborted'.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1685
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1686
                AbortAllOperationWantedQuery query ifTrue:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1687
                    (Dialog 
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1688
                        confirm:(resources stringWithCRs:'Checkin of "%1" aborted.\\Cancel all ?' with:aClass name)
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1689
                        default:false)
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1690
                    ifTrue:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1691
                        AbortAllOperationRequest raise.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1692
                    ]
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1693
                ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1694
                ^ false.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1695
            ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1696
        ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1697
    ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1698
    ^ true
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1699
4276
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1700
    "Created: / 05-12-2017 / 20:26:09 / cg"
3602
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1701
!
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1702
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1703
checkinClasses:aCollectionOfClass
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1704
    "check a collection of classes into the source repository.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1705
     Asks interactively for log-message."
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1706
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1707
    ^ self checkinClasses:aCollectionOfClass withInfo:nil
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1708
!
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1709
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1710
checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrNil
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1711
    "check a bunch of classes into the source repository.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1712
     If the argument, aLogInfoOrNil isNil, ask interactively for log-message."
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1713
4276
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1714
    ^ self checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrNil onBranch:nil
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1715
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1716
    "Modified: / 05-12-2017 / 20:15:25 / cg"
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1717
!
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1718
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1719
checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrNil onBranch:branchNameOrNil     
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1720
    "check a bunch of classes into the source repository.
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1721
     If the argument, aLogInfoOrNil isNil, ask interactively for log-message."
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1722
3602
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1723
    |checkClassWhenCheckingInHolder|
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1724
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1725
    checkClassWhenCheckingInHolder := ValueHolder with:(UserPreferences current at:#checkClassesWhenCheckingIn ifAbsent:true).
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1726
    checkClassWhenCheckingInHolder 
4276
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1727
        onChangeEvaluate:[ 
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1728
            UserPreferences current at:#checkClassesWhenCheckingIn put:checkClassWhenCheckingInHolder value 
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1729
        ].
3602
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1730
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1731
    ^ self
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1732
        checkinClasses:aCollectionOfClasses 
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1733
        withInfo:aLogInfoOrNil 
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1734
        withCheck:checkClassWhenCheckingInHolder
4276
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1735
        onBranch:branchNameOrNil
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1736
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1737
    "Created: / 05-12-2017 / 20:15:09 / cg"
3602
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1738
!
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1739
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1740
checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrStringNil withCheck:doCheckClassesHolder
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1741
    "check a bunch of classes into the source repository.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1742
     If the argument, aLogInfoOrStringNil isNil, ask interactively for log-message."
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1743
4276
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1744
    ^ self checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrStringNil withCheck:doCheckClassesHolder onBranch:nil
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1745
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1746
    "Modified: / 05-12-2017 / 20:16:18 / cg"
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1747
!
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1748
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1749
checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrStringNil withCheck:doCheckClassesHolder onBranch:branchNameOrNil
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1750
    "check a bunch of classes into the source repository.
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1751
     If the argument, aLogInfoOrStringNil isNil, ask interactively for log-message."
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1752
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1753
    ^ self checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrStringNil withCheck:doCheckClassesHolder usingManager:nil onBranch:branchNameOrNil
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1754
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1755
    "Created: / 05-12-2017 / 20:15:59 / cg"
3602
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1756
!
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1757
3818
25607a4f1e98 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3814
diff changeset
  1758
checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrStringOrNil withCheck:doCheckClassesHolder usingManager:aManagerOrNil
3602
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1759
    "check a bunch of classes into the source repository.
3818
25607a4f1e98 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3814
diff changeset
  1760
     If the argument, aLogInfoOrStringOrNil isNil, ask interactively for log-message."
3602
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1761
3992
bf6479f38b32 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1762
    ^ self
4276
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1763
        checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrStringOrNil withCheck:doCheckClassesHolder usingManager:aManagerOrNil
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1764
        onBranch:nil
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1765
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1766
    "Modified: / 05-12-2017 / 20:17:32 / cg"
3992
bf6479f38b32 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1767
!
bf6479f38b32 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1768
bf6479f38b32 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1769
checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrStringOrNil withCheck:doCheckClassesHolder 
bf6479f38b32 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1770
    usingManager:aManagerOrNil confirmNewContainer:confirmNewContainer
4276
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1771
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1772
    "check a bunch of classes into the source repository.
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1773
     If the argument, aLogInfoOrStringOrNil isNil, ask interactively for log-message."
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1774
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1775
    ^ self 
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1776
        checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrStringOrNil withCheck:doCheckClassesHolder 
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1777
        usingManager:aManagerOrNil confirmNewContainer:confirmNewContainer onBranch:nil
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1778
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1779
    "Created: / 21-12-2011 / 18:24:25 / cg"
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1780
    "Modified (format): / 05-12-2017 / 20:24:09 / cg"
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1781
!
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1782
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1783
checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrStringOrNil withCheck:doCheckClassesHolder 
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1784
    usingManager:aManagerOrNil confirmNewContainer:confirmNewContainer onBranch:branchNameOrNil
3992
bf6479f38b32 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1785
    "check a bunch of classes into the source repository.
bf6479f38b32 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1786
     If the argument, aLogInfoOrStringOrNil isNil, ask interactively for log-message."
bf6479f38b32 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1787
3602
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1788
    |classes allClasses checkinInfoOrString yesOrNoToAll unchangedClasses|
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1789
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1790
    "/ ignore private classes
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1791
    classes := aCollectionOfClasses select:[:aClass | aClass owningClass isNil].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1792
    classes isEmpty ifTrue:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1793
        self information:'Only private classes given - nothing checked in.'.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1794
        ^ self
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1795
    ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1796
    classes := classes select:[:aClass | aClass isLoaded].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1797
    classes isEmpty ifTrue:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1798
        self information:'Only unloaded classes given - nothing checked in.'.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1799
        ^ self
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1800
    ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1801
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1802
    classes size == 1 ifTrue:[
3992
bf6479f38b32 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1803
        self 
bf6479f38b32 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1804
            checkinClass:classes first 
bf6479f38b32 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1805
            withInfo:aLogInfoOrStringOrNil withCheck:doCheckClassesHolder 
bf6479f38b32 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1806
            usingManager:aManagerOrNil
4281
7b1c0f0170d0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4276
diff changeset
  1807
            confirmNewContainer:confirmNewContainer
7b1c0f0170d0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4276
diff changeset
  1808
            onBranch:branchNameOrNil.
3992
bf6479f38b32 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1809
        ^ self
3602
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1810
    ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1811
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1812
    "ask once, for all classes"
3818
25607a4f1e98 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3814
diff changeset
  1813
    aLogInfoOrStringOrNil isNil ifTrue:[
3602
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1814
        checkinInfoOrString := self 
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1815
                        getCheckinInfoFor:(resources string:'%1 classes to checkin' with:aCollectionOfClasses size)
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1816
                        initialAnswer:nil
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1817
                        withQuickOption:true.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1818
        checkinInfoOrString isNil ifTrue:[^ self].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1819
    ] ifFalse:[
3818
25607a4f1e98 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3814
diff changeset
  1820
        checkinInfoOrString := aLogInfoOrStringOrNil.
3602
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1821
    ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1822
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1823
    allClasses := classes.    
3818
25607a4f1e98 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3814
diff changeset
  1824
    (checkinInfoOrString isString not and:[checkinInfoOrString quickCheckIn]) ifTrue:[
3602
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1825
        "/ not only the one's in the changeSet;
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1826
        "/ also those which have not been checked in before.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1827
        classes := classes select:[:each | each hasUnsavedChanges or:[ (each revisionOfManager:aManagerOrNil) isNil ]].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1828
        classes isEmpty ifTrue:[ Dialog information:'no changes to checkin (quickCheckIn)' ]
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1829
    ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1830
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1831
    "abortAll is handled, and also asked for here!!"
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1832
    AbortAllOperationRequest handleAndAnswerQueryIn:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1833
        classes notEmpty ifTrue:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1834
            self yesToAllNotification handle:[:ex |
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1835
                yesOrNoToAll := ex parameter.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1836
                ex proceed
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1837
            ] do:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1838
                self yesToAllQuery handle:[:ex |
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1839
                    ex proceedWith:yesOrNoToAll
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1840
                ] do:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1841
                    classes do:[:aClass |
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1842
                        self activityNotification:(resources string:'checking in %1' with:aClass name).
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1843
                        "/ ca does not want boxes to pop up all over ...
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1844
                        UserInformation handle:[:ex |
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1845
                            Transcript showCR:ex description.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1846
                            ex proceed.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1847
                        ] do:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1848
                            AbortOperationRequest catch:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1849
                                self 
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1850
                                    checkinClass:aClass 
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1851
                                    withInfo:checkinInfoOrString 
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1852
                                    withCheck:doCheckClassesHolder
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1853
                                    usingManager:aManagerOrNil
3992
bf6479f38b32 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  1854
                                    confirmNewContainer:confirmNewContainer
4281
7b1c0f0170d0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4276
diff changeset
  1855
                                    onBranch:branchNameOrNil
3602
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1856
                            ]
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1857
                        ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1858
                    ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1859
                ]
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1860
            ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1861
        ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1862
3818
25607a4f1e98 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3814
diff changeset
  1863
        (checkinInfoOrString isString not and:[ (checkinInfoOrString isStable or:[checkinInfoOrString tagIt]) ])
3602
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1864
        ifTrue:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1865
            "/mhmh - but tag should be set on all (even unchanged ones)
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1866
            "/ the other onces have already been tagged
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1867
            unchangedClasses := allClasses reject:[:eachClass | (classes includes:eachClass)].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1868
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1869
            "mhmh - could still have to tag them"
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1870
            checkinInfoOrString isStable ifTrue:[
4281
7b1c0f0170d0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4276
diff changeset
  1871
                self tagClasses:unchangedClasses as:#stable.
7b1c0f0170d0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4276
diff changeset
  1872
"/                unchangedClasses do:[:eachClass |
7b1c0f0170d0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4276
diff changeset
  1873
"/                    self tagClass:eachClass as:#stable.
7b1c0f0170d0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4276
diff changeset
  1874
"/                ].
3602
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1875
            ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1876
            checkinInfoOrString tagIt ifTrue:[
4281
7b1c0f0170d0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4276
diff changeset
  1877
                self tagClasses:unchangedClasses as:(checkinInfoOrString tag).
7b1c0f0170d0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4276
diff changeset
  1878
"/                unchangedClasses do:[:eachClass |
7b1c0f0170d0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4276
diff changeset
  1879
"/                    self tagClass:eachClass as:(checkinInfoOrString tag).
7b1c0f0170d0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4276
diff changeset
  1880
"/                ].
3602
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1881
            ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1882
        ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1883
    ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1884
4276
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1885
    "Created: / 05-12-2017 / 20:23:37 / cg"
4281
7b1c0f0170d0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4276
diff changeset
  1886
    "Modified: / 05-12-2017 / 23:34:56 / cg"
4276
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1887
!
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1888
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1889
checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrStringOrNil withCheck:doCheckClassesHolder usingManager:aManagerOrNil onBranch:branchNameOrNil
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1890
    "check a bunch of classes into the source repository.
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1891
     If the argument, aLogInfoOrStringOrNil isNil, ask interactively for log-message."
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1892
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1893
    ^ self
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1894
        checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrStringOrNil withCheck:doCheckClassesHolder 
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1895
        usingManager:aManagerOrNil 
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1896
        confirmNewContainer:confirmNewFiles
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1897
        onBranch:branchNameOrNil
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1898
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1899
    "Created: / 05-12-2017 / 20:17:16 / cg"
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1900
!
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1901
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1902
checkinPackage:packageToCheckIn classes:doClasses extensions:doExtensions buildSupport:doBuild askForMethodsInOtherPackages:askForMethodsInOtherPackages
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1903
    ^ self 
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1904
        checkinPackage:packageToCheckIn classes:doClasses extensions:doExtensions 
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1905
        buildSupport:doBuild askForMethodsInOtherPackages:askForMethodsInOtherPackages 
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1906
        onBranch:nil
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1907
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1908
    "Created: / 05-12-2017 / 20:02:49 / cg"
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1909
!
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1910
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1911
checkinPackage:packageToCheckIn classes:doClasses extensions:doExtensions buildSupport:doBuild askForMethodsInOtherPackages:askForMethodsInOtherPackages onBranch:branchNameOrNil
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1912
    self subclassResponsibility
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1913
1725bf9d43b0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4272
diff changeset
  1914
    "Created: / 05-12-2017 / 20:02:34 / cg"
3602
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1915
!
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1916
986
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  1917
checkoutClass:aClass askForMerge:askForMerge
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  1918
    "check-out a class from the source repository."
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  1919
1006
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1920
    self
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1921
        checkoutClass:aClass 
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1922
        askForRevision:true
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1923
        askForMerge:askForMerge
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1924
!
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1925
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1926
checkoutClass:aClass askForRevision:askForRevision askForMerge:askForMerge
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1927
    "check-out a class from the source repository.
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1928
     If askForRevision is false, check-out the newest version."
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1929
2013
0457926edfdb allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents: 2009
diff changeset
  1930
    self
0457926edfdb allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents: 2009
diff changeset
  1931
        checkoutClass:aClass askForRevision:askForRevision askForMerge:askForMerge 
0457926edfdb allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents: 2009
diff changeset
  1932
        askForConfirmation:true
0457926edfdb allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents: 2009
diff changeset
  1933
!
0457926edfdb allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents: 2009
diff changeset
  1934
0457926edfdb allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents: 2009
diff changeset
  1935
checkoutClass:aClass askForRevision:askForRevision askForMerge:askForMerge askForConfirmation:askForConfirmation
0457926edfdb allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents: 2009
diff changeset
  1936
    "check-out a class from the source repository.
0457926edfdb allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents: 2009
diff changeset
  1937
     If askForRevision is false, check-out the newest version."
0457926edfdb allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents: 2009
diff changeset
  1938
2948
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  1939
    |mgr sourceInfo
1339
9a1e91c28cb3 checkOut dialog labels
Claus Gittinger <cg@exept.de>
parents: 1338
diff changeset
  1940
     currentClass inChangeSet
1055
f44b12442c58 version update after load from rep.
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  1941
     aStream sourceToLoad currentSource rev revString
986
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  1942
     nm msg rev2 newestRev
1030
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  1943
     containerModule containerPackage containerFile rslt
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  1944
     pkg listHere listRep diffSet 
1054
4ecc5aeca084 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  1945
     changed onlyHere onlyInRep answer labels values singleChangeSelector
1879
3ca8838014ee dont ask for changeSet-compression if the loaded
Claus Gittinger <cg@exept.de>
parents: 1877
diff changeset
  1946
     changedClasses default versionMethodsHere versionMethodsRep changedClassDefinitions
3ca8838014ee dont ask for changeSet-compression if the loaded
Claus Gittinger <cg@exept.de>
parents: 1877
diff changeset
  1947
     wasInChangeSetBefore|
986
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  1948
1189
fdc5e747c184 refactored check for a valid sourceCodeManager into one place
Claus Gittinger <cg@exept.de>
parents: 1185
diff changeset
  1949
    aClass isNil ifTrue:[self error:'nil class'].
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1950
986
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  1951
    currentClass := aClass theNonMetaclass.
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  1952
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  1953
    nm := currentClass name.
1189
fdc5e747c184 refactored check for a valid sourceCodeManager into one place
Claus Gittinger <cg@exept.de>
parents: 1185
diff changeset
  1954
    mgr := self sourceCodeManagerFor:currentClass.
986
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  1955
    mgr isNil ifTrue:[
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  1956
        ^ self
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  1957
    ].
1084
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1958
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1959
    sourceInfo := mgr sourceInfoOfClass:currentClass.
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1960
    sourceInfo notNil ifTrue:[
2209
e3a4510c45f2 Project noProjectID -> PackageId noProjectID
Claus Gittinger <cg@exept.de>
parents: 2200
diff changeset
  1961
        currentClass package ~= PackageId noProjectID ifTrue:[
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
  1962
            containerPackage := mgr directoryFromSourceInfo:sourceInfo.
1084
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1963
            containerModule := mgr moduleFromSourceInfo:sourceInfo.
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1964
        ].
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1965
        containerFile := mgr containerFromSourceInfo:sourceInfo.
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1966
    ].
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1967
989
bb70a0f30e98 care for autoloaded classes when checking out
Claus Gittinger <cg@exept.de>
parents: 987
diff changeset
  1968
    currentClass isLoaded ifTrue:[
bb70a0f30e98 care for autoloaded classes when checking out
Claus Gittinger <cg@exept.de>
parents: 987
diff changeset
  1969
        rev := currentClass binaryRevision.
bb70a0f30e98 care for autoloaded classes when checking out
Claus Gittinger <cg@exept.de>
parents: 987
diff changeset
  1970
        rev2 := currentClass revision.
bb70a0f30e98 care for autoloaded classes when checking out
Claus Gittinger <cg@exept.de>
parents: 987
diff changeset
  1971
        rev isNil ifTrue:[
bb70a0f30e98 care for autoloaded classes when checking out
Claus Gittinger <cg@exept.de>
parents: 987
diff changeset
  1972
            rev := rev2
bb70a0f30e98 care for autoloaded classes when checking out
Claus Gittinger <cg@exept.de>
parents: 987
diff changeset
  1973
        ].
bb70a0f30e98 care for autoloaded classes when checking out
Claus Gittinger <cg@exept.de>
parents: 987
diff changeset
  1974
        rev isNil ifTrue:[
1084
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1975
            pkg := currentClass package.
2209
e3a4510c45f2 Project noProjectID -> PackageId noProjectID
Claus Gittinger <cg@exept.de>
parents: 2200
diff changeset
  1976
            (pkg notNil and:[pkg ~= PackageId noProjectID]) ifTrue:[
1019
efc461bc89dc asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
  1977
                containerModule := pkg upTo:$:.
efc461bc89dc asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
  1978
                containerPackage := pkg copyFrom:(containerModule size + 2).
efc461bc89dc asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
  1979
            ].
efc461bc89dc asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
  1980
            containerModule size == 0 ifTrue:[
2791
0601ded0300b changed:
Stefan Vogel <sv@exept.de>
parents: 2775
diff changeset
  1981
                containerModule := (self class lastModule ) ? Project current repositoryModule.
1019
efc461bc89dc asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
  1982
            ].
efc461bc89dc asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
  1983
            containerPackage size == 0 ifTrue:[
2791
0601ded0300b changed:
Stefan Vogel <sv@exept.de>
parents: 2775
diff changeset
  1984
                containerPackage := (self class lastPackage ) ? Project current package.
1019
efc461bc89dc asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
  1985
            ].
1030
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  1986
            answer := self confirmWithCancel:(resources 
1035
092c701c91f3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
  1987
                                                string:'The class %3 seems to have no (valid) repository information.\\I assume you want to check it out from: %1/%2.' 
1030
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  1988
                                                with:containerModule allBold 
1035
092c701c91f3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
  1989
                                                with:containerPackage allBold
1084
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1990
                                                with:currentClass name allBold) withCRs.
1030
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  1991
            answer isNil ifTrue:[^ self "cancelled"].
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  1992
            answer ifFalse:[
2791
0601ded0300b changed:
Stefan Vogel <sv@exept.de>
parents: 2775
diff changeset
  1993
                rslt := self
1030
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  1994
                    askForContainer:(resources string:'The class seems to have no repository information.\\Do you want to checkOut from an existing containers contents ?')
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  1995
                    title:'Container to load from' note:nil 
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  1996
                    initialModule:containerModule 
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  1997
                    initialPackage:containerPackage 
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1998
                    initialFileName:(currentClass nameWithoutPrefix , '.st')
1030
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  1999
                    forNewContainer:false.
1084
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  2000
1030
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  2001
                rslt isNil ifTrue:[
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  2002
                    "/ canel
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  2003
                    ^ self
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  2004
                ].
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  2005
                containerModule := "lastModule :=" rslt at:#module.
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  2006
                containerPackage := "lastPackage :=" rslt at:#package.
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  2007
                containerFile := rslt at:#fileName.
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  2008
            ].
1019
efc461bc89dc asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
  2009
2791
0601ded0300b changed:
Stefan Vogel <sv@exept.de>
parents: 2775
diff changeset
  2010
"/            rslt := self
1019
efc461bc89dc asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
  2011
"/                askForContainer:(resources string:'The class seems to have no (valid) repository information.\\Do you want to check it out from an existing container ?')
efc461bc89dc asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
  2012
"/                title:'Container to checkOut' note:nil 
efc461bc89dc asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
  2013
"/                initialModule:containerModule 
efc461bc89dc asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
  2014
"/                initialPackage:containerPackage
efc461bc89dc asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
  2015
"/                initialFileName:(currentClass name , '.st').
1030
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  2016
"/                forNewContainer:false.
1019
efc461bc89dc asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
  2017
"/            rslt isNil ifTrue:[^ self].
efc461bc89dc asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
  2018
            "/ self warn:(resources string:'Class %1 seems to be not yet in the repository' with:currentClass name allBold).
efc461bc89dc asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
  2019
            "/ ^ self
989
bb70a0f30e98 care for autoloaded classes when checking out
Claus Gittinger <cg@exept.de>
parents: 987
diff changeset
  2020
        ].
986
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  2021
    ].
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  2022
1966
d2e8ac3b2c0b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1964
diff changeset
  2023
    containerFile isNil ifTrue:[
d2e8ac3b2c0b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1964
diff changeset
  2024
        containerFile := currentClass classFilename.
d2e8ac3b2c0b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1964
diff changeset
  2025
    ].
d2e8ac3b2c0b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1964
diff changeset
  2026
986
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  2027
    "/
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  2028
    "/ class in repository - ask for revision
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  2029
    "/
1978
91cb79a651aa *** empty log message ***
Michael Beyl <mb@exept.de>
parents: 1972
diff changeset
  2030
    containerModule isNil ifTrue:[
1982
305ae0785e65 nicer dialog
Claus Gittinger <cg@exept.de>
parents: 1978
diff changeset
  2031
        containerModule := Dialog request:(resources 
305ae0785e65 nicer dialog
Claus Gittinger <cg@exept.de>
parents: 1978
diff changeset
  2032
                                        stringWithCRs:'Missing Module Information for CheckOut of "%1".\\Module:'
305ae0785e65 nicer dialog
Claus Gittinger <cg@exept.de>
parents: 1978
diff changeset
  2033
                                        with:aClass name allBold).
1978
91cb79a651aa *** empty log message ***
Michael Beyl <mb@exept.de>
parents: 1972
diff changeset
  2034
        containerModule isEmptyOrNil ifTrue:[^ self].
91cb79a651aa *** empty log message ***
Michael Beyl <mb@exept.de>
parents: 1972
diff changeset
  2035
    ].
91cb79a651aa *** empty log message ***
Michael Beyl <mb@exept.de>
parents: 1972
diff changeset
  2036
    containerPackage isNil ifTrue:[
1982
305ae0785e65 nicer dialog
Claus Gittinger <cg@exept.de>
parents: 1978
diff changeset
  2037
        containerPackage := Dialog request:(resources 
305ae0785e65 nicer dialog
Claus Gittinger <cg@exept.de>
parents: 1978
diff changeset
  2038
                                        stringWithCRs:'Missing Package Information for CheckOut of "%1".\\Package:'
305ae0785e65 nicer dialog
Claus Gittinger <cg@exept.de>
parents: 1978
diff changeset
  2039
                                        with:aClass name allBold).
1978
91cb79a651aa *** empty log message ***
Michael Beyl <mb@exept.de>
parents: 1972
diff changeset
  2040
        containerPackage isEmptyOrNil ifTrue:[^ self].
91cb79a651aa *** empty log message ***
Michael Beyl <mb@exept.de>
parents: 1972
diff changeset
  2041
    ].
91cb79a651aa *** empty log message ***
Michael Beyl <mb@exept.de>
parents: 1972
diff changeset
  2042
1084
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  2043
    newestRev := mgr newestRevisionInFile:containerFile directory:containerPackage module:containerModule.
1006
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  2044
    askForRevision ifFalse:[
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  2045
        rev := newestRev ? ''
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  2046
    ] ifTrue:[
1019
efc461bc89dc asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
  2047
        msg := resources string:'CheckOut which revision of ''%1'': (empty for newest)' with:nm allBold.
986
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  2048
        rev notNil ifTrue:[
1006
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  2049
            msg := msg , '\\' , (resources string:'Current ''%1'' is based upon rev %2.'
1019
efc461bc89dc asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
  2050
                                           with:nm allBold with:rev).
1006
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  2051
            (rev2 notNil and:[rev2 ~= rev]) ifTrue:[
2539
abce5c41eef8 comment/format in: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2522
diff changeset
  2052
                msg := msg , '\' , (resources string:'And has been checked into the repository as %1.' with:rev2)
1006
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  2053
            ]
986
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  2054
        ].
1006
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  2055
        newestRev notNil ifTrue:[
2539
abce5c41eef8 comment/format in: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2522
diff changeset
  2056
            msg := msg , '\' , (resources string:'Newest in repository is %1.' with:newestRev)
989
bb70a0f30e98 care for autoloaded classes when checking out
Claus Gittinger <cg@exept.de>
parents: 987
diff changeset
  2057
        ].
986
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  2058
2791
0601ded0300b changed:
Stefan Vogel <sv@exept.de>
parents: 2775
diff changeset
  2059
        rev := self
1006
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  2060
                    askForExistingRevision:msg 
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  2061
                    title:'CheckOut from repository' 
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  2062
                    class:currentClass.
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  2063
        rev isNil ifTrue:[
1339
9a1e91c28cb3 checkOut dialog labels
Claus Gittinger <cg@exept.de>
parents: 1338
diff changeset
  2064
            ^ self   "/ canceled
987
fa4fc87b8540 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 986
diff changeset
  2065
        ].
1006
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  2066
    ].
986
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  2067
1006
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  2068
    rev withoutSpaces isEmpty ifTrue:[
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  2069
        msg := 'extracting newest %1 (' , (newestRev ? '???') , ')'.
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  2070
        "/ aStream := mgr getMostRecentSourceStreamForClassNamed:nm.
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  2071
        aStream := mgr getSourceStreamFor:currentClass revision:newestRev.
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  2072
        revString := '(newest: ' , (newestRev ? '???') , ')'.
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  2073
    ] ifFalse:[
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  2074
        msg := 'extracting previous %1'.
1084
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  2075
"/        aStream := mgr getSourceStreamFor:currentClass revision:rev.
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  2076
"/        revString := rev
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  2077
        aStream := mgr  
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  2078
            streamForClass:currentClass
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  2079
            fileName:containerFile 
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  2080
            revision:rev 
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  2081
            directory:containerPackage 
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  2082
            module:containerModule
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  2083
            cache:true.
1006
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  2084
    ].
996
551841dd0105 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 992
diff changeset
  2085
1006
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  2086
    aStream isNil ifTrue:[
1800
560e29381f52 ask for condense changeSet when loading the newest revision
Claus Gittinger <cg@exept.de>
parents: 1787
diff changeset
  2087
        self warn:(resources string:'Could not extract source of %1 from repository' with:aClass name allBold).
1006
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  2088
        ^ self
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  2089
    ].
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  2090
    aStream class readErrorSignal handle:[:ex |
1800
560e29381f52 ask for condense changeSet when loading the newest revision
Claus Gittinger <cg@exept.de>
parents: 1787
diff changeset
  2091
        self warn:('Read error while reading extracted source\\' , ex description) withCRs.
1006
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  2092
        aStream close.
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  2093
        ^ self
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  2094
    ] do:[
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  2095
        sourceToLoad := aStream contents asString.
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  2096
    ].
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  2097
    aStream close.
987
fa4fc87b8540 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 986
diff changeset
  2098
1919
8d30ac5be40f *** empty log message ***
boris
parents: 1913
diff changeset
  2099
    wasInChangeSetBefore := ChangeSet current includesChangeForClassOrMetaclass:currentClass.
1879
3ca8838014ee dont ask for changeSet-compression if the loaded
Claus Gittinger <cg@exept.de>
parents: 1877
diff changeset
  2100
1006
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  2101
    currentClass isLoaded ifFalse:[
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  2102
        rev = newestRev ifTrue:[
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  2103
            currentClass autoload.
996
551841dd0105 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 992
diff changeset
  2104
        ] ifFalse:[
1006
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  2105
            sourceToLoad readStream fileIn.
996
551841dd0105 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 992
diff changeset
  2106
        ].
1879
3ca8838014ee dont ask for changeSet-compression if the loaded
Claus Gittinger <cg@exept.de>
parents: 1877
diff changeset
  2107
        wasInChangeSetBefore ifFalse:[
3ca8838014ee dont ask for changeSet-compression if the loaded
Claus Gittinger <cg@exept.de>
parents: 1877
diff changeset
  2108
            ChangeSet current condenseChangesForClass:currentClass.
3ca8838014ee dont ask for changeSet-compression if the loaded
Claus Gittinger <cg@exept.de>
parents: 1877
diff changeset
  2109
        ].
1006
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  2110
        ^ self.
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  2111
    ].
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  2112
2236
050566d67400 changed:
Claus Gittinger <cg@exept.de>
parents: 2233
diff changeset
  2113
    inChangeSet := aClass hasUnsavedChanges.
1800
560e29381f52 ask for condense changeSet when loading the newest revision
Claus Gittinger <cg@exept.de>
parents: 1787
diff changeset
  2114
1972
32853d3cb43a care for errors during fileOut ofr local source
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  2115
    Error handle:[:ex |
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2116
        (Dialog 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2117
            confirm:(resources 
2426
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  2118
                        stringWithCRs:'An error:\    %1\was encountered while generating the current source of the class %2.\This might be due to some missing or corrupted source file.\You may proceed, but no information about the differences between your current version and the repositories version can be shown.\\Continue ?'
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  2119
                        with:ex description 
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2120
                        with:currentClass name allBold) 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2121
            noLabel:'Cancel') 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2122
        ifFalse:[
1999
57cad7a53262 changed #checkOutClasse
Stefan Vogel <sv@exept.de>
parents: 1997
diff changeset
  2123
            AbortOperationRequest raise
1972
32853d3cb43a care for errors during fileOut ofr local source
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  2124
        ].
2426
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  2125
        sourceToLoad readStream fileIn.
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  2126
        ^ self.
1972
32853d3cb43a care for errors during fileOut ofr local source
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  2127
    ] do:[
2426
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  2128
        self activityNotification:'generating current source...'.
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  2129
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  2130
        currentSource := self sourceCodeOfClass:currentClass.
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  2131
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  2132
        self activityNotification:'comparing...'.
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  2133
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  2134
        sourceToLoad = currentSource ifTrue:[
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  2135
            "/ make all methods belong to the classes project
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  2136
            self setPackageOfAllMethodsIn:aClass to:aClass package.
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  2137
            inChangeSet ifTrue:[
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  2138
                rev = newestRev ifTrue:[
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  2139
                    (askForConfirmation not
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  2140
                    or:[ wasInChangeSetBefore not
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  2141
                    or:[ self confirm:(resources 
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  2142
                                    stringWithCRs:'%1 is up-to-date.\\Remove entries for %1 from changeSet ?'
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  2143
                                    with:aClass name)]]) 
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  2144
                    ifTrue:[
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  2145
                        ChangeSet current condenseChangesForClass:aClass.
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  2146
                    ].
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  2147
                ].
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  2148
            ].
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  2149
            self activityNotification:'... nothing changed in repository'.
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  2150
            ^ self.
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  2151
        ].
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  2152
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  2153
        self activityNotification:'generating diffSet...'.
1972
32853d3cb43a care for errors during fileOut ofr local source
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  2154
        listHere := ChangeSet fromStream:(currentSource readStream).
32853d3cb43a care for errors during fileOut ofr local source
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  2155
    ].
2426
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  2156
1006
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  2157
    listRep := ChangeSet fromStream:(sourceToLoad readStream).
1051
9f76e78c91d4 *** empty log message ***
frank
parents: 1050
diff changeset
  2158
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2159
    Error handle:[:ex |
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2160
        (Dialog 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2161
            confirm:(resources 
2426
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  2162
                        stringWithCRs:'An error:\    %1\was encountered while trying to figure out what has changed.\This might be due to some missing or corrupted source file.\If you proceed, the old code will be loaded over the existing code without further checks (fileIn).\\Continue ?'
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  2163
                        with:ex description
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  2164
                    ) 
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2165
            noLabel:'Cancel') 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2166
        ifFalse:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2167
            ^ self
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2168
        ].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2169
        sourceToLoad readStream fileIn.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2170
        ^ self.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2171
    ] do:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2172
        versionMethodsHere := listHere select:[:change | (change isMethodChange 
3354
d36778f0ff0b class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3351
diff changeset
  2173
                                               and:[((self sourceCodeManagerFor:aClass) "AbstractSourceCodeManager" isVersionMethodSelector:change selector)
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2174
                                               and:[change changeClass isMeta]])].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2175
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2176
        versionMethodsRep := listRep select:[:change | (change isMethodChange 
3354
d36778f0ff0b class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3351
diff changeset
  2177
                                               and:[((self sourceCodeManagerFor:aClass) "AbstractSourceCodeManager" isVersionMethodSelector:change selector)
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2178
                                               and:[change changeClass isMeta]])].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2179
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2180
        "/ compare all but the version methods
3291
7fc5a1fea0fd Fix stc compiler warnings
Stefan Vogel <sv@exept.de>
parents: 3287
diff changeset
  2181
        listHere := listHere reject:[:change | (change isMethodChange 
2184
4bb6267612be changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
fm
parents: 2175
diff changeset
  2182
                                               and:[(AbstractSourceCodeManager isVersionMethodSelector:change selector)
3291
7fc5a1fea0fd Fix stc compiler warnings
Stefan Vogel <sv@exept.de>
parents: 3287
diff changeset
  2183
                                               and:[change changeClass isMeta]])].
7fc5a1fea0fd Fix stc compiler warnings
Stefan Vogel <sv@exept.de>
parents: 3287
diff changeset
  2184
        listRep := listRep reject:[:change | (change isMethodChange 
2184
4bb6267612be changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
fm
parents: 2175
diff changeset
  2185
                                               and:[(AbstractSourceCodeManager isVersionMethodSelector:change selector)
3291
7fc5a1fea0fd Fix stc compiler warnings
Stefan Vogel <sv@exept.de>
parents: 3287
diff changeset
  2186
                                               and:[change changeClass isMeta]])].
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2187
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2188
        diffSet := listHere diffSetsAgainst:listRep.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2189
        changed := diffSet changed.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2190
        onlyHere := diffSet onlyInReceiver.
2794
77c62d93cc76 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2793
diff changeset
  2191
77c62d93cc76 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2793
diff changeset
  2192
        "/ reject extensions
77c62d93cc76 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2793
diff changeset
  2193
        onlyHere := onlyHere reject:[:eachDiff|  
4416
2868d1f08a0a #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 4410
diff changeset
  2194
                        |changeClass method methodsPackage|
2794
77c62d93cc76 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2793
diff changeset
  2195
3272
6ce72ad3d416 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3261
diff changeset
  2196
                        eachDiff isMethodChange  
4416
2868d1f08a0a #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 4410
diff changeset
  2197
                        and:[ (changeClass := eachDiff changeClass) notNil
2868d1f08a0a #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 4410
diff changeset
  2198
                        and:[ (method := (changeClass compiledMethodAt:eachDiff selector)) notNil 
2868d1f08a0a #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 4410
diff changeset
  2199
                        and:[ (methodsPackage := method package) ~= changeClass package
2794
77c62d93cc76 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2793
diff changeset
  2200
                        and:[ methodsPackage ~= PackageId noProjectID  ]]]]
77c62d93cc76 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2793
diff changeset
  2201
                    ]. 
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2202
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2203
        onlyInRep := diffSet onlyInArg.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2204
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2205
        changedClassDefinitions := changed select:[:eachChangePair | eachChangePair first isClassDefinitionChange]. 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2206
        changed := changed reject:[:eachChangePair | eachChangePair first isClassDefinitionChange]. 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2207
        changed := changed reject:[:eachChangePair | eachChangePair first isClassCommentChange]. 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2208
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2209
        labels := #('Cancel' 'Merge' 'Load'). 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2210
        values := #(nil #merge #load). 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2211
        default := askForRevision 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2212
                        ifTrue:[3. "i.e. load"]
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2213
                        ifFalse:[2. "i.e. merge"].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2214
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2215
        msg := 'About to load ''%4''.\\'.
4416
2868d1f08a0a #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 4410
diff changeset
  2216
        onlyInRep notEmpty ifTrue:[
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2217
            msg := msg , 'The repositories version contains %1 method(s) which are not in your current class.\'.
2064
3e7b6104ce47 When checking out newest sources from a repository,
Stefan Vogel <sv@exept.de>
parents: 2063
diff changeset
  2218
        ].
4416
2868d1f08a0a #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 4410
diff changeset
  2219
        onlyHere notEmpty ifTrue:[
2794
77c62d93cc76 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2793
diff changeset
  2220
            msg := msg , (onlyInRep size > 0 ifTrue:['And there '] ifFalse:['There ']).
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2221
            msg := msg , 'are %2 methods in your current class, which are not in the repository.\'.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2222
        ].
4416
2868d1f08a0a #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 4410
diff changeset
  2223
        changed notEmpty ifTrue:[
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2224
            changed size == 1 ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2225
                msg := msg , 'The ''%6''-method is different (present in both).\\'.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2226
                singleChangeSelector := changed first first selector allBold
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2227
            ] ifFalse:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2228
                msg := msg , '%3 methods are different (present in both).\\'.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2229
            ]
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2230
        ].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2231
        changedClassDefinitions size > 0 ifTrue:[
2794
77c62d93cc76 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2793
diff changeset
  2232
            msg := msg , (changedClassDefinitions size == 1 
77c62d93cc76 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2793
diff changeset
  2233
                            ifTrue:['The class definition is different.\\'] 
77c62d93cc76 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2793
diff changeset
  2234
                            ifFalse:['%5 class definitions are different.\\'])
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2235
        ].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2236
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2237
        onlyHere isEmpty ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2238
            onlyInRep isEmpty ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2239
                (changed isEmpty and:[changedClassDefinitions isEmpty]) ifTrue:[
2605
93f1e7e8aee7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2602
diff changeset
  2240
                    versionMethodsRep notEmpty ifTrue:[
4329
f1a534377d1e #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4320
diff changeset
  2241
                         (answer := AlwaysUpdateVersionMethodsIfNoOtherChange) isNil ifTrue:[
f1a534377d1e #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4320
diff changeset
  2242
                            Dialog 
f1a534377d1e #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4320
diff changeset
  2243
                                withOptoutOption:[AlwaysUpdateVersionMethodsIfNoOtherChange := true]
f1a534377d1e #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4320
diff changeset
  2244
                                labelled:'Do not ask again, but always update if no other change'
f1a534377d1e #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4320
diff changeset
  2245
                                do:[
f1a534377d1e #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4320
diff changeset
  2246
                                    answer := self confirm:(resources string:'Only version methods are different in %1.\\Update the version-IDs ?' with:aClass name allBold) withCRs.
f1a534377d1e #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4320
diff changeset
  2247
                                ]
f1a534377d1e #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4320
diff changeset
  2248
                        ].
f1a534377d1e #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4320
diff changeset
  2249
                        answer ifTrue:[
f1a534377d1e #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4320
diff changeset
  2250
                            Class withoutUpdatingChangesDo:[
f1a534377d1e #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4320
diff changeset
  2251
                                versionMethodsRep do:[:each | each apply].
f1a534377d1e #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4320
diff changeset
  2252
                            ].
f1a534377d1e #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4320
diff changeset
  2253
                        ].
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2254
                    ].
2193
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
  2255
                    "/ make all those methods belong to the classes project
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
  2256
                    "/ no - that is wrong !! self setPackageOfAllMethodsIn:aClass to:aClass package.
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
  2257
                    self setPackageOfAllMethodsInChangeSet:listRep to:aClass package.
2605
93f1e7e8aee7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2602
diff changeset
  2258
                    self activityNotification:'Only version methods are different in the repository'.
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2259
                    ^ self
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2260
                ].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2261
                inChangeSet ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2262
                    msg := msg , '\Attention:\Load will undo your changes made to ''%4'' (if any were made).'.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2263
                ].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2264
                labels := #('Cancel' 'Load'). 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2265
                values := #(nil #load). 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2266
                default := askForRevision 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2267
                                ifTrue:[2. "i.e. load"]
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2268
                                ifFalse:[1. "i.e. cancel"].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2269
                default := 2. 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2270
            ] ifFalse:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2271
                changed isEmpty ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2272
                    msg := msg , '\Attention:\Load will load methods which are not present in ''%4''.'.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2273
                    labels := #('Cancel' 'Load'). 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2274
                    values := #(nil #load). 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2275
                    default := askForRevision 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2276
                                    ifTrue:[2. "i.e. load"]
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2277
                                    ifFalse:[1. "i.e. cancel"].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2278
                    default := 2. 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2279
                ] ifFalse:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2280
                    inChangeSet ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2281
                        msg := msg , '\Attention:\Load will undo your changes made to ''%4'' (if any were made);'.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2282
                    ].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2283
                    msg := msg , '\Merge will only load methods which are not present in ''%4'' (i.e. undo removals but preserve changes).'.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2284
                ].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2285
            ]
1006
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  2286
        ] ifFalse:[
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2287
            onlyInRep isEmpty ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2288
                inChangeSet ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2289
                    msg := msg , '\Attention:\Load will undo your changes made to ''%4'' (if any were made),'.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2290
                    msg := msg , '\and remove added methods which are not present in the repository version.'.
1055
f44b12442c58 version update after load from rep.
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  2291
                ].
1121
7531e9dd8ba8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1120
diff changeset
  2292
                labels := #('Cancel' 'Load'). 
987
fa4fc87b8540 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 986
diff changeset
  2293
                values := #(nil #load). 
1007
44c0229bcb43 better dialog message text and load/cancel default.
Claus Gittinger <cg@exept.de>
parents: 1006
diff changeset
  2294
                default := askForRevision 
44c0229bcb43 better dialog message text and load/cancel default.
Claus Gittinger <cg@exept.de>
parents: 1006
diff changeset
  2295
                                ifTrue:[2. "i.e. load"]
44c0229bcb43 better dialog message text and load/cancel default.
Claus Gittinger <cg@exept.de>
parents: 1006
diff changeset
  2296
                                ifFalse:[1. "i.e. cancel"].
1907
30ca5aea5a7a dialogs defaults
fm
parents: 1886
diff changeset
  2297
                default := 2. 
987
fa4fc87b8540 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 986
diff changeset
  2298
            ] ifFalse:[
1339
9a1e91c28cb3 checkOut dialog labels
Claus Gittinger <cg@exept.de>
parents: 1338
diff changeset
  2299
                inChangeSet ifTrue:[
9a1e91c28cb3 checkOut dialog labels
Claus Gittinger <cg@exept.de>
parents: 1338
diff changeset
  2300
                    msg := msg , '\Attention:\Load will undo your changes made to ''%4'' (if any were made);'.
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2301
                    msg := msg , '\Merge will only load methods which are not present in ''%4'' (i.e. undo removals but preserve changes).'.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2302
                ]
1339
9a1e91c28cb3 checkOut dialog labels
Claus Gittinger <cg@exept.de>
parents: 1338
diff changeset
  2303
            ]
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2304
        ].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2305
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2306
        msg := msg bindWith:onlyInRep size printString 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2307
                   with:onlyHere size printString 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2308
                   with:changed size printString
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2309
                   with:aClass name allBold
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2310
                   with:changedClassDefinitions size printString
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2311
                   with:singleChangeSelector.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2312
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2313
        askForConfirmation ifFalse:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2314
            answer := #load           
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2315
        ] ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2316
            answer := (Dialog confirmWithCancel:msg withCRs
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2317
                   labels:(resources array:labels)
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2318
                   values:values 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2319
                   default:default).
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2320
            answer isNil ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2321
                self activityNotification:'...cancelled'.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2322
                ^ self
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2323
            ].
2013
0457926edfdb allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents: 2009
diff changeset
  2324
        ].
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2325
        self activityNotification:'updating...'.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2326
        changedClasses := IdentitySet new.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2327
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2328
        answer == #load ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2329
            "when loading, remove all the methods which are no longer in classes with a changed
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2330
             class definition. So we avoid possible compile errors of old methods, which will go away"
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2331
            onlyHere do:[:eachChange |   
3272
6ce72ad3d416 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3261
diff changeset
  2332
                "remove this change (method not present in repository version)"
6ce72ad3d416 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3261
diff changeset
  2333
                |cClass|
6ce72ad3d416 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3261
diff changeset
  2334
                eachChange isMethodChange ifTrue:[
6ce72ad3d416 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3261
diff changeset
  2335
                    cClass := eachChange changeClass.
6ce72ad3d416 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3261
diff changeset
  2336
                    cClass notNil ifTrue:[ 
6ce72ad3d416 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3261
diff changeset
  2337
                       cClass basicRemoveSelector:eachChange selector 
6ce72ad3d416 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3261
diff changeset
  2338
                    ].
6ce72ad3d416 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3261
diff changeset
  2339
                ]
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2340
            ].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2341
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2342
            changedClassDefinitions do:[:eachChangeArr | 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2343
                |cHere eachChangedClass| 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2344
                cHere := eachChangeArr at:1.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2345
                eachChangedClass := cHere changeClass.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2346
                eachChangedClass notNil ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2347
                    changedClasses add:eachChangedClass.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2348
                    eachChangedClass := eachChangedClass theNonMetaclass.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2349
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2350
                    "remove changed methods now, but keep the changes (to be applied later)"
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2351
                    changed do:[:eachChangeArr|
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2352
                        |eachChange eachClass|
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2353
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2354
                        eachChange := eachChangeArr first.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2355
                        eachChange isMethodChange ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2356
                            eachClass := eachChange changeClass.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2357
                            eachClass theNonMetaclass == eachChangedClass ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2358
                                eachClass basicRemoveSelector:eachChange selector.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2359
                            ].
1999
57cad7a53262 changed #checkOutClasse
Stefan Vogel <sv@exept.de>
parents: 1997
diff changeset
  2360
                        ].
57cad7a53262 changed #checkOutClasse
Stefan Vogel <sv@exept.de>
parents: 1997
diff changeset
  2361
                    ].
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2362
                ]
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2363
            ].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2364
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2365
           "apply class definition changes (use the repository version)"
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2366
           changedClassDefinitions do:[:eachChangeArr |    
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2367
                |cRep| 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2368
                cRep := eachChangeArr at:2.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2369
                cRep apply.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2370
            ].
1057
6903d4d5097d do not update the changesFile, when checkingOut
Claus Gittinger <cg@exept.de>
parents: 1056
diff changeset
  2371
        ].
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2372
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2373
        onlyInRep do:[:eachChange |
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2374
            |changeClass|
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2375
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2376
            "apply this change (method only present in rep-version)"
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2377
             eachChange apply.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2378
             eachChange isMethodChange ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2379
                 changeClass := eachChange changeClass.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2380
                 changeClass notNil ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2381
                     eachChange changeMethod setPackage:(changeClass package).
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2382
                     changedClasses add:changeClass.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2383
                 ]
2013
0457926edfdb allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents: 2009
diff changeset
  2384
             ]
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2385
        ]
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2386
    .
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2387
        answer == #load ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2388
            changed do:[:eachChangeArr | "apply this change (go to rep-version)"
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2389
                 |cHere cRep| 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2390
                 cHere := eachChangeArr at:1.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2391
                 cRep := eachChangeArr at:2.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2392
                 cRep apply.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2393
                 cRep isMethodChange ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2394
                     cRep changeMethod setPackage:(cRep changeClass package).
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2395
                     changedClasses add:cRep changeClass.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2396
                 ]
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2397
            ].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2398
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2399
            versionMethodsRep size >= 1 ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2400
                versionMethodsRep last apply.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2401
            ] ifFalse:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2402
                self error:'missing version method in repository' mayProceed:true.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2403
            ].
2193
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
  2404
            "/ make all those methods belong to the classes project
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
  2405
            "/ no - that is wrong !! self setPackageOfAllMethodsIn:aClass to:aClass package.
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
  2406
            self setPackageOfAllMethodsInChangeSet:listRep to:aClass package.
1055
f44b12442c58 version update after load from rep.
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  2407
        ].
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2408
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2409
        answer == #load ifTrue:[
2236
050566d67400 changed:
Claus Gittinger <cg@exept.de>
parents: 2233
diff changeset
  2410
            inChangeSet := aClass hasUnsavedChanges.
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2411
            inChangeSet ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2412
                rev = newestRev ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2413
                    (wasInChangeSetBefore not
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2414
                     or:[ self confirm:(resources 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2415
                                    stringWithCRs:'%1 is now up-to-date.\\Remove entries for %1 from changeSet ?'
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2416
                                    with:aClass name)]) 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2417
                    ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2418
                        ChangeSet current condenseChangesForClass:aClass.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2419
                    ].
1800
560e29381f52 ask for condense changeSet when loading the newest revision
Claus Gittinger <cg@exept.de>
parents: 1787
diff changeset
  2420
                ].
560e29381f52 ask for condense changeSet when loading the newest revision
Claus Gittinger <cg@exept.de>
parents: 1787
diff changeset
  2421
            ].
560e29381f52 ask for condense changeSet when loading the newest revision
Claus Gittinger <cg@exept.de>
parents: 1787
diff changeset
  2422
        ].
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2423
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2424
        changedClasses do:[:eachClass |
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2425
             eachClass changed:#projectOrganization.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2426
        ].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2427
        Smalltalk changed:#projectOrganization.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2428
        self activityNotification:'... done'.
1800
560e29381f52 ask for condense changeSet when loading the newest revision
Claus Gittinger <cg@exept.de>
parents: 1787
diff changeset
  2429
    ].
560e29381f52 ask for condense changeSet when loading the newest revision
Claus Gittinger <cg@exept.de>
parents: 1787
diff changeset
  2430
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
  2431
    "Modified: / 07-02-2001 / 18:18:32 / ps"
3354
d36778f0ff0b class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3351
diff changeset
  2432
    "Modified: / 22-07-2013 / 13:17:32 / cg"
4329
f1a534377d1e #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4320
diff changeset
  2433
    "Modified: / 14-06-2018 / 17:02:05 / Claus Gittinger"
4416
2868d1f08a0a #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 4410
diff changeset
  2434
    "Modified: / 02-04-2019 / 12:03:11 / Stefan Vogel"
986
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  2435
!
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  2436
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
  2437
checkoutExtensionMethodsForPackage:packageToCheckOut askForRevision:askForRevision askForMerge:askForMerge usingManager:aSourceCodeManager
1522
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2438
    "check-out a class from the source repository.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2439
     If askForRevision is false, check-out the newest version."
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2440
3291
7fc5a1fea0fd Fix stc compiler warnings
Stefan Vogel <sv@exept.de>
parents: 3287
diff changeset
  2441
    |inChangeSet extensionMethods msg
1704
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  2442
     listHere listRep diffSet 
1522
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2443
     changed onlyHere onlyInRep answer labels values singleChangeSelector
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2444
     changedClasses default |
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2445
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
  2446
    listRep := self changeSetForExtensionMethodsForPackage:packageToCheckOut askForRevision:askForRevision usingManager:aSourceCodeManager.
1841
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  2447
    listRep isNil ifTrue:[ ^self ].
1522
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2448
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2449
    self activityNotification:'generating diffSet...'.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2450
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2451
    extensionMethods := OrderedCollection new.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2452
    Smalltalk allClassesDo:[:aClass | |owner classPackage|
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2453
        "/ individual methods ...
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2454
        aClass isMeta ifFalse:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2455
            (aClass package ~= packageToCheckOut) ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2456
                aClass instAndClassSelectorsAndMethodsDo:[:sel :mthd |
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2457
                    "/ methods in this project ...
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2458
                    (mthd package = packageToCheckOut) ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2459
                        "/ ... whose class is not in the ckechIn-set
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2460
                        extensionMethods add:mthd
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2461
                    ]
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2462
                ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2463
            ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2464
        ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2465
    ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2466
    listHere := ChangeSet forExistingMethods:extensionMethods.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2467
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2468
    inChangeSet := listRep contains:[:someChange |
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2469
                            |cClass cSel|
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2470
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2471
                            someChange isMethodChange ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2472
                                cClass := someChange changeClass.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2473
                                cSel := someChange selector.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2474
                                ChangeSet current includesChangeForClass:cClass selector:cSel
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2475
                            ]
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2476
                    ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2477
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2478
    diffSet := listHere diffSetsAgainst:listRep.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2479
    changed := diffSet changed.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2480
    onlyHere := diffSet onlyInReceiver.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2481
    onlyInRep := diffSet onlyInArg.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2482
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2483
    labels := #('Cancel' 'Merge' 'Load'). 
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2484
    values := #(nil #merge #load). 
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2485
    default := askForRevision 
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2486
                    ifTrue:[3. "i.e. load"]
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2487
                    ifFalse:[2. "i.e. merge"].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2488
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2489
    msg := 'About to load extensions for ''%5''.\\'.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2490
    onlyInRep size > 0 ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2491
        msg := msg , 'The repositories version contains %1 extension method(s) which are not in your current image.\'.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2492
    ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2493
    onlyHere size > 0 ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2494
        onlyInRep size > 0 ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2495
            msg := msg , 'And there '.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2496
        ] ifFalse:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2497
            msg := msg , 'There '.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2498
        ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2499
        msg := msg , 'are %2 extension methods in your current image, which are not in the repository.\'.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2500
    ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2501
    changed size > 0 ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2502
        changed size == 1 ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2503
            msg := msg , 'The ''%5''-method is different (present in both).\\'.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2504
            singleChangeSelector := changed first first selector allBold
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2505
        ] ifFalse:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2506
            msg := msg , '%3 methods are different (present in both).\\'.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2507
        ]
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2508
    ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2509
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2510
    onlyHere isEmpty ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2511
        onlyInRep isEmpty ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2512
            (changed isEmpty) ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2513
                listRep do:[:eachChange |
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2514
                    eachChange changeMethod setPackage:packageToCheckOut.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2515
                ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2516
                ^ self
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2517
            ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2518
            inChangeSet ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2519
                msg := msg , '\Attention:\Load may undo any changes made to on of the extension methods (if any were made).'.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2520
            ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2521
            labels := #('Cancel' 'Load'). 
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2522
            values := #(nil #load). 
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2523
            default := askForRevision 
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2524
                            ifTrue:[2. "i.e. load"]
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2525
                            ifFalse:[1. "i.e. cancel"].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2526
        ] ifFalse:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2527
            changed isEmpty ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2528
                msg := msg , '\Attention:\Load will load methods which are not present in the image.'.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2529
                labels := #('Cancel' 'Load'). 
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2530
                values := #(nil #load). 
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2531
                default := askForRevision 
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2532
                                ifTrue:[2. "i.e. load"]
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2533
                                ifFalse:[1. "i.e. cancel"].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2534
            ] ifFalse:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2535
                inChangeSet ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2536
                    msg := msg , '\Attention:\Load will undo your changes made to the image (if any were made);'.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2537
                ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2538
                msg := msg , '\Merge will only load methods which are not present in the image (i.e. undo removals but preserve changes).'.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2539
            ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2540
        ]
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2541
    ] ifFalse:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2542
        onlyInRep isEmpty ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2543
            inChangeSet ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2544
                msg := msg , '\Attention:\Load will undo your changes made to the image (if any were made),'.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2545
                msg := msg , '\and remove added methods which are not present in the repository version.'.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2546
            ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2547
            labels := #('Cancel' 'Load'). 
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2548
            values := #(nil #load). 
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2549
            default := askForRevision 
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2550
                            ifTrue:[2. "i.e. load"]
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2551
                            ifFalse:[1. "i.e. cancel"].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2552
        ] ifFalse:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2553
            inChangeSet ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2554
                msg := msg , '\Attention:\Load will undo your changes made to the image (if any were made);'.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2555
                msg := msg , '\Merge will only load methods which are not present in the image (i.e. undo removals but preserve changes).'.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2556
            ]
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2557
        ]
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2558
    ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2559
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2560
    msg := msg bindWith:onlyInRep size printString 
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2561
               with:onlyHere size printString 
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2562
               with:changed size printString
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2563
               with:singleChangeSelector
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2564
               with:packageToCheckOut allBold.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2565
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2566
    answer := (Dialog confirmWithCancel:msg withCRs
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2567
           labels:(resources array:labels)
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2568
           values:values 
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2569
           default:default).
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2570
    answer isNil ifTrue:[^ self].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2571
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2572
    self activityNotification:'updating...'.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2573
    changedClasses := IdentitySet new.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2574
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2575
"/    Class withoutUpdatingChangesDo:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2576
        onlyInRep do:[:eachChange | "apply this change (method only present in rep-version)"
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2577
                                     Class withoutUpdatingChangeSetDo:[ eachChange apply ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2578
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2579
                                     eachChange changeMethod setPackage:packageToCheckOut.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2580
                                     changedClasses add:eachChange changeClass.   
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2581
                     ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2582
        answer == #load ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2583
            onlyHere do:[:eachChange |   "remove this change (method not present in rep-version)"
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2584
                                         |cClass cSel|
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2585
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2586
                                         cClass := eachChange changeClass.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2587
                                         cSel := eachChange selector.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2588
                                         Class withoutUpdatingChangeSetDo:[ cClass removeSelector:cSel ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2589
                        ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2590
            changed do:[:eachChangeArr | "apply this change (go to rep-version)"
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2591
                                         |cHere cRep| 
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2592
                                         cHere := eachChangeArr at:1.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2593
                                         cRep := eachChangeArr at:2.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2594
                                         Class withoutUpdatingChangeSetDo:[ cRep apply ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2595
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2596
                                         cRep changeMethod setPackage:packageToCheckOut.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2597
                                         changedClasses add:cRep changeClass.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2598
                       ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2599
        ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2600
"/    ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2601
    changedClasses do:[:eachClass |
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2602
         eachClass changed:#projectOrganization.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2603
    ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2604
    Smalltalk changed:#projectOrganization.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2605
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2606
    "Modified: / 07-02-2001 / 18:18:32 / ps"
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
  2607
    "Created: / 29-12-2011 / 14:34:12 / cg"
1522
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2608
!
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2609
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2610
compareClassWithRepository:aClass
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2611
    "open a diff-textView comparing the current (in-image) version
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2612
     against its orgiginal version found in the repository."
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2613
1449
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2614
    self compareClassWithRepository:aClass askForRevision:true
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2615
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2616
    "
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2617
      self compareClassWithRepository:Array
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2618
    "
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2619
!
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2620
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2621
compareClassWithRepository:aClass askForRevision:askForRevision
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2622
    "open a diff-textView comparing the current (in-image) version
4320
a8d8e5c80595 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4301
diff changeset
  2623
     against the newest (askForRevision=false)
a8d8e5c80595 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4301
diff changeset
  2624
     or an asked-for version (askForRevision=true) found in the repository."
3896
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2625
4255
df635db10e0a #UI_ENHANCEMENT by mawalch
mawalch
parents: 4245
diff changeset
  2626
    |classToCompare brwsr comparedSource currentSource rev revString thisRevString
3953
5d404f99092f #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3926
diff changeset
  2627
     scmManager revisionInClass versionsAreTheSame revInfo revAuthor revDate revLabel |
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2628
1449
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2629
    classToCompare := aClass theNonMetaclass.
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2630
4255
df635db10e0a #UI_ENHANCEMENT by mawalch
mawalch
parents: 4245
diff changeset
  2631
    comparedSource := self
df635db10e0a #UI_ENHANCEMENT by mawalch
mawalch
parents: 4245
diff changeset
  2632
                        fetchSourceOf:classToCompare askForRevision:askForRevision
df635db10e0a #UI_ENHANCEMENT by mawalch
mawalch
parents: 4245
diff changeset
  2633
                        into:[:revStringArg :revisionInClassArg :scmManagerArg|
3896
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2634
                            revString := revStringArg.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2635
                            revisionInClass := revisionInClassArg.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2636
                            scmManager := scmManagerArg.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2637
                        ].
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2638
    comparedSource isNil ifTrue:[
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2639
        ^ self
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2640
    ].
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2641
3896
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2642
"/    classToCompare := aClass theNonMetaclass.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2643
"/
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2644
"/    nm := classToCompare name.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2645
"/    (mgr := manager) isNil ifTrue:[
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2646
"/        mgr := self sourceCodeManagerFor:classToCompare.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2647
"/        mgr isNil ifTrue:[
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2648
"/            self error:'oops - no sourcecode manager' mayProceed:true.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2649
"/            ^ self
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2650
"/        ].
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2651
"/    ].
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2652
"/
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2653
"/    rev := classToCompare revisionInfoOfManager:mgr.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2654
"/"/    rev := classToCompare binaryRevision.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2655
"/    revisionInClass := classToCompare revisionOfManager:mgr.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2656
"/    rev isNil ifTrue:[
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2657
"/        rev := revisionInClass
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2658
"/    ].
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2659
"/    rev isNil ifTrue:[
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2660
"/        (Dialog confirm:'Class seems to be not yet in the repository (or classes revision info is missing or corrupted)\\Proceed ?' withCRs)
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2661
"/        ifFalse:[
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2662
"/            ^ self
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2663
"/        ]
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2664
"/    ].
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2665
"/
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2666
"/    "/
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2667
"/    "/ class in repository - ask for revision
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2668
"/    "/
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2669
"/    SourceCodeManagerError handle:[:ex |
4255
df635db10e0a #UI_ENHANCEMENT by mawalch
mawalch
parents: 4245
diff changeset
  2670
"/        Dialog warn:(resources
3896
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2671
"/                                stringWithCRs:'Could not fetch revision info of "%1".\\Please check your sourcecode manager settings of %2 for package: "%3".\(and possibly the network for reachability of the repository)'
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2672
"/                                with:classToCompare name
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2673
"/                                with:classToCompare sourceCodeManager managerTypeName
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2674
"/                                with:classToCompare package).
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2675
"/        ^ self.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2676
"/    ] do:[
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2677
"/        newestRev := mgr newestRevisionOf:classToCompare.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2678
"/    ].
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2679
"/    askForRevision ifTrue:[
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2680
"/        msg := resources string:'Compare to revision: (empty for newest)'.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2681
"/        rev notNil ifTrue:[
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2682
"/            msg := msg , '\\' , (resources string:'Current %1 is based upon rev %2.'
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2683
"/                                           with:nm allBold with:rev).
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2684
"/            (revisionInClass notNil and:[revisionInClass ~= rev]) ifTrue:[
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2685
"/                msg := msg , '\' , (resources string:'And has been checked into the repository as %1.'
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2686
"/                                               with:revisionInClass)
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2687
"/            ]
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2688
"/        ].
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2689
"/        newestRev notNil ifTrue:[
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2690
"/            msg := msg , '\' , (resources string:'Newest in repository is %1.'
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2691
"/                                           with:newestRev)
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2692
"/        ].
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2693
"/
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2694
"/        rev := self
4255
df635db10e0a #UI_ENHANCEMENT by mawalch
mawalch
parents: 4245
diff changeset
  2695
"/                    askForExistingRevision:msg
df635db10e0a #UI_ENHANCEMENT by mawalch
mawalch
parents: 4245
diff changeset
  2696
"/                    title:'Compare with repository'
3896
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2697
"/                    class:classToCompare.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2698
"/    ] ifFalse:[
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2699
"/        rev := newestRev.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2700
"/    ].
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2701
"/
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2702
"/    rev isNil ifTrue:[
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2703
"/        mgr = classToCompare sourceCodeManager ifTrue:[
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2704
"/            msg := 'Could not figure out the newest revision of "%1".\\Please check if this class is really contained in that repository,\and also your sourcecode manager settings of %2 for package: "%3".\(and possibly the network for reachability of the repository)'
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2705
"/        ] ifFalse:[
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2706
"/            msg := 'Could not figure out the newest revision of "%1".\\Notice that the class is actually maintained by %4, not %2.\Please check if this class is really in the %2 repository,\and also your sourcecode manager settings of %2 for package: "%3".\(and possibly the network for reachability of the repository)'
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2707
"/        ].
4255
df635db10e0a #UI_ENHANCEMENT by mawalch
mawalch
parents: 4245
diff changeset
  2708
"/        Dialog warn:(resources
3896
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2709
"/                                stringWithCRs:msg
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2710
"/                                with:classToCompare name
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2711
"/                                with:mgr managerTypeName
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2712
"/                                with:classToCompare package
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2713
"/                                with:(classToCompare sourceCodeManager managerTypeName)).
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2714
"/        ^ self.
4255
df635db10e0a #UI_ENHANCEMENT by mawalch
mawalch
parents: 4245
diff changeset
  2715
"/
3896
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2716
"/    ].
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2717
"/    rev withoutSpaces isEmpty ifTrue:[
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2718
"/        msg := 'extracting newest %1 (' , (newestRev ? '???') , ')'.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2719
"/        "/ aStream := mgr getMostRecentSourceStreamForClassNamed:nm.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2720
"/        aStream := mgr getSourceStreamFor:classToCompare revision:newestRev.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2721
"/        revString := '(newest: ' , (newestRev ? '???') , ')'.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2722
"/    ] ifFalse:[
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2723
"/        msg := 'extracting previous %1'.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2724
"/        aStream := mgr getSourceStreamFor:classToCompare revision:rev.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2725
"/        revString := rev
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2726
"/    ].
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2727
"/
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2728
"/    aStream isNil ifTrue:[
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2729
"/        self warn:'Could not extract source from repository (check repository settings / network)'.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2730
"/        ^ self
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2731
"/    ].
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2732
"/    aStream class readErrorSignal handle:[:ex |
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2733
"/        self warn:('Read error while reading extracted source\\' , ex description) withCRs.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2734
"/        aStream close.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2735
"/        ^ self
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2736
"/    ] do:[
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2737
"/        comparedSource := aStream contents asString.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2738
"/    ].
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2739
"/    aStream close.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2740
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2741
    self activityNotification:'generating current source...'.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2742
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2743
    currentSource := self sourceCodeOfClass:classToCompare.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2744
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2745
    self activityNotification:'comparing...'.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2746
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2747
    versionsAreTheSame := false.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2748
    "/ a quick smoke test, if code is exactly the same
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2749
    comparedSource = currentSource ifTrue:[
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2750
        versionsAreTheSame := true.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2751
    ] ifFalse:[
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2752
        "/ this branch generates chunks and compares individual methods.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2753
        "/ this is a litle more expensive, but will deal with reordered methods in the source,
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2754
        "/ additional whitespace, empty lines etc.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2755
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2756
        thisRevString := revisionInClass ? 'no revision'.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2757
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2758
        revString = '(newest)' ifTrue:[
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2759
            |newestRev|
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2760
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2761
            (newestRev := scmManager newestRevisionOf:classToCompare) notNil ifTrue:[
3953
5d404f99092f #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3926
diff changeset
  2762
                revString := '(newest is ' , newestRev , ')'.
5d404f99092f #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3926
diff changeset
  2763
                rev := newestRev.
1449
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2764
            ]
3953
5d404f99092f #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3926
diff changeset
  2765
        ] ifFalse:[
5d404f99092f #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3926
diff changeset
  2766
            rev := revString
5d404f99092f #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3926
diff changeset
  2767
        ].
5d404f99092f #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3926
diff changeset
  2768
5d404f99092f #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3926
diff changeset
  2769
        revLabel := revString.
5d404f99092f #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3926
diff changeset
  2770
5d404f99092f #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3926
diff changeset
  2771
        rev notNil ifTrue:[
5d404f99092f #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3926
diff changeset
  2772
            revInfo := scmManager revisionLogOf:classToCompare fromRevision:rev toRevision:rev.
5d404f99092f #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3926
diff changeset
  2773
            revInfo notNil ifTrue:[
5d404f99092f #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3926
diff changeset
  2774
                revInfo := (revInfo at:#revisions) first.
5d404f99092f #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3926
diff changeset
  2775
                revAuthor := revInfo at:#author ifAbsent:[nil].
5d404f99092f #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3926
diff changeset
  2776
                revDate := revInfo at:#date ifAbsent:[nil].
3993
209a7d800ea0 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3992
diff changeset
  2777
                revDate isString ifTrue:[
3953
5d404f99092f #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3926
diff changeset
  2778
                    revDate := Timestamp readFrom:revDate onError:nil.
5d404f99092f #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3926
diff changeset
  2779
                ].
5d404f99092f #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3926
diff changeset
  2780
                revLabel := revString , ' ('.
5d404f99092f #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3926
diff changeset
  2781
                revDate notNil ifTrue:[
5d404f99092f #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3926
diff changeset
  2782
                    revLabel := revLabel , revDate asDate printString.
5d404f99092f #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3926
diff changeset
  2783
                ].
5d404f99092f #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3926
diff changeset
  2784
                revLabel := revLabel , ' by ', revAuthor.
5d404f99092f #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3926
diff changeset
  2785
                revLabel := revLabel , ')'.
5d404f99092f #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3926
diff changeset
  2786
            ].
1449
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2787
        ].
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2788
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2789
        self activityNotification:'comparing...'.
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2790
3896
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2791
        ChangeSet invalidChangeChunkError handle:[:ex |
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2792
            |answer|
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2793
4255
df635db10e0a #UI_ENHANCEMENT by mawalch
mawalch
parents: 4245
diff changeset
  2794
            answer := Dialog
df635db10e0a #UI_ENHANCEMENT by mawalch
mawalch
parents: 4245
diff changeset
  2795
                        confirm:(resources
3896
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2796
                            stringWithCRs:'An invalid change chunk was encountered when reading the source of %1.\This may be due to a currupted source file (or source file was modified/updated in the meantime, without recompilation).\\Proceed in debugger?'
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2797
                            with:aClass)
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2798
                        yesLabel:(resources string:'Debug')
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2799
                        noLabel:(resources string:'Cancel')
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2800
                        initialAnswer:false.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2801
            answer ifTrue:[ex reject].
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2802
            AbortOperationRequest raise.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2803
        ] do:[
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2804
            brwsr := (UserPreferences versionDiffViewerClass)
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2805
                  openOnClass:classToCompare
3953
5d404f99092f #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3926
diff changeset
  2806
                  labelA:('Repository: ' , revLabel)
3896
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2807
                  sourceA:comparedSource
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2808
                  labelB:('Current: (based on: ' , thisRevString , ')')
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2809
                  sourceB:currentSource
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2810
                  title:('Comparing ' , classToCompare name)
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2811
                  ifSame:[versionsAreTheSame := true].
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2812
        ].
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2813
        versionsAreTheSame ifFalse:[
4255
df635db10e0a #UI_ENHANCEMENT by mawalch
mawalch
parents: 4245
diff changeset
  2814
            brwsr classChangeSet
3896
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2815
                classBeingCompared:classToCompare;
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2816
                versionA:revString;
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2817
                versionB:thisRevString , 'mod'.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2818
        ].
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2819
    ].
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2820
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2821
    versionsAreTheSame ifTrue:[
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2822
        (classToCompare hasUnsavedChanges) ifTrue:[
4255
df635db10e0a #UI_ENHANCEMENT by mawalch
mawalch
parents: 4245
diff changeset
  2823
            (self confirm:(resources
3896
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2824
                            stringWithCRs:'Versions of %1 are identical.\\Remove entries from changeSet ?'
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2825
                            with:classToCompare name allBold)) ifTrue:[
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2826
                ChangeSet current condenseChangesForClass:classToCompare.
3579
d175474155c8 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  2827
            ].
3896
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2828
        ] ifFalse:[
4255
df635db10e0a #UI_ENHANCEMENT by mawalch
mawalch
parents: 4245
diff changeset
  2829
            self information:(resources string:'Versions are identical.').
3896
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2830
            ChangeSet current unrememberChangedClasses.
1449
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2831
        ].
3896
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2832
        revisionInClass isNil ifTrue:[
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2833
            (Dialog confirm:'Update (Fix) the classes Revision Info ?' withCRs)
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2834
            ifTrue:[
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2835
                |newString root|
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2836
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2837
                newString := scmManager updatedRevisionStringOf:aClass forRevision:rev with:aClass revisionString.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2838
                newString isNil ifTrue:[
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2839
                    root := scmManager getCVSROOTForModule:(aClass package upTo:$:).
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2840
                    root := scmManager repositoryTopDirectoryFromCVSRoot:root.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2841
                    newString := '$', 'Header: ',(root copyReplaceAll: $: with:$/ ),'/'
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2842
                                 ,(Smalltalk fileNameForClass:aClass),'.st,v ',rev,' '
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2843
                                 ,(Date today printStringFormat:'%y-%m-%d'),' '
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2844
                                 ,(Time now printStringFormat:'%h:%m:%s'),' '
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2845
                                 ,'+0000 '
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2846
                                 ,(OperatingSystem getLoginName),' Exp $'.
1449
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2847
                ].
3896
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2848
                scmManager updateVersionMethodOf:aClass for:newString.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  2849
            ]
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2850
        ].
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2851
    ].
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2852
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2853
    "
997
c55b39b6c7a0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2854
      self compareClassWithRepository:Array
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2855
    "
1497
061be9164dac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1483
diff changeset
  2856
2847
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  2857
    "Modified: / 24-07-2012 / 18:11:27 / cg"
4255
df635db10e0a #UI_ENHANCEMENT by mawalch
mawalch
parents: 4245
diff changeset
  2858
    "Modified (comment): / 04-09-2017 / 17:37:24 / mawalch"
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2859
!
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2860
4201
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2861
comparePackages:packages askForRevision:askForRevision
3536
cb8679184d3b Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3534
diff changeset
  2862
    "Compares code of given packages (loaded in the image) against a specific revision
cb8679184d3b Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3534
diff changeset
  2863
     and opens a diff browser on differences.
4201
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2864
     
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2865
     If `askForRevision` is true, then user is asked to specify to which revision to
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2866
     update. If `askForRevision` is false, then packages are updated to a 'newest'
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2867
     revision.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2868
     
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2869
     NOTE: Definition of `newest` revision may vary. For SCMs which allows for multiple
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2870
     heads, it is not clear which one it is. In that case, even if `askForRevision` is
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2871
     false, this method may result in user interaction, asking user to select which of the
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2872
     newest she wants."
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2873
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2874
    self comparePackages:packages askForRevision:askForRevision extensionsOnly:false
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2875
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2876
    "Created: / 04-04-2014 / 15:29:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2877
!
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2878
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2879
comparePackages:packages askForRevision:askForRevision extensionsOnly:extensionsOnly
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2880
    "Compares code of given packages (loaded in the image) against a specific revision
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2881
     and opens a diff browser on differences.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2882
     
3536
cb8679184d3b Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3534
diff changeset
  2883
     If `askForRevision` is true, then user is asked to specify to which revision to
cb8679184d3b Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3534
diff changeset
  2884
     update. If `askForRevision` is false, then packages are updated to a 'newest'
4201
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2885
     revision.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2886
     
3536
cb8679184d3b Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3534
diff changeset
  2887
     NOTE: Definition of `newest` revision may vary. For SCMs which allows for multiple
cb8679184d3b Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3534
diff changeset
  2888
     heads, it is not clear which one it is. In that case, even if `askForRevision` is
4201
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2889
     false, this method may result in user interaction, asking user to select which of the
3536
cb8679184d3b Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3534
diff changeset
  2890
     newest she wants."
cb8679184d3b Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3534
diff changeset
  2891
4201
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2892
    |string dateOrNil symbolicNameOrNil knownTags includeSubProjectsHolder
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2893
     packagesIn packagesCompared|
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2894
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2895
    packagesIn := packages value.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2896
    
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2897
    knownTags := self knownTagsInPackages:packagesIn.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2898
    
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2899
    includeSubProjectsHolder := true asValue.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2900
    string := self 
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2901
                askForPackageVersion:'Compare with version from date (%1) or tag (any other format) (empty for newest):'
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2902
                with:includeSubProjectsHolder 
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2903
                knownTags:knownTags
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2904
                into:[:dateOrNilArg :symbolicNameOrNilArg |
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2905
                    dateOrNil := dateOrNilArg.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2906
                    symbolicNameOrNil := symbolicNameOrNilArg.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2907
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2908
                    LastComparedTag := symbolicNameOrNil.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2909
                ].
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2910
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2911
    string isNil ifTrue:[^ self].
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2912
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2913
    packagesCompared := packagesIn.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2914
    includeSubProjectsHolder value ifTrue:[
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2915
        packagesCompared := Smalltalk allPackageIDs
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2916
                        select:[:eachPackage |
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2917
                            packagesIn contains:[:p | 
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2918
                                eachPackage = p 
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2919
                                or:[ (eachPackage startsWith:(p,'-'))
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2920
                                or:[ (eachPackage startsWith:(p,':')) ]]
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2921
                            ]
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2922
                        ]    
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2923
    ].
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2924
    
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2925
    packagesCompared value do:[:eachProject |
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2926
        dateOrNil notNil ifTrue:[
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2927
            self compareProject:eachProject withRepositoryVersionFrom:dateOrNil extensionsOnly:extensionsOnly
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2928
        ] ifFalse:[
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2929
            self compareProject:eachProject withRepositoryVersionTaggedAs:symbolicNameOrNil extensionsOnly:extensionsOnly
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2930
        ]
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2931
    ].
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2932
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2933
    "Created: / 04-04-2014 / 15:29:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2934
    "Modified: / 05-02-2017 / 04:24:39 / cg"
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2935
!
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2936
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2937
compareProject:aProject 
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2938
        repositoryVersionFrom:dateOrNilV1 orTag:symbolicNameOrNilV1 
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2939
        againstRepositoryVersionFrom:dateOrNilV2 orTag:symbolicNameOrNilV2
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2940
        extensionsOnly:extensionsOnly
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2941
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2942
    |diffSet|
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2943
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2944
    diffSet := self 
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2945
                    diffSetOfProject:aProject 
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2946
                    repositoryVersionFrom:dateOrNilV1 orTag:symbolicNameOrNilV1
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2947
                    againstRepositoryVersionFrom:dateOrNilV2 orTag:symbolicNameOrNilV2
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2948
                    extensionsOnly:extensionsOnly.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2949
    VersionDiffBrowser 
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2950
        openOnDiffSet:diffSet 
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2951
        labelA:(dateOrNilV1 ? symbolicNameOrNilV1) 
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2952
        labelB:(dateOrNilV2 ? symbolicNameOrNilV2) 
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2953
        title:('Differences of %1' bindWith:aProject)
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2954
        ignoreExtensions:true
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2955
        ignoreVersionMethods:true.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2956
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2957
    "Created: / 05-02-2017 / 04:21:15 / cg"
3536
cb8679184d3b Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3534
diff changeset
  2958
!
cb8679184d3b Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3534
diff changeset
  2959
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2960
compareProject:aProject withRepositoryVersionFrom:aDateOrNilForNewest
3926
b40b391c71b6 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 3919
diff changeset
  2961
    ^ self compareProject:aProject withRepositoryVersionFrom:aDateOrNilForNewest extensionsOnly:false
b40b391c71b6 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 3919
diff changeset
  2962
!
b40b391c71b6 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 3919
diff changeset
  2963
b40b391c71b6 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 3919
diff changeset
  2964
compareProject:aProject withRepositoryVersionFrom:aDateOrNilForNewest extensionsOnly:extensionsOnly
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2965
    |diffSet|
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2966
3926
b40b391c71b6 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 3919
diff changeset
  2967
    diffSet := self diffSetOfProject:aProject againstRepositoryVersionFrom:aDateOrNilForNewest extensionsOnly:extensionsOnly.
1875
f00eb53229ae first attempt with compare-project functionality
Claus Gittinger <cg@exept.de>
parents: 1864
diff changeset
  2968
    VersionDiffBrowser 
f00eb53229ae first attempt with compare-project functionality
Claus Gittinger <cg@exept.de>
parents: 1864
diff changeset
  2969
        openOnDiffSet:diffSet 
f00eb53229ae first attempt with compare-project functionality
Claus Gittinger <cg@exept.de>
parents: 1864
diff changeset
  2970
        labelA:'Repository' 
f00eb53229ae first attempt with compare-project functionality
Claus Gittinger <cg@exept.de>
parents: 1864
diff changeset
  2971
        labelB:'Image' 
2522
d32ade066c3f changed: #compareProject:withRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2487
diff changeset
  2972
        title:('Differences of %1' bindWith:aProject)
2949
83170e2244f3 changed:
Claus Gittinger <cg@exept.de>
parents: 2948
diff changeset
  2973
        ignoreExtensions:true
83170e2244f3 changed:
Claus Gittinger <cg@exept.de>
parents: 2948
diff changeset
  2974
        ignoreVersionMethods:true.
2522
d32ade066c3f changed: #compareProject:withRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2487
diff changeset
  2975
d32ade066c3f changed: #compareProject:withRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2487
diff changeset
  2976
    "Modified: / 12-09-2011 / 11:56:01 / cg"
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2977
!
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2978
2939
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  2979
compareProject:aProject withRepositoryVersionTaggedAs:aSymbolicName
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  2980
    |diffSet|
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  2981
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  2982
    diffSet := self diffSetOfProject:aProject againstRepositoryVersionTaggedAs:aSymbolicName.
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  2983
    VersionDiffBrowser 
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  2984
        openOnDiffSet:diffSet 
3926
b40b391c71b6 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 3919
diff changeset
  2985
        labelA:'Repository ("',(aSymbolicName?'newest'),'")' 
2939
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  2986
        labelB:'Image' 
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  2987
        title:('Differences of %1' bindWith:aProject)
2949
83170e2244f3 changed:
Claus Gittinger <cg@exept.de>
parents: 2948
diff changeset
  2988
        ignoreExtensions:true
83170e2244f3 changed:
Claus Gittinger <cg@exept.de>
parents: 2948
diff changeset
  2989
        ignoreVersionMethods:true.
2939
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  2990
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  2991
    "Modified: / 12-09-2011 / 11:56:01 / cg"
4201
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2992
    "Modified (format): / 04-02-2017 / 18:54:02 / cg"
2939
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  2993
!
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  2994
4201
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2995
compareProject:aProject withRepositoryVersionTaggedAs:aTagOrNil extensionsOnly:extensionsOnly
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2996
    "if aTagOrNil is nil, compare against the newest version in the repositry"
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  2997
    
4132
205c322f6daf #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4080
diff changeset
  2998
    |diffSet|
205c322f6daf #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4080
diff changeset
  2999
4201
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3000
    diffSet := self diffSetOfProject:aProject againstRepositoryVersionTaggedAs:aTagOrNil extensionsOnly:extensionsOnly.
4132
205c322f6daf #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4080
diff changeset
  3001
    VersionDiffBrowser 
205c322f6daf #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4080
diff changeset
  3002
        openOnDiffSet:diffSet 
205c322f6daf #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4080
diff changeset
  3003
        labelA:'Repository' 
205c322f6daf #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4080
diff changeset
  3004
        labelB:'Image' 
205c322f6daf #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4080
diff changeset
  3005
        title:('Differences of %1' bindWith:aProject)
205c322f6daf #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4080
diff changeset
  3006
        ignoreExtensions:true
205c322f6daf #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4080
diff changeset
  3007
        ignoreVersionMethods:true.
205c322f6daf #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4080
diff changeset
  3008
4201
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3009
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3010
    "
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3011
     CVSSourceCodeManager utilities
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3012
            compareProject:'stx:libbasic2'
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3013
            withRepositoryVersionTaggedAs:nil 
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3014
            extensionsOnly:false.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3015
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3016
     CVSSourceCodeManager utilities
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3017
            compareProject:'stx:libbasic2'
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3018
            withRepositoryVersionTaggedAs:'expecco_2_10_0' 
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3019
            extensionsOnly:false.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3020
    "
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3021
4132
205c322f6daf #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4080
diff changeset
  3022
    "Created: / 12-11-2016 / 03:39:48 / cg"
4201
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3023
    "Modified (comment): / 04-02-2017 / 18:46:49 / cg"
4132
205c322f6daf #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4080
diff changeset
  3024
!
205c322f6daf #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4080
diff changeset
  3025
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3026
compareProjectWithRepository:aProject
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3027
    ^ self compareProject:aProject withRepositoryVersionFrom:nil
1875
f00eb53229ae first attempt with compare-project functionality
Claus Gittinger <cg@exept.de>
parents: 1864
diff changeset
  3028
!
f00eb53229ae first attempt with compare-project functionality
Claus Gittinger <cg@exept.de>
parents: 1864
diff changeset
  3029
4201
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3030
compareTwoPackageVersions:packages
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3031
    "Compares two versions of given packages."
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3032
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3033
    self compareTwoPackageVersions:packages extensionsOnly:false
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3034
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3035
    "Created: / 04-02-2017 / 17:33:02 / cg"
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3036
!
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3037
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3038
compareTwoPackageVersions:packagesIn extensionsOnly:extensionsOnly 
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3039
    "Compares two versions of given packages
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3040
     and opens a diff browser on differences."
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3041
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3042
    |string includeSubProjectsHolder knownTags
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3043
     dateOrNilV1 dateOrNilV2
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3044
     symbolicNameOrNilV1 symbolicNameOrNilV2
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3045
     packagesCompared|
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3046
    
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3047
    knownTags := self knownTagsInPackages:packagesIn first.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3048
    includeSubProjectsHolder := true asValue.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3049
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3050
    string := self 
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3051
                askForPackageVersion:'First version''s date (%1) or tag (any other format):'
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3052
                with:includeSubProjectsHolder 
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3053
                knownTags:knownTags
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3054
                into:[:dateOrNilArg :symbolicNameOrNilArg |
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3055
                    dateOrNilV1 := dateOrNilArg.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3056
                    symbolicNameOrNilV1 := symbolicNameOrNilArg.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3057
                ].
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3058
    string isNil ifTrue:[^ self].
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3059
    
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3060
    string := self 
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3061
                askForPackageVersion:'Second version''s date (%1) or tag (any other format):'
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3062
                with:nil 
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3063
                knownTags:knownTags
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3064
                into:[:dateOrNilArg :symbolicNameOrNilArg |
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3065
                    dateOrNilV2 := dateOrNilArg.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3066
                    symbolicNameOrNilV2 := symbolicNameOrNilArg.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3067
                ].
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3068
    string isNil ifTrue:[^ self].
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3069
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3070
    LastComparedTag := symbolicNameOrNilV1.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3071
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3072
    packagesCompared := packagesIn.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3073
    includeSubProjectsHolder value ifTrue:[
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3074
        packagesCompared := 
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3075
            Smalltalk allPackageIDs
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3076
                select:[:eachPackage |
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3077
                    packagesIn contains:[:p | 
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3078
                        eachPackage = p 
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3079
                        or:[ (eachPackage startsWith:(p,'-'))
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3080
                        or:[ (eachPackage startsWith:(p,':')) ]]
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3081
                    ]
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3082
                ]    
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3083
    ].
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3084
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3085
    packagesCompared value do:[:eachProject |
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3086
        self 
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3087
            compareProject:eachProject 
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3088
            repositoryVersionFrom:dateOrNilV1 orTag:symbolicNameOrNilV1 
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3089
            againstRepositoryVersionFrom:dateOrNilV2 orTag:symbolicNameOrNilV2
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3090
            extensionsOnly:extensionsOnly
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3091
    ].
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3092
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3093
    "
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3094
     CVSSourceCodeManager utilities
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3095
        compareTwoPackageVersions:#('stx:libbasic') extensionsOnly:true   
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3096
    "
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3097
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3098
    "Created: / 04-02-2017 / 17:51:09 / cg"
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3099
    "Modified: / 05-02-2017 / 04:23:07 / cg"
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3100
!
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3101
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3102
createSourceContainerForClass:aClass
2651
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3103
    "let user specify the source-repository values for aClass.
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3104
     Return false, if failed."
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3105
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3106
    ^ self 
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3107
        createSourceContainerForClass:aClass
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3108
        usingManager:(self sourceCodeManagerFor:aClass).
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3109
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3110
    "Modified: / 21-12-2011 / 18:31:49 / cg"
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3111
!
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3112
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3113
createSourceContainerForClass:aClass usingManager:aManager
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3114
    "let user specify the source-repository values for aClass.
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3115
     Return false, if failed."
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3116
3992
bf6479f38b32 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3117
    ^ self
bf6479f38b32 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3118
        createSourceContainerForClass:aClass usingManager:aManager
bf6479f38b32 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3119
        confirmNewContainer:confirmNewFiles   
bf6479f38b32 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3120
!
bf6479f38b32 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3121
bf6479f38b32 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3122
createSourceContainerForClass:aClass usingManager:aManager confirmNewContainer:confirmNewContainer
bf6479f38b32 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3123
    "let user specify the source-repository values for aClass.
bf6479f38b32 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3124
     Return false, if failed."
bf6479f38b32 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3125
2651
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3126
    aManager isNil ifTrue:[^ false].
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3127
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3128
    ^ self 
2651
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3129
        defineSourceContainerForClass:aClass
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3130
        usingManager:aManager
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3131
        title:(resources string:'Repository information for %1' with:aClass name)
2651
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3132
        text:(resources string:'Create new %1-repository container for ''%2''' 
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3133
                            with:aManager managerTypeName
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3134
                            with:aClass name allBold)
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3135
        createDirectories:true
3992
bf6479f38b32 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3136
        createContainer:true
bf6479f38b32 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3137
        confirmNewContainer:confirmNewContainer.
2651
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3138
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3139
    "Created: / 21-12-2011 / 18:31:23 / cg"
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3140
!
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3141
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3142
defineSourceContainerForClass:aClass title:title text:boxText createDirectories:createDirs createContainer:createContainer
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3143
    "let user specify the source-repository values for aClass"
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3144
2651
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3145
    ^ self
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3146
        defineSourceContainerForClass:aClass 
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3147
        usingManager:(self sourceCodeManagerFor:aClass)
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3148
        title:title 
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3149
        text:boxText 
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3150
        createDirectories:createDirs 
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3151
        createContainer:createContainer
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3152
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3153
    "Modified: / 21-12-2011 / 18:34:44 / cg"
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3154
!
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3155
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3156
defineSourceContainerForClass:aClass usingManager:mgr title:title text:boxText createDirectories:createDirs createContainer:createContainer
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3157
    "let user specify the source-repository values for aClass"
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3158
3992
bf6479f38b32 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3159
    ^ self
bf6479f38b32 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3160
        defineSourceContainerForClass:aClass usingManager:mgr title:title text:boxText 
bf6479f38b32 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3161
        createDirectories:createDirs createContainer:createContainer
bf6479f38b32 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3162
        confirmNewContainer:confirmNewFiles
bf6479f38b32 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3163
!
bf6479f38b32 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3164
bf6479f38b32 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3165
defineSourceContainerForClass:aClass usingManager:mgr title:title text:boxText 
bf6479f38b32 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3166
    createDirectories:createDirs createContainer:createContainer
bf6479f38b32 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3167
    confirmNewContainer:confirmNewContainer
bf6479f38b32 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3168
    "let user specify the source-repository values for aClass"
bf6479f38b32 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3169
2651
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3170
    |className
2063
502166975e05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  3171
     "oldModule oldPackage" oldFileName
1533
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  3172
     module directory fileName nameSpace nameSpacePrefix
2651
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3173
     info project nm creatingNew msg 
2948
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3174
     answer doCheckinWithoutAsking forceCheckIn rslt note
3276
e6902cec8b2f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3272
diff changeset
  3175
     requiredPackage classPackage|
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3176
2651
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3177
    mgr isNil ifTrue:[^  false].
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3178
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3179
    aClass isLoaded ifFalse:[
1076
4adaffbd7ab0 upper-case
Claus Gittinger <cg@exept.de>
parents: 1070
diff changeset
  3180
        self warn:(resources string:'Please load the %1-class first' with:aClass name).
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3181
        ^ false.
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3182
    ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3183
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3184
    className := aClass name.
3276
e6902cec8b2f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3272
diff changeset
  3185
    classPackage := aClass package.
e6902cec8b2f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3272
diff changeset
  3186
    classPackage ~= PackageId noProjectID ifTrue:[
e6902cec8b2f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3272
diff changeset
  3187
        module := classPackage asPackageId module.
e6902cec8b2f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3272
diff changeset
  3188
        directory := classPackage asPackageId directory.
1533
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  3189
    ] ifFalse:[
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  3190
        "/
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  3191
        "/ defaults, if nothing at all is known
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  3192
        "/
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  3193
        (module := LastModule) isNil ifTrue:[
3919
1373d06bbd50 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3906
diff changeset
  3194
            module := (UserPreferences current usersModuleName "OperatingSystem getLoginName").
1533
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  3195
        ].
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  3196
        (directory := LastPackage) isNil ifTrue:[
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  3197
            directory := 'private'.
3153
c2bca6dbe3a7 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3146
diff changeset
  3198
        ]. 
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3199
    ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3200
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3201
    "/
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3202
    "/ try to extract some useful defaults from the current project
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3203
    "/
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3204
    (Project notNil and:[(project := Project current) notNil]) ifTrue:[
1533
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  3205
        directory isNil ifTrue:[
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3206
            (nm := project repositoryDirectory) isNil ifTrue:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3207
                nm := project name
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3208
            ].
1533
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  3209
            directory := nm.
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3210
        ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3211
        module isNil ifTrue:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3212
            (nm := project repositoryModule) notNil ifTrue:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3213
                module := nm
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3214
            ]
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3215
        ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3216
    ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3217
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3218
    "/
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3219
    "/ ask the sourceCodeManager if it knows anything about that class
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3220
    "/ if so, take that as a default.
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3221
    "/
1189
fdc5e747c184 refactored check for a valid sourceCodeManager into one place
Claus Gittinger <cg@exept.de>
parents: 1185
diff changeset
  3222
    info := mgr sourceInfoOfClass:aClass.
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3223
    info notNil ifTrue:[
1368
20cde03a3cd6 defineSource - fixed package & module extraction
martin
parents: 1347
diff changeset
  3224
        true "module ~= LastModule" ifTrue:[
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3225
            (info includesKey:#module) ifTrue:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3226
                module := (info at:#module).
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3227
            ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3228
        ].
1401
102c0c12b66b default package changed
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  3229
"/        true "package ~= LastPackage" ifTrue:[
102c0c12b66b default package changed
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  3230
"/            (info includesKey:#directory) ifTrue:[
102c0c12b66b default package changed
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  3231
"/                package := (info at:#directory).
102c0c12b66b default package changed
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  3232
"/            ].
102c0c12b66b default package changed
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  3233
"/        ].
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3234
        fileName := mgr containerFromSourceInfo:info.
4007
ffa3939cd5af #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3993
diff changeset
  3235
        fileName isNil ifTrue:[ fileName := aClass classFilename ].
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3236
        (nameSpace := aClass nameSpace) ~~ Smalltalk ifTrue:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3237
            nameSpacePrefix := nameSpace name , '::'.
3259
5eb58e78257e refactored
Claus Gittinger <cg@exept.de>
parents: 3227
diff changeset
  3238
            fileName := fileName withoutPrefix:nameSpacePrefix.
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3239
        ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3240
"/        (info includesKey:#fileName) ifTrue:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3241
"/            fileName := (info at:#fileName).
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3242
"/        ] ifFalse:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3243
"/            (info includesKey:#expectedFileName) ifTrue:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3244
"/                fileName := (info at:#expectedFileName).
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3245
"/            ] ifFalse:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3246
"/                (info includesKey:#classFileNameBase) ifTrue:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3247
"/                    fileName := (info at:#classFileNameBase) , '.st'.
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3248
"/                ]
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3249
"/            ]
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3250
"/        ]
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3251
    ].
4058
27c8b7295fb3 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4037
diff changeset
  3252
    directory isNil ifTrue:[
27c8b7295fb3 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4037
diff changeset
  3253
        Dialog information:('Using %1 as last package-folder' bindWith:LastPackage).
3514
a35b833ed992 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
  3254
        directory := LastPackage.
a35b833ed992 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
  3255
    ].
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3256
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3257
    fileName isNil ifTrue:[
1338
bad5961fbff1 fileNameForClass:
Claus Gittinger <cg@exept.de>
parents: 1323
diff changeset
  3258
        fileName := (Smalltalk fileNameForClass:aClass) , '.st'.
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3259
    ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3260
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3261
    OperatingSystem isMSDOSlike ifTrue:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3262
        module replaceAll:$\ with:$/.
1533
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  3263
        directory replaceAll:$\ with:$/.
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3264
    ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3265
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3266
    "/
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3267
    "/ check for conflicts (i.e. if such a container already exists) ...
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3268
    "/
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3269
    doCheckinWithoutAsking := false.
1831
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  3270
"/false ifTrue:[
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  3271
"/    (mgr checkForExistingContainer:fileName inModule:module directory:directory) ifTrue:[
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  3272
"/        answer := Dialog confirmWithCancel:(resources 
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  3273
"/                            string:'About to change the source container.
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  3274
"/
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  3275
"/Notice: there is a container for %1 in:
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  3276
"/
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  3277
"/    %2 / %3 / %4
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  3278
"/
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  3279
"/Do you want to change it or check right into that container ?'
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  3280
"/                            with:className
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  3281
"/                            with:module
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  3282
"/                            with:directory
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  3283
"/                            with:fileName)
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  3284
"/                labels:(resources array:#('Cancel' 'Check in' 'Change')).
3433
eee3079d18d3 AbortSignal -> AbortOperationRequest
Stefan Vogel <sv@exept.de>
parents: 3425
diff changeset
  3285
"/        answer isNil ifTrue:[AbortOperationRequest raise].
1831
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  3286
"/        answer ifTrue:[
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  3287
"/            doCheckinWithoutAsking := false.
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  3288
"/            oldModule := module.
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  3289
"/            oldPackage := directory.
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  3290
"/            oldFileName := fileName
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  3291
"/        ] ifFalse:[
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  3292
"/            doCheckinWithoutAsking := true.
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  3293
"/            creatingNew := false.
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  3294
"/        ].
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  3295
"/    ].
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  3296
"/].
2688
fa8075458983 changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  3297
    mgr isContainerBased ifTrue:[
fa8075458983 changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  3298
        doCheckinWithoutAsking ifFalse:[
fa8075458983 changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  3299
            "/
fa8075458983 changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  3300
            "/ open a dialog for this
fa8075458983 changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  3301
            "/
fa8075458983 changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  3302
            (mgr checkForExistingContainer:fileName inModule:module directory:directory) ifFalse:[
fa8075458983 changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  3303
                note := 'Notice: class seems to have no container yet.'.
fa8075458983 changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  3304
                creatingNew := true.
fa8075458983 changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  3305
            ] ifTrue:[
fa8075458983 changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  3306
                creatingNew := false.
fa8075458983 changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  3307
            ].
3992
bf6479f38b32 #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3974
diff changeset
  3308
            confirmNewContainer ifTrue:[
2847
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  3309
                rslt := self 
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  3310
                            askForContainer:boxText title:title note:note
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  3311
                            initialModule:module initialPackage:directory initialFileName:fileName
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  3312
                            forNewContainer:true.        
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  3313
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  3314
                rslt isNil ifTrue:[
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  3315
                    ^ false
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  3316
                ].
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  3317
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  3318
                module := rslt at:#module.
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  3319
                directory := rslt at:#package.
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  3320
                fileName := rslt at:#fileName.
4058
27c8b7295fb3 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4037
diff changeset
  3321
                (module isEmptyOrNil or:[fileName isEmptyOrNil]) ifTrue:[
3514
a35b833ed992 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
  3322
                    ^ false
a35b833ed992 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
  3323
                ].
4058
27c8b7295fb3 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4037
diff changeset
  3324
                (directory isEmptyOrNil) ifTrue:[
27c8b7295fb3 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4037
diff changeset
  3325
                    "/ only one special case allowed - the module-folder description itself.
27c8b7295fb3 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4037
diff changeset
  3326
                    aClass name = module ifFalse:[^ false].
27c8b7295fb3 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4037
diff changeset
  3327
                ]
2847
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  3328
            ]
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3329
        ].
2688
fa8075458983 changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  3330
        (fileName endsWith:',v') ifTrue:[
3227
bcaec3eb2d97 Changed usage of deprecated #copyWithoutLast: to #copyButLast:
Stefan Vogel <sv@exept.de>
parents: 3202
diff changeset
  3331
            fileName := fileName copyButLast:2
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3332
        ].
2688
fa8075458983 changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  3333
        (fileName endsWith:'.st') ifFalse:[
fa8075458983 changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  3334
            fileName := fileName , '.st'
fa8075458983 changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  3335
        ].
fa8075458983 changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  3336
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3337
    ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3338
952
c75976ac7b7f when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  3339
    "/ we require the packageID to be <module>:<container-dir>
c75976ac7b7f when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  3340
    "/ check for this ...
c75976ac7b7f when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  3341
1533
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  3342
    requiredPackage := ((module ? '') , ':' , (directory ? '')) asSymbol.
952
c75976ac7b7f when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  3343
    requiredPackage ~= aClass package ifTrue:[
c75976ac7b7f when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  3344
"/        doCheckinWithoutAsking ifFalse:[
c75976ac7b7f when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  3345
"/            (self confirm:'Change the classes packageID to: ''', requiredPackage , ''' ?')
c75976ac7b7f when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  3346
"/            ifFalse:[
c75976ac7b7f when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  3347
"/                ^ false
c75976ac7b7f when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  3348
"/            ]
c75976ac7b7f when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  3349
"/        ].
1077
6b1bcfd27521 renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  3350
        aClass instAndClassSelectorsAndMethodsDo:[:sel :mthd | mthd setPackage:requiredPackage].
952
c75976ac7b7f when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  3351
        aClass package:requiredPackage.
c75976ac7b7f when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  3352
    ].
c75976ac7b7f when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  3353
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3354
    info := aClass revisionInfo.
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3355
    info notNil ifTrue:[
2063
502166975e05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  3356
        (info repositoryPathName isNil) ifTrue:[
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3357
            info := nil
2063
502166975e05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  3358
        ].
502166975e05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  3359
"/        (info includesKey:#repositoryPathName) ifFalse:[
502166975e05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  3360
"/            info := nil
502166975e05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  3361
"/        ]
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3362
    ].
2175
50349cb87bf4 changed:
fm
parents: 2161
diff changeset
  3363
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3364
    info isNil ifTrue:[
1004
1bd564960810 dont ask if a version method should be created - just do it.
Claus Gittinger <cg@exept.de>
parents: 1000
diff changeset
  3365
        true "doCheckinWithoutAsking" ifFalse:[
979
2374556f8a09 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 977
diff changeset
  3366
            answer := Dialog 
2374556f8a09 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 977
diff changeset
  3367
                 confirmWithCancel:(resources string:'%1 does not have any (usable) revision info (#version method)\\Shall I create one ?' with:className) withCRs
1076
4adaffbd7ab0 upper-case
Claus Gittinger <cg@exept.de>
parents: 1070
diff changeset
  3368
                 labels:(resources array:#( 'Cancel' 'No' 'Yes')).
979
2374556f8a09 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 977
diff changeset
  3369
            answer isNil ifTrue:[^ false].
2374556f8a09 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 977
diff changeset
  3370
        ] ifTrue:[
2374556f8a09 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 977
diff changeset
  3371
            answer := true.
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3372
        ].
979
2374556f8a09 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 977
diff changeset
  3373
        answer ifTrue:[
2637
dbfb2ef410bd changed:
Claus Gittinger <cg@exept.de>
parents: 2605
diff changeset
  3374
            mgr
2651
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3375
                updateVersionMethodOf:aClass 
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3376
                for:(mgr initialRevisionStringFor:aClass 
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3377
                         inModule:module 
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3378
                         directory:directory 
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3379
                         container:fileName).
979
2374556f8a09 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 977
diff changeset
  3380
        ].
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3381
    ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3382
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
  3383
    (self checkForExistingModule:module usingManager:mgr allowCreate:(createDirs or:[creatingNew]))
2651
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3384
        ifFalse:[^ false].
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3385
    LastModule := module.
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3386
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
  3387
    (self checkForExistingModule:module directory:directory usingManager:mgr allowCreate:(createDirs or:[creatingNew]))
2651
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3388
        ifFalse:[^ false].
1533
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  3389
    LastPackage := directory.
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3390
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3391
    "/
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3392
    "/ check for the container itself
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3393
    "/
2651
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3394
    (mgr isContainerBased not
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3395
    or:[ mgr checkForExistingContainer:fileName inModule:module directory:directory ]) ifTrue:[
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3396
"/            (oldModule notNil
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3397
"/            and:[(oldModule ~= module)
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3398
"/                 or:[oldPackage ~= package
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3399
"/                 or:[oldFileName ~= fileName]]])
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3400
"/            ifFalse:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3401
"/                self warn:(resources string:'no change').
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3402
"/                ^ false.
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3403
"/            ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3404
2651
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3405
        mgr isContainerBased ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3406
            creatingNew ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3407
                self warn:(resources string:'Container for %1 already exists in %2/%3.' with:fileName with:module with:directory) withCRs.
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3408
            ].
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3409
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3410
            doCheckinWithoutAsking ifFalse:[
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3411
                (Dialog 
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3412
                    confirm:(resources string:'check %1 into the existing container
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3413
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3414
    %2 / %3 / %4  ?'
2651
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3415
                                    with:className
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3416
                                    with:module 
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3417
                                    with:directory 
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3418
                                    with:fileName) withCRs
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3419
                    noLabel:'Cancel') 
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3420
                ifFalse:[
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3421
                    ^ false.
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3422
                ].  
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3423
            ].  
2651
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3424
        ].
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3425
2637
dbfb2ef410bd changed:
Claus Gittinger <cg@exept.de>
parents: 2605
diff changeset
  3426
        mgr 
2651
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3427
            updateVersionMethodOf:aClass 
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3428
            for:('$' , 'Header' , '$'). "/ concatenated to avoid RCS-expansion
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3429
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3430
        oldFileName notNil ifTrue:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3431
            msg := ('forced checkin / source container change from ' , oldFileName).
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3432
        ] ifFalse:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3433
            msg := 'defined source container'
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3434
        ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3435
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3436
        (forceCheckIn := doCheckinWithoutAsking) ifFalse:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3437
            (mgr
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3438
                checkinClass:aClass 
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3439
                fileName:fileName 
1533
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  3440
                directory:directory 
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3441
                module:module 
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3442
                logMessage:msg)
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3443
            ifFalse:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3444
                doCheckinWithoutAsking ifFalse:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3445
                    (Dialog 
1076
4adaffbd7ab0 upper-case
Claus Gittinger <cg@exept.de>
parents: 1070
diff changeset
  3446
                        confirm:'No easy merge seems possible; force checkin (no merge) ?'
4adaffbd7ab0 upper-case
Claus Gittinger <cg@exept.de>
parents: 1070
diff changeset
  3447
                        noLabel:'Cancel') 
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3448
                    ifFalse:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3449
                        ^ false.
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3450
                    ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3451
                ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3452
                forceCheckIn := true.
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3453
            ]
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3454
        ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3455
        forceCheckIn ifTrue:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3456
            (mgr
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3457
                checkinClass:aClass 
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3458
                fileName:fileName 
1533
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  3459
                directory:directory 
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3460
                module:module 
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3461
                logMessage:msg
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3462
                force:true)
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3463
            ifFalse:[
1076
4adaffbd7ab0 upper-case
Claus Gittinger <cg@exept.de>
parents: 1070
diff changeset
  3464
                self warn:(resources string:'Failed to check into existing container.').
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3465
                ^ false.
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3466
            ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3467
        ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3468
        ^ true
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3469
    ] ifFalse:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3470
        (createContainer or:[creatingNew]) ifFalse:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3471
            (Dialog
1076
4adaffbd7ab0 upper-case
Claus Gittinger <cg@exept.de>
parents: 1070
diff changeset
  3472
                 confirm:(resources string:'No container exists for %1 in %2/%3\\create ?' 
1533
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  3473
                                      with:fileName with:module with:directory) withCRs
1076
4adaffbd7ab0 upper-case
Claus Gittinger <cg@exept.de>
parents: 1070
diff changeset
  3474
                 noLabel:'Cancel') ifFalse:[
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3475
                ^ false
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3476
            ]
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3477
        ]
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3478
    ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3479
1882
8b3a4c2a2c2a when creating a new container, set the package of all methods.
Claus Gittinger <cg@exept.de>
parents: 1879
diff changeset
  3480
    aClass instAndClassSelectorsAndMethodsDo:[:sel :mthd | mthd setPackage:requiredPackage].
8b3a4c2a2c2a when creating a new container, set the package of all methods.
Claus Gittinger <cg@exept.de>
parents: 1879
diff changeset
  3481
    aClass package:requiredPackage.
1913
d87c1ed5bf1f oops - halt
Claus Gittinger <cg@exept.de>
parents: 1911
diff changeset
  3482
3155
9c22d8b4315b class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3153
diff changeset
  3483
    [ mgr
2651
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3484
        createContainerFor:aClass
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3485
        inModule:module
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3486
        package:directory
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3487
        container:fileName
3155
9c22d8b4315b class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3153
diff changeset
  3488
    ] whileFalse:[
9c22d8b4315b class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3153
diff changeset
  3489
        (Dialog confirm:(resources stringWithCRs:'Failed to create container.\(fix your setup then retry, or cancel)\\Retry?') yesLabel:'Retry') ifFalse:[
9c22d8b4315b class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3153
diff changeset
  3490
            ^ false.
9c22d8b4315b class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3153
diff changeset
  3491
        ].
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3492
    ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3493
    ^ true
1533
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  3494
2651
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  3495
    "Created: / 21-12-2011 / 18:34:02 / cg"
4007
ffa3939cd5af #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3993
diff changeset
  3496
    "Modified: / 30-04-2016 / 11:58:11 / cg"
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3497
!
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  3498
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3499
diffSetOfProject:aProject againstRepositoryVersionFrom:aDateOrNilForNewest
3926
b40b391c71b6 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 3919
diff changeset
  3500
    ^ self diffSetOfProject:aProject againstRepositoryVersionFrom:aDateOrNilForNewest extensionsOnly:false
b40b391c71b6 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 3919
diff changeset
  3501
!
b40b391c71b6 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 3919
diff changeset
  3502
b40b391c71b6 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 3919
diff changeset
  3503
diffSetOfProject:aProject againstRepositoryVersionFrom:aDateOrNilForNewest extensionsOnly:extensionsOnly
2939
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  3504
    ^ self
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  3505
        diffSetOfProject:aProject 
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  3506
        againstRepositoryVersionFrom:aDateOrNilForNewest
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  3507
        orTag:nil
3926
b40b391c71b6 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 3919
diff changeset
  3508
        extensionsOnly:extensionsOnly
2939
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  3509
!
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  3510
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  3511
diffSetOfProject:aProject againstRepositoryVersionFrom:aDateOrNilForNewest orTag:aTagOrNil
2950
cd6dc0f1d994 comment/format in: #diffSetOfProject:againstRepositoryVersionFrom:orTag:
Claus Gittinger <cg@exept.de>
parents: 2949
diff changeset
  3512
    "return a diffset against either the newest (head), or the version at a particular date,
cd6dc0f1d994 comment/format in: #diffSetOfProject:againstRepositoryVersionFrom:orTag:
Claus Gittinger <cg@exept.de>
parents: 2949
diff changeset
  3513
     or a the version with a particular tag."
2939
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  3514
3926
b40b391c71b6 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 3919
diff changeset
  3515
    ^ self
b40b391c71b6 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 3919
diff changeset
  3516
        diffSetOfProject:aProject 
b40b391c71b6 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 3919
diff changeset
  3517
        againstRepositoryVersionFrom:aDateOrNilForNewest 
b40b391c71b6 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 3919
diff changeset
  3518
        orTag:aTagOrNil 
b40b391c71b6 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 3919
diff changeset
  3519
        extensionsOnly:false
b40b391c71b6 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 3919
diff changeset
  3520
b40b391c71b6 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 3919
diff changeset
  3521
    "Modified: / 01-11-2010 / 21:02:52 / cg"
b40b391c71b6 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 3919
diff changeset
  3522
!
b40b391c71b6 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 3919
diff changeset
  3523
b40b391c71b6 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 3919
diff changeset
  3524
diffSetOfProject:aProject againstRepositoryVersionFrom:aDateOrNilForNewest orTag:aTagOrNil extensionsOnly:extensionsOnly
4201
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3525
    "return a diffset against the version at a particular date (if not nil),
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3526
     or a the version with a particular tag (if not nil),
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3527
     or the newest (head) (if both are nil)."
3926
b40b391c71b6 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 3919
diff changeset
  3528
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3529
    |classesInImage filesInImage module directory perProjectInfo 
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3530
     classesNotInRepository filesNotInImage classesDeletedInRepository
2948
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3531
     classesModifiedInImage classesNotReallyModified classesReallyModified classesNewerInRepository 
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3532
     classesAddedInImage extensionMethods extensionsInImage extensionsInRepository extensionDiffs
2948
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3533
     box doCleanup diffSet def autoloadedFilesNotInImage 
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3534
     autoloadedClassesInImage autoloadedFilesInImage versionMethodsAndDoitsRejected|
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3535
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3536
    module := aProject asPackageId module.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3537
    directory := aProject asPackageId directory.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3538
2939
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  3539
    (aDateOrNilForNewest isNil and:[ aTagOrNil notNil ]) ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  3540
        perProjectInfo := SourceCodeManager revisionsInModule:module directory:directory taggedAs:aTagOrNil.
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  3541
    ] ifFalse:[
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  3542
        perProjectInfo := SourceCodeManager revisionsInModule:module directory:directory fromDate:aDateOrNilForNewest.
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  3543
    ].
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3544
    perProjectInfo := perProjectInfo ? #().
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3545
    perProjectInfo := perProjectInfo select:[:info | info key asFilename hasSuffix:'st'].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3546
    perProjectInfo := Dictionary withAssociations:perProjectInfo.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3547
2948
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3548
    "/ to ignore version_xxx methods
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3549
    versionMethodsAndDoitsRejected := 
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3550
        [:aChangeSet | 
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3551
            aChangeSet reject:[:chg | 
2949
83170e2244f3 changed:
Claus Gittinger <cg@exept.de>
parents: 2948
diff changeset
  3552
                false "chg isMethodChangeForVersionMethod" 
83170e2244f3 changed:
Claus Gittinger <cg@exept.de>
parents: 2948
diff changeset
  3553
                or:[false "chg isMethodChangeForExtensionsVersionMethod"
2948
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3554
                or:[chg isDoIt]]]
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3555
        ].
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3556
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3557
    classesInImage := Smalltalk allClassesInPackage:aProject.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3558
    autoloadedClassesInImage := classesInImage reject:[:cls | cls isLoaded].
2903
482f5086773d changed: #diffSetOfProject:againstRepositoryVersionFrom:
Stefan Vogel <sv@exept.de>
parents: 2864
diff changeset
  3559
    classesInImage := classesInImage select:[:cls | cls isLoaded and:[cls isPrivate not]].
482f5086773d changed: #diffSetOfProject:againstRepositoryVersionFrom:
Stefan Vogel <sv@exept.de>
parents: 2864
diff changeset
  3560
    filesInImage := classesInImage collect:[:cls | cls classBaseFilename] as:Set.
482f5086773d changed: #diffSetOfProject:againstRepositoryVersionFrom:
Stefan Vogel <sv@exept.de>
parents: 2864
diff changeset
  3561
    autoloadedFilesInImage := autoloadedClassesInImage collect:[:cls | cls classBaseFilename] as:Set.
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3562
    "/ any differences ?
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3563
    classesNotInRepository := classesInImage reject:[:cls | (perProjectInfo includesKey:cls classBaseFilename)].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3564
    classesDeletedInRepository := classesInImage select:[:cls | (perProjectInfo at:cls classBaseFilename ifAbsent:nil) == #deleted].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3565
    perProjectInfo := perProjectInfo reject:[:v | v == #deleted].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3566
    filesNotInImage := perProjectInfo keys reject:[:file | (filesInImage includes:file)].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3567
    filesNotInImage := filesNotInImage reject:[:file | (autoloadedFilesInImage includes:file)].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3568
    filesNotInImage remove:'extensions.st' ifAbsent:[].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3569
4338
dd140314af79 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  3570
    "/ if comparing against the newest, only look for changed stuff
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3571
    classesModifiedInImage := classesInImage select:[:cls | ChangeSet current includesChangeForClassOrMetaclass:cls].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3572
    classesModifiedInImage := classesModifiedInImage \ classesNotInRepository.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3573
2948
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3574
    classesNewerInRepository := classesInImage 
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3575
                                    select:[:cls | 
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3576
                                        |v clsRevision|
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3577
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3578
                                        v := (perProjectInfo at:cls classBaseFilename ifAbsent:nil).
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3579
                                        v notNil 
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3580
                                            and:[ cls isLoaded 
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3581
                                            and:[ (clsRevision := cls revision) notNil 
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3582
                                            and:[ v > clsRevision ]]]
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3583
                                    ].
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3584
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3585
    "/ stupid: as we do not have any revision information for extensions (sigh);
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3586
    "/ we must checkout and look at the extension.st contents, to see if it has changed.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3587
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3588
    extensionMethods := Smalltalk allExtensionsForPackage:aProject.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3589
    extensionsInImage := ChangeSet forExistingMethods:extensionMethods.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3590
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3591
    [
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3592
        |s extensionsRevision|
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3593
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3594
        extensionsRevision := perProjectInfo at:'extensions.st' ifAbsent:#newest.
2948
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3595
        [
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3596
            s := SourceCodeManager
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3597
                    streamForClass:nil fileName:'extensions.st' revision:extensionsRevision 
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3598
                    directory:directory module:module cache:true.
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3599
            s notNil ifTrue:[
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3600
                extensionsInRepository := ChangeSet fromStream:s.
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3601
            ].
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3602
        ] ensure:[
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3603
            s notNil ifTrue:[s close]
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3604
        ].
2948
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3605
        extensionsInRepository isNil ifTrue:[extensionsInRepository := ChangeSet new].
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3606
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3607
        "/ ignore package doIts and all extensionVersion_xxx methods
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3608
        extensionsInRepository := versionMethodsAndDoitsRejected value:extensionsInRepository.
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3609
    ] value.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3610
    extensionDiffs := extensionsInRepository diffSetsAgainst:extensionsInImage.
3926
b40b391c71b6 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 3919
diff changeset
  3611
    extensionsOnly ifTrue:[
b40b391c71b6 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 3919
diff changeset
  3612
        ^ extensionDiffs
b40b391c71b6 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 3919
diff changeset
  3613
    ].
b40b391c71b6 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 3919
diff changeset
  3614
    
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3615
    diffSet := extensionDiffs copy.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3616
2939
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  3617
    (aDateOrNilForNewest isNil and:[aTagOrNil isNil]) ifTrue:[
2948
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3618
        "/ we could do the same as below for each class.
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3619
        "/ however - as we do have change-info and revision info, we can avoid checking out
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3620
        "/ for all classes which are not changed and which have the same version info.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3621
        classesModifiedInImage notEmpty ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3622
            classesReallyModified :=
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3623
                classesModifiedInImage select:[:eachChangedClass |
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3624
                    |currentVersion repositoryVersion s stFile diffs|
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3625
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3626
                    stFile := eachChangedClass classBaseFilename.
2948
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3627
                    [    
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3628
                        s := SourceCodeManager
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3629
                                streamForClass:nil fileName:stFile revision:#newest 
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3630
                                directory:directory module:module cache:true.
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3631
                        s notNil ifTrue:[
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3632
                            repositoryVersion := ChangeSet fromStream:s.
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3633
                        ].
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3634
                    ] ensure:[
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3635
                        s notNil ifTrue:[s close].
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3636
                    ].
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3637
                    repositoryVersion isNil ifTrue:[ repositoryVersion := ChangeSet new ].
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3638
                    repositoryVersion := versionMethodsAndDoitsRejected value:repositoryVersion.
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3639
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3640
                    currentVersion := ChangeSet forExistingClass:eachChangedClass withExtensions:false withLooseMethods:true.
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3641
                    currentVersion := versionMethodsAndDoitsRejected value:currentVersion.
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3642
                    diffs := repositoryVersion diffSetsAgainst:currentVersion .
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3643
                    diffSet addDiffSet:diffs.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3644
                    diffs notEmpty
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3645
                ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3646
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3647
            classesNotReallyModified := classesModifiedInImage \ classesReallyModified.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3648
        ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3649
    ] ifFalse:[
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3650
        classesReallyModified :=
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3651
            classesInImage select:[:eachClass |
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3652
                |currentVersion repositoryVersion s stFile stRevision diffs|
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3653
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3654
                stFile := eachClass classBaseFilename.
2948
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3655
                stRevision := perProjectInfo at:stFile ifAbsent:nil.
4338
dd140314af79 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  3656
                eachClass revision = stRevision ifTrue:[
dd140314af79 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  3657
                    false
dd140314af79 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  3658
                ] ifFalse:[    
dd140314af79 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  3659
                    stRevision notNil ifTrue:[
dd140314af79 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  3660
                        [
dd140314af79 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  3661
                            s := SourceCodeManager
dd140314af79 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  3662
                                    streamForClass:nil fileName:stFile revision:stRevision 
dd140314af79 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  3663
                                    directory:directory module:module cache:true.
dd140314af79 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  3664
                            s notNil ifTrue:[
dd140314af79 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  3665
                                repositoryVersion := ChangeSet fromStream:s.
dd140314af79 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  3666
                            ].
dd140314af79 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  3667
                        ] ensure:[
dd140314af79 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  3668
                            s notNil ifTrue:[s close].
2948
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3669
                        ].
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3670
                    ].
4338
dd140314af79 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  3671
                    repositoryVersion isNil ifTrue:[
dd140314af79 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  3672
                        repositoryVersion := ChangeSet new.
dd140314af79 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  3673
                    ].
dd140314af79 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  3674
                    repositoryVersion := versionMethodsAndDoitsRejected value:repositoryVersion.
dd140314af79 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  3675
dd140314af79 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  3676
                    currentVersion := ChangeSet forExistingClass:eachClass withExtensions:false withLooseMethods:true.
dd140314af79 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  3677
                    currentVersion := versionMethodsAndDoitsRejected value:currentVersion.
dd140314af79 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  3678
                    diffs := repositoryVersion diffSetsAgainst:currentVersion .
dd140314af79 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  3679
                    diffSet addDiffSet:diffs.
dd140314af79 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  3680
                    diffs notEmpty
2295
505293d1cfbd changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2294
diff changeset
  3681
                ].
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3682
            ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3683
    ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3684
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3685
    filesNotInImage notEmpty ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3686
        "/ first, check if these are autoloaded classes which have NOT been installed
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3687
        "/ (for example, due to a --quick argument during startup)
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3688
        autoloadedFilesNotInImage := OrderedCollection new.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3689
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3690
        def := ProjectDefinition definitionClassForPackage:aProject createIfAbsent:false projectType:nil.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3691
        def notNil ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3692
            def classNamesAndAttributesDo:[:eachClassname :eachAttributes | 
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3693
                |cls eachFileName isAutoload|
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3694
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3695
                cls := Smalltalk classNamed:eachClassname.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3696
                cls isNil ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3697
                    isAutoload := eachAttributes includes:#autoload.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3698
                    isAutoload ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3699
                        eachFileName := Smalltalk fileNameForClass:eachClassname.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3700
                        autoloadedFilesNotInImage add:(eachFileName , '.st')
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3701
                    ]
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3702
                ]
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3703
            ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3704
        ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3705
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3706
        (filesNotInImage \ autoloadedFilesNotInImage) do:[:eachSTFile |
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3707
            |s chgSet classDefinitions|
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3708
2948
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3709
            [
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3710
                s := SourceCodeManager
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3711
                        streamForClass:nil fileName:eachSTFile revision:#newest directory:directory module:module cache:true.
3594
407ae2f32318 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3591
diff changeset
  3712
                s isNil ifTrue:[
407ae2f32318 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3591
diff changeset
  3713
                    chgSet := ChangeSet new
407ae2f32318 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3591
diff changeset
  3714
                ] ifFalse:[
407ae2f32318 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3591
diff changeset
  3715
                    chgSet := ChangeSet fromStream:s.
407ae2f32318 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3591
diff changeset
  3716
                ]
2948
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3717
            ] ensure:[
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3718
                s notNil ifTrue:[s close].
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3719
            ].
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3720
            chgSet := versionMethodsAndDoitsRejected value:chgSet.
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3721
            diffSet onlyInReceiver addAll:chgSet
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3722
        ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3723
    ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3724
2948
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3725
    classesNewerInRepository notEmpty ifTrue:[
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3726
        classesNewerInRepository do:[:eachClass|
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3727
            |s diffs repositoryVersion currentVersion|
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3728
2948
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3729
            [
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3730
                s := SourceCodeManager
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3731
                        streamForClass:eachClass fileName:nil revision:#newest directory:directory module:module cache:true.
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3732
                repositoryVersion := ChangeSet fromStream:s.
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3733
            ] ensure:[
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3734
                s notNil ifTrue:[s close].
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3735
            ].
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3736
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3737
            currentVersion := ChangeSet forExistingClass:eachClass withExtensions:false withLooseMethods:true.
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3738
            currentVersion := versionMethodsAndDoitsRejected value:currentVersion.
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3739
            diffs := repositoryVersion diffSetsAgainst:currentVersion .
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3740
            diffSet addDiffSet:diffs.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3741
        ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3742
    ].
2948
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3743
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3744
    classesDeletedInRepository notEmpty ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3745
"/ self halt.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3746
    ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3747
    classesNotInRepository notEmpty ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3748
        "/ if there are no changeSet entries for those classes, they seem to be
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3749
        "/ no longer in the repository (possibly moved ?)
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3750
        "/ If there are entries, these might have been added in the image and need a check-in
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3751
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3752
        classesAddedInImage := classesNotInRepository \ classesDeletedInRepository.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3753
        classesAddedInImage do:[:eachAddedClass |
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3754
            |currentVersion|
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3755
2948
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3756
            currentVersion := ChangeSet forExistingClass:eachAddedClass withExtensions:false withLooseMethods:true.
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3757
            currentVersion := versionMethodsAndDoitsRejected value:currentVersion.
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3758
            diffSet onlyInArg addAll:currentVersion.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3759
        ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3760
    ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3761
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3762
    diffSet isEmpty ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3763
        "/ Dialog information:(resources string:'%1 is up-to-date.' with:eachProject allBold).
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3764
        Transcript showCR:('%1 is up-to-date.' bindWith:aProject allBold).
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3765
        (ChangeSet current includesChangeForPackage:aProject) ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3766
            (Dialog confirm:('%1 is up-to-date.\\Cleanup ChangeSet ?' bindWith:aProject allBold) withCRs) ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3767
                ChangeSet current condenseChangesForPackage:aProject.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3768
            ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3769
        ].
2286
ad425b1c40ab changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2284
diff changeset
  3770
        ^ diffSet.
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3771
    ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3772
3906
0b1447ec43b9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3900
diff changeset
  3773
    diffSet sortByClassName.
0b1447ec43b9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3900
diff changeset
  3774
    
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3775
    "/ as a side-effect, if we find that some classes are modified but the same as in the repository,
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3776
    "/ give user a chance to cleanup the changeSet here.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3777
    aDateOrNilForNewest isNil ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3778
        classesNotReallyModified notEmptyOrNil ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3779
            doCleanup := false.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3780
            box := Dialog
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3781
                forRequestText:(resources 
2939
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  3782
                                    stringWithCRs:'The following classes from %1 are equal to the repository version.\\Remove entries from the changeSet?'
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3783
                                    with:aProject allBold) 
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3784
                editViewClass:ListView
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3785
                lines:10 columns:20 
3199
830195868b71 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3155
diff changeset
  3786
                initialAnswer:nil 
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3787
                setupWith:
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3788
                   [:v :d | 
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3789
                            |removeButton|
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3790
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3791
                            v list:classesNotReallyModified.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3792
                            removeButton := Button label:(resources string:'Cleanup ChangeSet').
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3793
                            removeButton action:[ doCleanup := true. box okPressed. ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3794
                            d addButton:removeButton after:(d okButton).
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3795
                            d okButton label:(resources string:'Continue').
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3796
                            d okButton isReturnButton:false.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3797
                            removeButton isReturnButton:true.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3798
                   ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3799
            box open.
2286
ad425b1c40ab changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2284
diff changeset
  3800
            box accepted ifTrue:[
ad425b1c40ab changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2284
diff changeset
  3801
                doCleanup ifTrue:[
ad425b1c40ab changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2284
diff changeset
  3802
                    classesNotReallyModified do:[:class |
ad425b1c40ab changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2284
diff changeset
  3803
                        ChangeSet current condenseChangesForClass:class.
ad425b1c40ab changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2284
diff changeset
  3804
                    ]
ad425b1c40ab changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2284
diff changeset
  3805
                ].
ad425b1c40ab changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2284
diff changeset
  3806
            ]
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3807
        ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3808
    ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3809
    ^ diffSet
2286
ad425b1c40ab changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2284
diff changeset
  3810
2295
505293d1cfbd changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2294
diff changeset
  3811
    "Modified: / 01-11-2010 / 21:02:52 / cg"
4201
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3812
    "Modified (comment): / 04-02-2017 / 18:49:12 / cg"
4338
dd140314af79 #TUNING by cg
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  3813
    "Modified: / 02-07-2018 / 14:01:01 / Claus Gittinger"
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3814
!
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3815
2939
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  3816
diffSetOfProject:aProject againstRepositoryVersionTaggedAs:symbolicName
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  3817
    ^ self
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  3818
        diffSetOfProject:aProject 
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  3819
        againstRepositoryVersionFrom:nil
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  3820
        orTag:symbolicName
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  3821
!
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  3822
4132
205c322f6daf #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4080
diff changeset
  3823
diffSetOfProject:aProject againstRepositoryVersionTaggedAs:aTag extensionsOnly:extensionsOnly
205c322f6daf #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4080
diff changeset
  3824
    ^ self
205c322f6daf #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4080
diff changeset
  3825
        diffSetOfProject:aProject 
205c322f6daf #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4080
diff changeset
  3826
        againstRepositoryVersionFrom:nil
205c322f6daf #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4080
diff changeset
  3827
        orTag:aTag
205c322f6daf #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4080
diff changeset
  3828
        extensionsOnly:extensionsOnly
205c322f6daf #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4080
diff changeset
  3829
205c322f6daf #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4080
diff changeset
  3830
    "Created: / 12-11-2016 / 03:41:23 / cg"
205c322f6daf #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4080
diff changeset
  3831
!
205c322f6daf #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4080
diff changeset
  3832
4201
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3833
diffSetOfProject:aProject 
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3834
    repositoryVersionFrom:aDateOrNilV1 orTag:aTagOrNilV1
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3835
    againstRepositoryVersionFrom:aDateOrNilV2 orTag:aTagOrNilV2 extensionsOnly:extensionsOnly
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3836
    "return a diffset of two repository versions,
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3837
     each specified by either a version at a particular date,
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3838
     or a the version with a particular tag."
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3839
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3840
    |"classesInImage filesInImage" module directory 
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3841
     perProjectInfoV1 perProjectInfoV2 
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3842
     filesInRepositoryV1 filesInRepositoryV2
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3843
     filesAddedInV2 filesDeletedInV2 filesModified filesReallyModified
4204
5291c8e8c732 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4201
diff changeset
  3844
     unchanged "filesNotInImage" "classesAddedInImage extensionMethods"  
5291c8e8c732 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4201
diff changeset
  3845
     extensionsInRepositoryV1 extensionsInRepositoryV2 extensionDiffs diffSet "autoloadedClassesInImage autoloadedFilesInImage" versionMethodsAndDoitsRejected|
4201
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3846
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3847
    module := aProject asPackageId module.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3848
    directory := aProject asPackageId directory.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3849
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3850
    (aDateOrNilV1 isNil and:[ aTagOrNilV1 isNil ]) ifTrue:[ self error:'must specify either date or tag'].
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3851
    (aDateOrNilV2 isNil and:[ aTagOrNilV2 isNil ]) ifTrue:[ self error:'must specify either date or tag'].
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3852
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3853
    aDateOrNilV1 isNil ifTrue:[
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3854
        perProjectInfoV1 := SourceCodeManager revisionsInModule:module directory:directory taggedAs:aTagOrNilV1.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3855
    ] ifFalse:[
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3856
        perProjectInfoV1 := SourceCodeManager revisionsInModule:module directory:directory fromDate:aDateOrNilV1.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3857
    ].
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3858
    perProjectInfoV1 := perProjectInfoV1 ? #().
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3859
    perProjectInfoV1 := perProjectInfoV1 select:[:info | info key asFilename hasSuffix:'st'].
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3860
    perProjectInfoV1 := Dictionary withAssociations:perProjectInfoV1.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3861
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3862
    aDateOrNilV2 isNil ifTrue:[
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3863
        perProjectInfoV2 := SourceCodeManager revisionsInModule:module directory:directory taggedAs:aTagOrNilV2.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3864
    ] ifFalse:[
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3865
        perProjectInfoV2 := SourceCodeManager revisionsInModule:module directory:directory fromDate:aDateOrNilV2.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3866
    ].
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3867
    perProjectInfoV2 := perProjectInfoV2 ? #().
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3868
    perProjectInfoV2 := perProjectInfoV2 select:[:info | info key asFilename hasSuffix:'st'].
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3869
    perProjectInfoV2 := Dictionary withAssociations:perProjectInfoV2.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3870
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3871
    filesInRepositoryV1 := perProjectInfoV1 keys.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3872
    filesInRepositoryV2 := perProjectInfoV2 keys.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3873
    filesInRepositoryV1 := filesInRepositoryV1 reject:[:fileName | (perProjectInfoV1 at:fileName) == #deleted].
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3874
    filesInRepositoryV2 := filesInRepositoryV2 reject:[:fileName | (perProjectInfoV2 at:fileName) == #deleted].
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3875
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3876
    "/ first remove classes which have the same version
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3877
    unchanged := filesInRepositoryV1 select:[:fileName |
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3878
                    (filesInRepositoryV2 includes:fileName)
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3879
                    and:[ (perProjectInfoV1 at:fileName) = (perProjectInfoV2 at:fileName) ]
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3880
                 ].
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3881
    filesInRepositoryV1 removeAll:unchanged.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3882
    filesInRepositoryV2 removeAll:unchanged.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3883
    
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3884
    filesAddedInV2   := filesInRepositoryV2 select:[:fileName | (filesInRepositoryV1 includes:fileName) not].
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3885
    filesDeletedInV2 := filesInRepositoryV1 select:[:fileName | (filesInRepositoryV2 includes:fileName) not].
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3886
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3887
    filesModified    := filesInRepositoryV1 select:[:fileName | filesInRepositoryV2 includes:fileName].
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3888
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3889
    "/ to ignore version_xxx methods
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3890
    versionMethodsAndDoitsRejected := 
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3891
        [:aChangeSet | 
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3892
            aChangeSet reject:[:chg | 
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3893
                false "chg isMethodChangeForVersionMethod" 
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3894
                or:[false "chg isMethodChangeForExtensionsVersionMethod"
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3895
                or:[chg isDoIt]]]
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3896
        ].
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3897
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3898
    "/ stupid: as we do not have any revision information for extensions (sigh);
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3899
    "/ we must checkout and look at the extension.st contents, to see if it has changed.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3900
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3901
    [
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3902
        |s extensionsRevisionV1 extensionsRevisionV2|
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3903
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3904
        extensionsRevisionV1 := perProjectInfoV1 at:'extensions.st' ifAbsent:nil.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3905
        extensionsRevisionV1 notNil ifTrue:[
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3906
            [
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3907
                s := SourceCodeManager
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3908
                        streamForClass:nil fileName:'extensions.st' revision:extensionsRevisionV1 
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3909
                        directory:directory module:module cache:true.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3910
                s notNil ifTrue:[
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3911
                    extensionsInRepositoryV1 := ChangeSet fromStream:s.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3912
                ].
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3913
            ] ensure:[
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3914
                s notNil ifTrue:[s close]
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3915
            ].
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3916
        ].
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3917
        extensionsInRepositoryV1 isNil ifTrue:[
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3918
            extensionsInRepositoryV1 := ChangeSet new
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3919
        ] ifFalse:[
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3920
            "/ ignore package doIts and all extensionVersion_xxx methods
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3921
            extensionsInRepositoryV1 := versionMethodsAndDoitsRejected value:extensionsInRepositoryV1.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3922
        ].
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3923
        
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3924
        "/ ------
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3925
        extensionsRevisionV2 := perProjectInfoV2 at:'extensions.st' ifAbsent:nil.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3926
        extensionsRevisionV2 notNil ifTrue:[
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3927
            [
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3928
                s := SourceCodeManager
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3929
                        streamForClass:nil fileName:'extensions.st' revision:extensionsRevisionV2 
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3930
                        directory:directory module:module cache:true.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3931
                s notNil ifTrue:[
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3932
                    extensionsInRepositoryV1 := ChangeSet fromStream:s.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3933
                ].
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3934
            ] ensure:[
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3935
                s notNil ifTrue:[s close]
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3936
            ].
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3937
        ].    
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3938
        extensionsInRepositoryV2 isNil ifTrue:[
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3939
            extensionsInRepositoryV2 := ChangeSet new
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3940
        ] ifFalse:[
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3941
            "/ ignore package doIts and all extensionVersion_xxx methods
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3942
            extensionsInRepositoryV2 := versionMethodsAndDoitsRejected value:extensionsInRepositoryV2.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3943
        ].
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3944
    ] value.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3945
    
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3946
    extensionDiffs := extensionsInRepositoryV1 diffSetsAgainst:extensionsInRepositoryV2.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3947
    extensionsOnly ifTrue:[
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3948
        ^ extensionDiffs
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3949
    ].
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3950
    
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3951
    diffSet := extensionDiffs copy.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3952
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3953
    filesReallyModified :=
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3954
        filesInRepositoryV2 select:[:eachFile |
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3955
            |repositoryVersion1 repositoryVersion2 s stRevision diffs|
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3956
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3957
            stRevision := perProjectInfoV1 at:eachFile ifAbsent:nil.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3958
            stRevision notNil ifTrue:[
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3959
                [
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3960
                    s := SourceCodeManager
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3961
                            streamForClass:nil fileName:eachFile revision:stRevision 
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3962
                            directory:directory module:module cache:true.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3963
                    s notNil ifTrue:[
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3964
                        repositoryVersion1 := ChangeSet fromStream:s.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3965
                    ].
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3966
                ] ensure:[
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3967
                    s notNil ifTrue:[s close].
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3968
                ].
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3969
            ].
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3970
            repositoryVersion1 isNil ifTrue:[
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3971
                repositoryVersion1 := ChangeSet new.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3972
            ].
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3973
            repositoryVersion1 := versionMethodsAndDoitsRejected value:repositoryVersion1.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3974
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3975
            stRevision := perProjectInfoV2 at:eachFile ifAbsent:nil.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3976
            stRevision notNil ifTrue:[
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3977
                [
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3978
                    s := SourceCodeManager
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3979
                            streamForClass:nil fileName:eachFile revision:stRevision 
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3980
                            directory:directory module:module cache:true.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3981
                    s notNil ifTrue:[
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3982
                        repositoryVersion2 := ChangeSet fromStream:s.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3983
                    ].
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3984
                ] ensure:[
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3985
                    s notNil ifTrue:[s close].
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3986
                ].
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3987
            ].
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3988
            repositoryVersion2 isNil ifTrue:[
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3989
                repositoryVersion2 := ChangeSet new.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3990
            ].
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3991
            repositoryVersion2 := versionMethodsAndDoitsRejected value:repositoryVersion2.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3992
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3993
            diffs := repositoryVersion1 diffSetsAgainst:repositoryVersion2 .
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3994
            diffSet addDiffSet:diffs.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3995
            diffs notEmpty
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3996
        ].
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3997
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3998
    diffSet isEmpty ifTrue:[
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  3999
        "/ Dialog information:(resources string:'%1 is up-to-date.' with:eachProject allBold).
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  4000
        Transcript showCR:('%1 not changed between %2 and %3.' 
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  4001
                            bindWith:aProject allBold 
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  4002
                            with:(aDateOrNilV1 ? aTagOrNilV1) 
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  4003
                            with:(aDateOrNilV2 ? aTagOrNilV2)).
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  4004
        ^ diffSet.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  4005
    ].
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  4006
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  4007
    diffSet sortByClassName.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  4008
    ^ diffSet
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  4009
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  4010
    "Created: / 04-02-2017 / 17:27:47 / cg"
4204
5291c8e8c732 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4201
diff changeset
  4011
    "Modified: / 05-02-2017 / 10:04:50 / cg"
4201
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  4012
!
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  4013
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
  4014
ensureCorrectVersionMethodsInClass:aClass usingManager:aManager
3674
d9b94d8afb2c class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  4015
    |theMetaclass versionMthd src newSrc versionMethodName oldVersionMethodName|
2383
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  4016
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  4017
    theMetaclass := aClass theMetaclass.
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  4018
    versionMethodName := aManager nameOfVersionMethodInClasses.
2442
7ecd9a4248bb changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents: 2426
diff changeset
  4019
    oldVersionMethodName := aClass nameOfOldVersionMethod.
2383
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  4020
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  4021
    (theMetaclass includesSelector:versionMethodName) ifTrue:[
2442
7ecd9a4248bb changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents: 2426
diff changeset
  4022
"/        (theMetaclass includesSelector:oldVersionMethodName) ifTrue:[
7ecd9a4248bb changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents: 2426
diff changeset
  4023
"/            theMetaclass removeSelector:oldVersionMethodName.   
7ecd9a4248bb changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents: 2426
diff changeset
  4024
"/        ].
2383
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  4025
        "/ ensure that my version method is parsable (contains $'s)
3674
d9b94d8afb2c class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  4026
        versionMthd := theMetaclass compiledMethodAt:versionMethodName.
d9b94d8afb2c class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  4027
        versionMthd notNil ifTrue:[
d9b94d8afb2c class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  4028
            src := versionMthd source.
d9b94d8afb2c class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  4029
            src notNil ifTrue:[
d9b94d8afb2c class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  4030
                newSrc := aManager ensureDollarsInVersionMethod:src.
d9b94d8afb2c class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  4031
                newSrc ~= src ifTrue:[
d9b94d8afb2c class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  4032
                    theMetaclass compile:newSrc categorized:#documentation.
d9b94d8afb2c class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  4033
                ]
d9b94d8afb2c class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  4034
            ].
2383
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  4035
        ].
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  4036
    ] ifFalse:[
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  4037
        (theMetaclass includesSelector:oldVersionMethodName) ifTrue:[
2487
c8f4417b9edc changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents: 2484
diff changeset
  4038
            "/ but make sure, it is a version method for this sourcecodemanager...
c8f4417b9edc changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents: 2484
diff changeset
  4039
            (theMetaclass methodDictionary keys count:[:sel | sel startsWith:'version']) size == 1 ifTrue:[
3674
d9b94d8afb2c class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  4040
                versionMthd := theMetaclass compiledMethodAt:oldVersionMethodName.
d9b94d8afb2c class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  4041
                versionMthd notNil ifTrue:[
d9b94d8afb2c class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  4042
                    src := versionMthd source.
d9b94d8afb2c class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  4043
                    (src startsWith:oldVersionMethodName) ifTrue:[
d9b94d8afb2c class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  4044
                        newSrc := versionMethodName , (src copyFrom:(oldVersionMethodName size + 1))
d9b94d8afb2c class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  4045
                    ].
d9b94d8afb2c class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  4046
                    theMetaclass compile:newSrc categorized:#documentation.
d9b94d8afb2c class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  4047
                ]
2487
c8f4417b9edc changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents: 2484
diff changeset
  4048
            ]
2383
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  4049
        ].
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  4050
    ].
2442
7ecd9a4248bb changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents: 2426
diff changeset
  4051
2487
c8f4417b9edc changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents: 2484
diff changeset
  4052
    "Modified: / 20-08-2011 / 14:40:27 / cg"
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
  4053
    "Created: / 29-12-2011 / 14:33:46 / cg"
2383
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  4054
!
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  4055
3896
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4056
fetchSourceOf:aClass askForRevision:askForRevision into:aBlockToReturnMultipleValues
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4057
    "fetch the source of either the newest version or the revision being asked for,
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4058
     or nil, if there are any problems.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4059
     Helper method"
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4060
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4061
    |classToCompare aStream comparedSource rev revString mgr
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4062
     nm msg revisionInClass newestRev|
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4063
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4064
    classToCompare := aClass theNonMetaclass.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4065
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4066
    nm := classToCompare name.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4067
    (mgr := manager) isNil ifTrue:[
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4068
        mgr := self sourceCodeManagerFor:classToCompare.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4069
        mgr isNil ifTrue:[
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4070
            self error:'oops - no sourcecode manager' mayProceed:true.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4071
            ^ nil
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4072
        ].
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4073
    ].
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4074
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4075
    rev := classToCompare revisionInfoOfManager:mgr.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4076
"/    rev := classToCompare binaryRevision.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4077
    revisionInClass := classToCompare revisionOfManager:mgr.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4078
    rev isNil ifTrue:[
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4079
        rev := revisionInClass
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4080
    ].
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4081
    rev isNil ifTrue:[
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4082
        (Dialog confirm:'Class seems to be not yet in the repository (or classes revision info is missing or corrupted)\\Proceed ?' withCRs)
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4083
        ifFalse:[
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4084
            ^ nil
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4085
        ]
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4086
    ].
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4087
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4088
    "/
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4089
    "/ class in repository - ask for revision
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4090
    "/
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4091
    SourceCodeManagerError handle:[:ex |
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4092
        Dialog warn:(resources 
4362
cd8a7d6bfc1d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4359
diff changeset
  4093
                        stringWithCRs:'Could not fetch revision info of "%1".\Reported error: %4\\Please check your sourcecode manager settings of %2 for package: "%3".\(and possibly the network for reachability of the repository)'
cd8a7d6bfc1d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4359
diff changeset
  4094
                        with:classToCompare name
cd8a7d6bfc1d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4359
diff changeset
  4095
                        with:classToCompare sourceCodeManager managerTypeName
cd8a7d6bfc1d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4359
diff changeset
  4096
                        with:classToCompare package
cd8a7d6bfc1d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4359
diff changeset
  4097
                        with:(ex description asString withoutSeparators)).
3896
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4098
        ^ nil.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4099
    ] do:[
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4100
        newestRev := mgr newestRevisionOf:classToCompare.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4101
    ].
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4102
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4103
    askForRevision ifTrue:[
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4104
        msg := resources string:'Compare to revision: (empty for newest)'.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4105
        rev notNil ifTrue:[
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4106
            msg := msg , '\\' , (resources string:'Current %1 is based upon rev %2.'
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4107
                                           with:nm allBold with:rev).
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4108
            (revisionInClass notNil and:[revisionInClass ~= rev]) ifTrue:[
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4109
                msg := msg , '\' , (resources string:'And has been checked into the repository as %1.'
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4110
                                               with:revisionInClass)
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4111
            ]
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4112
        ].
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4113
        newestRev notNil ifTrue:[
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4114
            msg := msg , '\' , (resources string:'Newest in repository is %1.'
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4115
                                           with:newestRev)
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4116
        ].
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4117
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4118
        rev := self
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4119
                    askForExistingRevision:msg 
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4120
                    title:'Compare with repository' 
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4121
                    class:classToCompare.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4122
    ] ifFalse:[
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4123
        rev := newestRev.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4124
    ].
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4125
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4126
    rev isNil ifTrue:[
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4127
        mgr = classToCompare sourceCodeManager ifTrue:[
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4128
            msg := 'Could not figure out the newest revision of "%1".\\Please check if this class is really contained in that repository,\and also your sourcecode manager settings of %2 for package: "%3".\(and possibly the network for reachability of the repository)'
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4129
        ] ifFalse:[
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4130
            msg := 'Could not figure out the newest revision of "%1".\\Notice that the class is actually maintained by %4, not %2.\Please check if this class is really in the %2 repository,\and also your sourcecode manager settings of %2 for package: "%3".\(and possibly the network for reachability of the repository)'
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4131
        ].
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4132
        Dialog warn:(resources 
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4133
                                stringWithCRs:msg
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4134
                                with:classToCompare name
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4135
                                with:mgr managerTypeName
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4136
                                with:classToCompare package
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4137
                                with:(classToCompare sourceCodeManager managerTypeName)).
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4138
        ^ nil.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4139
    ].
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4140
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4141
    rev withoutSpaces isEmpty ifTrue:[
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4142
        msg := 'extracting newest %1 (' , (newestRev ? '???') , ')'.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4143
        "/ aStream := mgr getMostRecentSourceStreamForClassNamed:nm.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4144
        aStream := mgr getSourceStreamFor:classToCompare revision:newestRev.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4145
        revString := '(newest: ' , (newestRev ? '???') , ')'.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4146
    ] ifFalse:[
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4147
        msg := 'extracting previous %1'.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4148
        aStream := mgr getSourceStreamFor:classToCompare revision:rev.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4149
        revString := rev
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4150
    ].
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4151
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4152
    aStream isNil ifTrue:[
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4153
        self warn:'Could not extract source from repository (check repository settings / network)'.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4154
        ^ nil
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4155
    ].
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4156
    aStream class readErrorSignal handle:[:ex |
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4157
        self warn:('Read error while reading extracted source\\' , ex description) withCRs.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4158
        aStream close.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4159
        ^ nil
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4160
    ] do:[
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4161
        comparedSource := aStream contents asString.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4162
    ].
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4163
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4164
    aStream close.
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4165
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4166
    aBlockToReturnMultipleValues 
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4167
        value:revString 
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4168
        value:revisionInClass
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4169
        value:mgr. 
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4170
    ^ comparedSource
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4171
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4172
    "
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4173
      self compareClassWithRepository:Array
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4174
    "
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4175
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4176
    "Modified: / 24-07-2012 / 18:11:27 / cg"
4362
cd8a7d6bfc1d #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4359
diff changeset
  4177
    "Modified: / 04-10-2018 / 15:36:05 / Claus Gittinger"
3896
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4178
!
41784f108832 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3892
diff changeset
  4179
2383
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  4180
getLogMessageForClassCheckinTakingDefaultsFromPreviousLogInfo:aLogInfoOrNil forClass:aClass valuesInto:aBlock
3325
944f6a6e66ff class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3313
diff changeset
  4181
    "open a dialog, asking for commit/checkin log info.
944f6a6e66ff class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3313
diff changeset
  4182
     Returns 2 values: a log message and additional checkinInfo (containing things like
944f6a6e66ff class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3313
diff changeset
  4183
     markAsStable, etc,)"
2383
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  4184
4359
f46715e6c974 #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 4349
diff changeset
  4185
    |initialLogMessage checkinInfo reasonLine logMessage|
2383
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  4186
    
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  4187
    "/ heuristics for a useful initial log message...
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  4188
    aLogInfoOrNil isNil ifTrue:[
4230
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
  4189
        initialLogMessage := (self class goodInitialLogMessageForCheckinClassOfClass:aClass) ? ''.
2383
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  4190
        "/ initial checkin ?
3657
2de3a610d07c class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3642
diff changeset
  4191
        (aClass package isNil or:[(aClass revisionOfManager:manager) "revision" isNil]) ifTrue:[ 
2383
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  4192
            initialLogMessage := 'initial checkin\\' withCRs , initialLogMessage
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  4193
        ].
4320
a8d8e5c80595 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4301
diff changeset
  4194
4359
f46715e6c974 #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 4349
diff changeset
  4195
        checkinInfo := self 
f46715e6c974 #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 4349
diff changeset
  4196
                        getCheckinInfoFor:aClass name 
f46715e6c974 #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 4349
diff changeset
  4197
                        initialAnswer:initialLogMessage
f46715e6c974 #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 4349
diff changeset
  4198
                        withQuickOption:false
f46715e6c974 #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 4349
diff changeset
  4199
                        withValidateConsistencyOption:true "aClass isProjectDefinition"
f46715e6c974 #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 4349
diff changeset
  4200
                        showChangesAction:[
f46715e6c974 #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 4349
diff changeset
  4201
                                "/ that is passed to the dialog's 'what changed' button
f46715e6c974 #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 4349
diff changeset
  4202
                                self compareClassWithRepository:aClass askForRevision:false
f46715e6c974 #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 4349
diff changeset
  4203
                            ].
f46715e6c974 #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 4349
diff changeset
  4204
f46715e6c974 #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 4349
diff changeset
  4205
        checkinInfo isNil ifTrue:[^ false].
f46715e6c974 #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 4349
diff changeset
  4206
f46715e6c974 #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 4349
diff changeset
  4207
        checkinInfo validateConsistency ifTrue:[
f46715e6c974 #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 4349
diff changeset
  4208
            aClass isProjectDefinition ifTrue:[
f46715e6c974 #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 4349
diff changeset
  4209
                self validateConsistencyOfPackage:aClass package doClasses:false doExtensions:false.
f46715e6c974 #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 4349
diff changeset
  4210
            ] ifFalse:[
f46715e6c974 #QUALITY by stefan
Stefan Vogel <sv@exept.de>
parents: 4349
diff changeset
  4211
                self validateConsistencyOfPackage:aClass doClasses:false doExtensions:false.
4320
a8d8e5c80595 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4301
diff changeset
  4212
            ].
4079
05771563133b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4058
diff changeset
  4213
        ].
05771563133b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4058
diff changeset
  4214
2383
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  4215
        logMessage := checkinInfo logMessage.
3900
621438521fee #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3896
diff changeset
  4216
621438521fee #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3896
diff changeset
  4217
        reasonLine := '#OTHER'. 
621438521fee #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3896
diff changeset
  4218
        checkinInfo checkinReason == Tools::CheckinInfoDialog reasonBugfix ifTrue:[
621438521fee #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3896
diff changeset
  4219
            reasonLine := '#BUGFIX' 
621438521fee #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3896
diff changeset
  4220
        ] ifFalse:[ 
621438521fee #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3896
diff changeset
  4221
            checkinInfo checkinReason == Tools::CheckinInfoDialog reasonFeature ifTrue:[
621438521fee #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3896
diff changeset
  4222
                reasonLine := '#FEATURE' 
621438521fee #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3896
diff changeset
  4223
            ] ifFalse:[ 
621438521fee #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3896
diff changeset
  4224
                checkinInfo checkinReason == Tools::CheckinInfoDialog reasonRefactoring ifTrue:[
621438521fee #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3896
diff changeset
  4225
                    reasonLine := '#REFACTORING' 
3906
0b1447ec43b9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3900
diff changeset
  4226
                ] ifFalse:[ 
0b1447ec43b9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3900
diff changeset
  4227
                    checkinInfo checkinReason == Tools::CheckinInfoDialog reasonDocumentation ifTrue:[
0b1447ec43b9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3900
diff changeset
  4228
                        reasonLine := '#DOCUMENTATION' 
0b1447ec43b9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3900
diff changeset
  4229
                    ] ifFalse:[ 
0b1447ec43b9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3900
diff changeset
  4230
                        checkinInfo checkinReason == Tools::CheckinInfoDialog reasonUIEnhancement ifTrue:[
0b1447ec43b9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3900
diff changeset
  4231
                            reasonLine := '#UI_ENHANCEMENT' 
3971
e7cba6e3e584 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 3967
diff changeset
  4232
                        ] ifFalse:[ 
e7cba6e3e584 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 3967
diff changeset
  4233
                            checkinInfo checkinReason == Tools::CheckinInfoDialog reasonQuality ifTrue:[
e7cba6e3e584 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 3967
diff changeset
  4234
                                reasonLine := '#QUALITY' 
e7cba6e3e584 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 3967
diff changeset
  4235
                            ] ifFalse:[ 
e7cba6e3e584 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 3967
diff changeset
  4236
                                checkinInfo checkinReason == Tools::CheckinInfoDialog reasonTuning ifTrue:[
e7cba6e3e584 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 3967
diff changeset
  4237
                                    reasonLine := '#TUNING' 
e7cba6e3e584 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 3967
diff changeset
  4238
                                ]
e7cba6e3e584 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 3967
diff changeset
  4239
                            ]
3906
0b1447ec43b9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3900
diff changeset
  4240
                        ]
0b1447ec43b9 #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3900
diff changeset
  4241
                    ]
3900
621438521fee #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3896
diff changeset
  4242
                ]
621438521fee #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3896
diff changeset
  4243
            ]
621438521fee #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3896
diff changeset
  4244
        ]
2383
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  4245
    ] ifFalse:[
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  4246
        aLogInfoOrNil isString ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  4247
            "soon obsolete..."    
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  4248
            logMessage := aLogInfoOrNil
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  4249
        ] ifFalse:[ 
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  4250
            checkinInfo := aLogInfoOrNil.
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  4251
            logMessage := checkinInfo logMessage.
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  4252
        ].
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  4253
    ].
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  4254
    logMessage notNil ifTrue:[  
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  4255
        logMessage := logMessage asSingleByteStringReplaceInvalidWith:$?
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  4256
    ].
3974
0d6e71243042 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 3971
diff changeset
  4257
    reasonLine isNil ifTrue:[
0d6e71243042 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 3971
diff changeset
  4258
        reasonLine := '#OTHER'. 
3900
621438521fee #FEATURE
Claus Gittinger <cg@exept.de>
parents: 3896
diff changeset
  4259
    ].
3974
0d6e71243042 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 3971
diff changeset
  4260
    logMessage := reasonLine , ' by ',OperatingSystem getLoginName,'\' withCRs 
0d6e71243042 #QUALITY by cg
Claus Gittinger <cg@exept.de>
parents: 3971
diff changeset
  4261
                  , (logMessage ? '').
2383
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  4262
    aBlock value:logMessage value:checkinInfo.
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  4263
    ^ true
3971
e7cba6e3e584 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 3967
diff changeset
  4264
e7cba6e3e584 #UI_ENHANCEMENT
Claus Gittinger <cg@exept.de>
parents: 3967
diff changeset
  4265
    "Modified: / 31-03-2016 / 17:58:11 / cg"
4230
51459e224b36 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4226
diff changeset
  4266
    "Modified: / 17-03-2017 / 18:00:12 / stefan"
2383
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  4267
!
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  4268
4201
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  4269
knownTagsInPackages:packages
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  4270
    "return the symbolic names given to any version in packages.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  4271
     Being lazy, assume tags are persistent across packages (which they are not required to be...)
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  4272
     and only fetch the tag names from the first given package.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  4273
     May raise an error, if the repository cannot be accessed"
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  4274
    
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  4275
    |someDfnClass|
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  4276
    
4295
569479b5d86c #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 4290
diff changeset
  4277
    someDfnClass := ProjectDefinition definitionClassForPackage:packages firstOrNil.
4201
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  4278
    someDfnClass isNil ifTrue:[ someDfnClass := Object projectDefinitionClass ].
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  4279
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  4280
    ^ (manager knownTagsFor:someDfnClass) asOrderedCollection sort.
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  4281
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  4282
    "
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  4283
     CVSSourceCodeManager utilities knownTagsInPackages:#( 'stx:libbasic' 'stc:libbasic2' )
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  4284
    "
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  4285
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  4286
    "Created: / 04-02-2017 / 18:55:16 / cg"
4295
569479b5d86c #BUGFIX by stefan
Stefan Vogel <sv@exept.de>
parents: 4290
diff changeset
  4287
    "Modified: / 29-12-2017 / 15:16:21 / stefan"
4201
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  4288
!
e13af182fbb4 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4193
diff changeset
  4289
976
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4290
removeSourceContainerForClass:aClass
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4291
    "show container & let user confirm twice."
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4292
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4293
    ^ self removeSourceContainerForClass:aClass confirm:true warn:true
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4294
!
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4295
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4296
removeSourceContainerForClass:aClass confirm:doConfirm warn:doWarn
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4297
    "show container & optionally let user confirm twice."
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4298
3814
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  4299
    |info mgr|
976
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4300
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4301
    aClass isLoaded ifFalse:[
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4302
        doWarn ifTrue:[
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4303
            self warn:(resources string:'Please load the class first.').
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4304
        ].
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4305
        ^ false.
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4306
    ].
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4307
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4308
    "/
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4309
    "/ ask the sourceCodeManager if it knows anything about that class
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4310
    "/ if so, take that as a default.
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4311
    "/
1782
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  4312
    mgr := self sourceCodeManagerFor:aClass.
976
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4313
    mgr isNil ifTrue:[
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4314
        ^ false
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4315
    ].
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4316
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4317
    info := mgr sourceInfoOfClass:aClass.
3814
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  4318
    ^ self removeSourceContainerForClass:aClass usingSourceInfo:info confirm:doConfirm warn:doWarn
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  4319
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  4320
    "Modified: / 16-07-2013 / 19:46:50 / cg"
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  4321
!
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  4322
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  4323
removeSourceContainerForClass:aClass usingSourceInfo:info confirm:doConfirm warn:doWarn
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  4324
    "show container & optionally let user confirm twice."
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  4325
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  4326
    |module directory fileName mgr|
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  4327
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  4328
    aClass isLoaded ifFalse:[
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  4329
        doWarn ifTrue:[
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  4330
            self warn:(resources string:'Please load the class first.').
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  4331
        ].
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  4332
        ^ false.
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  4333
    ].
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  4334
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  4335
    "/
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  4336
    "/ ask the sourceCodeManager if it knows anything about that class
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  4337
    "/ if so, take that as a default.
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  4338
    "/
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  4339
    mgr := self sourceCodeManagerFor:aClass.
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  4340
    mgr isNil ifTrue:[
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  4341
        ^ false
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  4342
    ].
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  4343
976
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4344
    info notNil ifTrue:[
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4345
        (info includesKey:#module) ifTrue:[
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4346
            module := (info at:#module).
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4347
        ].
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4348
        (info includesKey:#directory) ifTrue:[
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
  4349
            directory := (info at:#directory).
976
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4350
        ].
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4351
        fileName := mgr containerFromSourceInfo:info.
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4352
    ].
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4353
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4354
    module isNil ifTrue:[
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4355
        doWarn ifTrue:[
1423
d15575ef3dba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1414
diff changeset
  4356
            self warn:(resources stringWithCRs:'classes module is unknown.\\It seems to not have a container.') .
976
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4357
        ].
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4358
        ^ false.
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4359
    ].
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
  4360
    directory isNil ifTrue:[
976
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4361
        doWarn ifTrue:[
1423
d15575ef3dba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1414
diff changeset
  4362
            self warn:(resources stringWithCRs:'classes package is unknown.\\It seems to not have a container.') .
976
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4363
        ].
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4364
        ^ false.
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4365
    ].
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4366
    fileName isNil ifTrue:[
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4367
        doWarn ifTrue:[
1423
d15575ef3dba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1414
diff changeset
  4368
            self warn:(resources stringWithCRs:'classes container fileName is unknown.\\It seems to not have a container.') .
976
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4369
        ].
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4370
        ^ false.
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4371
    ].
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4372
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4373
    OperatingSystem isMSDOSlike ifTrue:[
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
  4374
        "cvs expects unix-filenames"
3591
d86841bb0d5c class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3579
diff changeset
  4375
        module := module asUnixFilenameString.
d86841bb0d5c class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3579
diff changeset
  4376
        directory := directory asUnixFilenameString.
976
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4377
    ].
1787
db6157670930 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1782
diff changeset
  4378
    (mgr checkForExistingContainer:fileName inModule:module directory:directory) ifFalse:[
976
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4379
        doWarn ifTrue:[
2830
f5204449764a changed: #removeSourceContainerForClass:confirm:warn:
Claus Gittinger <cg@exept.de>
parents: 2818
diff changeset
  4380
            self warn:(resources stringWithCRs:'Class had no source container (or SCM access is broken).') .
976
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4381
        ].
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4382
        ^ false.
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4383
    ].
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4384
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4385
    doConfirm ifTrue:[
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4386
        (Dialog
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4387
            choose:(resources 
1423
d15575ef3dba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1414
diff changeset
  4388
                        stringWithCRs:'Please confirm removal of the container for %1:
976
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4389
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4390
container:    %2 / %3 / %4
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4391
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4392
Really remove ?' 
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4393
                        with:aClass name 
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4394
                        with:module 
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
  4395
                        with:directory 
976
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4396
                        with:fileName) 
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4397
            labels:(Array 
1129
89049988e8d3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1122
diff changeset
  4398
                        with:(resources string:'No') 
89049988e8d3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1122
diff changeset
  4399
                        with:(resources string:'Remove'))
976
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4400
            values:#(false true)
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4401
            default:false) ifFalse:[
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4402
            ^ false.
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4403
        ].
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4404
    ].
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4405
3814
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  4406
    (mgr removeContainer:fileName inModule:module directory:directory) 
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  4407
    ifFalse:[
976
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4408
        doWarn ifTrue:[
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4409
            self warn:(resources string:'failed to remove container.').
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4410
        ].
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4411
        ^ true.
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4412
    ].
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  4413
    ^ false
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
  4414
3351
68989ed1137f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
  4415
    "Modified: / 16-07-2013 / 19:46:50 / cg"
1000
3687dbf412db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 998
diff changeset
  4416
!
3687dbf412db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 998
diff changeset
  4417
1026
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  4418
repositoryLogOf:aClass onto:aStream
2050
037e794f5857 +option to show a short revision log
Claus Gittinger <cg@exept.de>
parents: 2042
diff changeset
  4419
    self repositoryLogOf:aClass short:false onto:aStream
037e794f5857 +option to show a short revision log
Claus Gittinger <cg@exept.de>
parents: 2042
diff changeset
  4420
!
037e794f5857 +option to show a short revision log
Claus Gittinger <cg@exept.de>
parents: 2042
diff changeset
  4421
037e794f5857 +option to show a short revision log
Claus Gittinger <cg@exept.de>
parents: 2042
diff changeset
  4422
repositoryLogOf:aClass short:shortOrNot onto:aStream
1026
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  4423
    |info rv mgr info2 module fn msg s|
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  4424
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  4425
    info := aClass revisionInfo.
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  4426
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  4427
    rv := aClass binaryRevision.
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  4428
    rv notNil ifTrue:[
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  4429
        aStream nextPutLine:'**** Loaded classes binary information ****'; cr.
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  4430
        aStream nextPutLine:'  Binary based upon : ' , rv.
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  4431
        aStream cr.
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  4432
    ].
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  4433
3344
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4434
    "/ old
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4435
"/    info isNil ifTrue:[
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4436
"/        aStream nextPutLine:'No revision info found'.
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4437
"/        aClass isLoaded ifFalse:[
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4438
"/            aStream cr; nextPutAll:'This is an autoloaded class - you may see more after it is loaded.'
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4439
"/        ] ifTrue:[
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4440
"/            fn := aClass classFilename.
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4441
"/            aClass wasAutoloaded ifTrue:[
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4442
"/                msg := 'This class was autoloaded.'.
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4443
"/                msg := msg , ' (from ''' , fn , ''')'.
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4444
"/            ] ifFalse:[
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4445
"/                msg := 'This class was loaded from ''' , fn , '''.'
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4446
"/            ].
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4447
"/            msg notNil ifTrue:[
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4448
"/                aStream cr; nextPutAll:msg.
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4449
"/            ]
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4450
"/        ].
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4451
"/        ^ self
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4452
"/    ]
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4453
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4454
    info isNil ifTrue:[
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4455
        aClass isLoaded ifFalse:[
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4456
            aStream nextPutLine:'This is an autoloaded class - you may see more after it is loaded.'
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4457
        ] ifTrue:[
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4458
            fn := aClass classFilename.
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4459
            aClass wasAutoloaded ifTrue:[
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4460
                msg := 'This class was autoloaded.'.
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4461
                msg := msg , ' (from ''' , fn , ''')'.
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4462
            ] ifFalse:[
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4463
                msg := 'This class was loaded from ''' , fn , '''.'
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4464
            ].
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4465
            msg notNil ifTrue:[
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4466
                aStream nextPutLine:msg.
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4467
            ]
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4468
        ].
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4469
        aStream cr.
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4470
    ] ifFalse:[
2041
fb85bf748dbb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2013
diff changeset
  4471
        (info revision notNil) ifFalse:[
1026
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  4472
            aStream nextPutLine:'WARNING:'; cr.
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  4473
            aStream nextPutLine:'  The class seems not to be loaded from the repository.'.
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  4474
            aStream nextPutLine:'  Check carefully before checking anything in.'.
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  4475
            aStream nextPutLine:'  (i.e. compare with repository for renamed class(es), same-name but unrelated etc.)'.
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  4476
            aStream cr.
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  4477
        ].
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  4478
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  4479
        aStream nextPutLine:'**** Classes source information ****'; cr.
2042
e2311b66ad94 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2041
diff changeset
  4480
        s := info repositoryPathName.
1026
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  4481
        s notNil ifTrue:[
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  4482
            aStream nextPutLine:'  Source repository : ' , s
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  4483
        ].
3676
51859e5df3b5 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3674
diff changeset
  4484
        aStream nextPutLine:('  Filename ........ : %1' bindWith: (info fileName ? '?')).
51859e5df3b5 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3674
diff changeset
  4485
        info symbolicVersionName ~= info revision ifTrue:[
51859e5df3b5 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3674
diff changeset
  4486
            aStream nextPutLine:('  Symbolic Version  : %1' bindWith: (info symbolicVersionName ? '?')).
51859e5df3b5 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3674
diff changeset
  4487
        ].
51859e5df3b5 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3674
diff changeset
  4488
        aStream nextPutLine:('  Revision ........ : %1' bindWith: (info revision ? '?')).
51859e5df3b5 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3674
diff changeset
  4489
        aStream nextPutLine:('  Checkin date .... : %1 %2 %3' bindWith: (info date  ? '?') 
51859e5df3b5 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3674
diff changeset
  4490
                                                              with:(info time ? '?') 
51859e5df3b5 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3674
diff changeset
  4491
                                                              with:(info timezone ? '')).
51859e5df3b5 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3674
diff changeset
  4492
        aStream nextPutLine:('  Checkin user .... : %1' bindWith: (info user ? '?')).
3344
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4493
    ].
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4494
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4495
    (info2 := aClass packageSourceCodeInfo) notNil ifTrue:[
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4496
        aStream nextPutLine:'  Repository: ..... : ' , (info2 at:#module ifAbsent:'?').
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4497
        aStream nextPutLine:'  Directory: ...... : ' , (info2 at:#directory ifAbsent:'?').
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4498
    ].
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4499
    info notNil ifTrue:[
2042
e2311b66ad94 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2041
diff changeset
  4500
        aStream nextPutLine:'  Container ....... : ' , (info repositoryPathName ? '?').
3344
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4501
    ].
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4502
    aStream cr.
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4503
    mgr := self sourceCodeManagerFor:aClass.
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4504
    mgr notNil ifTrue:[
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4505
        aStream nextPutLine:'**** Repository information ****'; cr.
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4506
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4507
        module := nil.
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4508
        info2 notNil ifTrue:[
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4509
            module := info2 at:#module ifAbsent:nil.
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4510
        ].
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4511
        module notNil ifTrue:[
3632
c39f5d147a8b class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3602
diff changeset
  4512
            aStream nextPutLine:('  Repository URL ......: %1' bindWith: 
3633
abe27fb2c473 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3632
diff changeset
  4513
                                ((mgr repositoryNameForPackage:aClass package) ifNil:[mgr repositoryName , ' (default)']) asString).
3344
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4514
        ].
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4515
        mgr writeRevisionLogOf:aClass short:shortOrNot to:aStream.
1026
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  4516
    ]
1782
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  4517
2836
91e9be94d80b changed: #repositoryLogOf:short:onto:
Claus Gittinger <cg@exept.de>
parents: 2835
diff changeset
  4518
    "Modified: / 12-10-2011 / 18:06:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
91e9be94d80b changed: #repositoryLogOf:short:onto:
Claus Gittinger <cg@exept.de>
parents: 2835
diff changeset
  4519
    "Modified: / 11-07-2012 / 13:50:59 / cg"
1726
e9fba6b66dd6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
  4520
!
e9fba6b66dd6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
  4521
e9fba6b66dd6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
  4522
tagClass:aClass as:tag
e9fba6b66dd6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
  4523
    |mgr|
e9fba6b66dd6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
  4524
e9fba6b66dd6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
  4525
    mgr := self sourceCodeManagerFor:aClass.
4281
7b1c0f0170d0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4276
diff changeset
  4526
    mgr setSymbolicName:tag revision:nil overWrite:true class:aClass.
1782
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  4527
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  4528
    "Modified: / 12-09-2006 / 13:03:59 / cg"
4281
7b1c0f0170d0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4276
diff changeset
  4529
    "Modified (format): / 05-12-2017 / 22:50:18 / cg"
1782
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  4530
!
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  4531
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  4532
tagClasses:aCollectionOfClasses as:tag
3847
94661e33541c class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3818
diff changeset
  4533
    ^ self tagClasses:aCollectionOfClasses as:tag revision:nil
94661e33541c class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3818
diff changeset
  4534
94661e33541c class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3818
diff changeset
  4535
    "Created: / 12-09-2006 / 13:04:29 / cg"
94661e33541c class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3818
diff changeset
  4536
!
94661e33541c class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3818
diff changeset
  4537
94661e33541c class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3818
diff changeset
  4538
tagClasses:aCollectionOfClasses as:tag revision:revision
1782
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  4539
    |classesPerManager|
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  4540
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  4541
    classesPerManager := Dictionary new.
4290
37bc52831eac #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4287
diff changeset
  4542
    aCollectionOfClasses do:[:eachClass | 
37bc52831eac #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4287
diff changeset
  4543
        |manager|
37bc52831eac #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4287
diff changeset
  4544
37bc52831eac #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4287
diff changeset
  4545
        manager := self sourceCodeManagerFor:eachClass.
37bc52831eac #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4287
diff changeset
  4546
        (classesPerManager at:manager ifAbsentPut:[Set new]) add:eachClass
37bc52831eac #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4287
diff changeset
  4547
    ].
1782
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  4548
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  4549
    classesPerManager keysAndValuesDo:[:manager :classesPerManager|
4281
7b1c0f0170d0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4276
diff changeset
  4550
        manager setSymbolicName:tag revision:revision overWrite:true classes:classesPerManager.
1782
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  4551
    ].
1726
e9fba6b66dd6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
  4552
    ^ true
4281
7b1c0f0170d0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4276
diff changeset
  4553
4290
37bc52831eac #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4287
diff changeset
  4554
    "Modified (format): / 07-12-2017 / 10:48:36 / cg"
1726
e9fba6b66dd6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
  4555
!
e9fba6b66dd6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
  4556
2602
a8fcee161334 added: #tagPackage:as:
vrany
parents: 2597
diff changeset
  4557
tagPackage: package as:tag
a8fcee161334 added: #tagPackage:as:
vrany
parents: 2597
diff changeset
  4558
    self tagClasses:(Smalltalk allClassesInPackage:package) as:tag.
4281
7b1c0f0170d0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4276
diff changeset
  4559
    "/ TODO: what about build support files and extensions???
2602
a8fcee161334 added: #tagPackage:as:
vrany
parents: 2597
diff changeset
  4560
a8fcee161334 added: #tagPackage:as:
vrany
parents: 2597
diff changeset
  4561
    "Created: / 12-09-2006 / 13:04:29 / cg"
a8fcee161334 added: #tagPackage:as:
vrany
parents: 2597
diff changeset
  4562
    "Created: / 15-10-2011 / 22:47:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
4281
7b1c0f0170d0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4276
diff changeset
  4563
    "Modified (comment): / 05-12-2017 / 22:58:09 / cg"
2602
a8fcee161334 added: #tagPackage:as:
vrany
parents: 2597
diff changeset
  4564
!
a8fcee161334 added: #tagPackage:as:
vrany
parents: 2597
diff changeset
  4565
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
  4566
tagPath:aPath as:tag usingManager:aManager
4281
7b1c0f0170d0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4276
diff changeset
  4567
    aManager setSymbolicName:tag revision:nil overWrite:true path:aPath.
1782
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  4568
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  4569
    "Modified: / 12-09-2006 / 12:04:44 / cg"
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
  4570
    "Created: / 29-12-2011 / 14:32:38 / cg"
4281
7b1c0f0170d0 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4276
diff changeset
  4571
    "Modified (format): / 05-12-2017 / 22:55:29 / cg"
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4572
! !
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4573
4226
e4ab49b2ce35 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4204
diff changeset
  4574
!SourceCodeManagerUtilities methodsFor:'utilities-scm-helpers'!
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4575
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4576
getMethodVersionsOfClass:aClass selector:selector numberOfRevisions:numberOfRevisionsOrNil
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4577
    "check-out all previous versions of aClass and retrieve the history of selector.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4578
     Return a dictionary associating revision with a changeList entries for that method.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4579
     Unfinished - need a GUI for that."
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4580
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4581
    |mgr theClass revisionLog revisions items s entriesPerRevision previousVersion|
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4582
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4583
    theClass := aClass theNonMetaclass.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4584
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4585
    mgr := self sourceCodeManagerFor:theClass.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4586
    mgr isNil ifTrue:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4587
        self error:'no sourceCodeManager'.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4588
    ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4589
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4590
    revisionLog := mgr
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4591
                        revisionLogOf:theClass
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4592
                        numberOfRevisions:numberOfRevisionsOrNil.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4593
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4594
    revisions := revisionLog at:#revisions.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4595
    items := revisions collect:[:each | |rev date who|
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4596
                                    rev := each at:#revision.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4597
                                    date := each at:#date.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4598
                                    who := each at:#author.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4599
                                    rev allBold , ' [' , date , ' by ' , who , ']'
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4600
                               ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4601
4349
7f65b32fd957 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4338
diff changeset
  4602
    revisions := revisions collectColumn:#revision.
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4603
    revisions addFirst:#current.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4604
    entriesPerRevision := Dictionary new.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4605
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4606
    previousVersion := nil.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4607
    revisions reverseDo:[:eachRevision |
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4608
        |srcStream entries thisVersion|
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4609
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4610
        eachRevision == #current ifTrue:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4611
            s := '' writeStream.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4612
            theClass fileOutOn:s withTimeStamp:false.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4613
            srcStream := s contents readStream.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4614
        ] ifFalse:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4615
            self activityNotification:('checking out revision ' , eachRevision , '...').
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4616
            srcStream := mgr getSourceStreamFor:theClass revision:eachRevision.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4617
        ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4618
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4619
        entries := ChangeSet fromStream:srcStream.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4620
        srcStream close.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4621
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4622
        "/ remove all definitions       
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4623
        entries := entries select:[:each | each isMethodChange].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4624
        "/ remove all methods which are for other selectors      
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4625
        entries := entries select:[:each | each selector == selector].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4626
        "/ remove all methods which are for private subclasses      
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4627
        entries := entries select:[:each | each className = aClass name].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4628
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4629
        entries size == 1 ifTrue:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4630
            "/ the method is there
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4631
            thisVersion := entries first.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4632
            (previousVersion notNil and:[previousVersion sameAs:thisVersion]) ifTrue:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4633
                "/ no change
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4634
            ] ifFalse:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4635
                entriesPerRevision at:eachRevision put:thisVersion.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4636
            ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4637
        ] ifFalse:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4638
            "/ the method is not there
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4639
        ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4640
        previousVersion := thisVersion.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4641
    ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4642
    self error:'unfinished code'.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4643
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4644
    "
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4645
     self getMethodVersionsOfClass:MenuPanel selector:#'helpTextForItem:' numberOfRevisions:20
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4646
     self getMethodVersionsOfClass:NewLauncher class selector:#'menu' numberOfRevisions:20
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4647
    "
4349
7f65b32fd957 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4338
diff changeset
  4648
7f65b32fd957 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4338
diff changeset
  4649
    "Modified: / 22-09-2018 / 11:22:06 / Claus Gittinger"
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4650
! !
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4651
4226
e4ab49b2ce35 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4204
diff changeset
  4652
!SourceCodeManagerUtilities methodsFor:'utilities-scm-user interaction'!
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4653
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4654
askForContainer:boxText title:title note:notice initialModule:initialModule initialPackage:initialPackage initialFileName:initialFileName
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4655
    "open a dialog asking for a source container;
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4656
     return a dictionary containing module, package and filename,
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4657
     or nil if canceled."
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4658
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4659
    ^ self
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4660
        askForContainer:boxText title:title note:notice 
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4661
        initialModule:initialModule initialPackage:initialPackage initialFileName:initialFileName 
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4662
        forNewContainer:true
1026
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  4663
!
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  4664
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4665
askForContainer:boxText title:title note:notice initialModule:initialModule initialPackage:initialPackage initialFileName:initialFileName forNewContainer:forNewContainer
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4666
    "open a dialog asking for a source container;
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4667
     return a dictionary containing module, package and filename,
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4668
     or nil if canceled."
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4669
3551
e8feddd829f9 class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3546
diff changeset
  4670
    |box y component answer
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4671
     moduleHolder packageHolder fileNameHolder
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4672
     module package fileName 
3202
b58b19cac708 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
  4673
     allPackageIDs knownContainers knownPackages packageUpdater
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4674
     packageBoxComponent fileNameBoxComponent fileNameUpdater|
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4675
3967
5bfee3208fb3 #REFACTORING
Claus Gittinger <cg@exept.de>
parents: 3953
diff changeset
  4676
    allPackageIDs := Smalltalk allPackageIDs.
3202
b58b19cac708 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
  4677
b58b19cac708 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
  4678
    knownContainers := allPackageIDs collect:[:package | (package upTo:$:)] as:Set.
b58b19cac708 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
  4679
3394
8e7ee24c6e7b class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3384
diff changeset
  4680
    knownContainers := knownContainers asOrderedCollection reject:[:module | module isBlank].
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4681
    knownContainers sort.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4682
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4683
    packageUpdater := [
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4684
        |theModulePrefix|
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4685
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4686
        theModulePrefix := moduleHolder value , ':'.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4687
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4688
        Cursor wait showWhile:[
3202
b58b19cac708 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
  4689
            knownPackages := 
b58b19cac708 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
  4690
                allPackageIDs
b58b19cac708 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
  4691
                    select:[:package | (package startsWith:theModulePrefix)]
b58b19cac708 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
  4692
                    thenCollect:[:package | |idx|
b58b19cac708 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
  4693
                        idx := package indexOf:$:.
b58b19cac708 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
  4694
                        (package copyFrom:idx + 1)].
b58b19cac708 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
  4695
b58b19cac708 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
  4696
            knownPackages := knownPackages asSet asOrderedCollection.
3291
7fc5a1fea0fd Fix stc compiler warnings
Stefan Vogel <sv@exept.de>
parents: 3287
diff changeset
  4697
            knownPackages := knownPackages reject:[:package | package isBlank].
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4698
            knownPackages sort.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4699
            packageBoxComponent list:knownPackages.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4700
        ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4701
    ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4702
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4703
    fileNameUpdater := [
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4704
        |module package files|
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4705
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4706
        Cursor read showWhile:[
2209
e3a4510c45f2 Project noProjectID -> PackageId noProjectID
Claus Gittinger <cg@exept.de>
parents: 2200
diff changeset
  4707
            module := moduleHolder value ? (PackageId noProjectID).
e3a4510c45f2 Project noProjectID -> PackageId noProjectID
Claus Gittinger <cg@exept.de>
parents: 2200
diff changeset
  4708
            package := packageHolder value ? (PackageId noProjectID).
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4709
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
  4710
            files := SourceCodeManager getExistingContainersInModule:module directory:package.
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4711
            files := files asOrderedCollection.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4712
            files := files select:[:eachFile | eachFile asFilename hasSuffix:'st'].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4713
            files sort.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4714
            fileNameBoxComponent list:files.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4715
        ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4716
    ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4717
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4718
    moduleHolder := initialModule asValue.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4719
    packageHolder := initialPackage asValue.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4720
    fileNameHolder := initialFileName asValue.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4721
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4722
    "/
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4723
    "/ open a dialog for this
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4724
    "/
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4725
    box := DialogBox new.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4726
    box label:title.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4727
3425
05be11d262e2 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3394
diff changeset
  4728
    component := box addTextLabel:boxText withCRs adjust:#left.
05be11d262e2 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3394
diff changeset
  4729
    component borderWidth:0.
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4730
    box addVerticalSpace.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4731
    box addVerticalSpace.
1000
3687dbf412db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 998
diff changeset
  4732
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4733
    y := box yPosition.
3425
05be11d262e2 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3394
diff changeset
  4734
    component := box addTextLabel:(resources string:'Module:') adjust:#right.
05be11d262e2 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3394
diff changeset
  4735
    component width:0.4.
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4736
    box yPosition:y.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4737
    component := box addComboBoxOn:moduleHolder tabable:true.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4738
    component list:knownContainers.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4739
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4740
"/    component := box addInputFieldOn:moduleHolder tabable:true.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4741
    component width:0.6; left:0.4; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4742
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4743
    box addVerticalSpace.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4744
    y := box yPosition.
3425
05be11d262e2 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3394
diff changeset
  4745
    component := box addTextLabel:(resources string:'Package:') adjust:#right.
05be11d262e2 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3394
diff changeset
  4746
    component width:0.4.
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4747
    box yPosition:y.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4748
    packageBoxComponent := component := box addComboBoxOn:packageHolder tabable:true.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4749
"/    component := box addInputFieldOn:packageHolder tabable:true.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4750
    component width:0.6; left:0.4; "immediateAccept:true; "acceptOnLeave:true; cursorMovementWhenUpdating:#beginOfLine.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4751
    packageUpdater value.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4752
    moduleHolder onChangeEvaluate:packageUpdater.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4753
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4754
    box addVerticalSpace.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4755
    y := box yPosition.
3425
05be11d262e2 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3394
diff changeset
  4756
    component := box addTextLabel:(resources string:'Filename:') adjust:#right.
05be11d262e2 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3394
diff changeset
  4757
    component width:0.4.
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4758
    box yPosition:y.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4759
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4760
    forNewContainer ifTrue:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4761
        component := box addInputFieldOn:fileNameHolder tabable:true.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4762
        component width:0.6; left:0.4; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4763
    ] ifFalse:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4764
        fileNameBoxComponent := component := box addComboBoxOn:fileNameHolder tabable:true.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4765
        component width:0.6; left:0.4; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4766
        fileNameUpdater value.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4767
        packageHolder onChangeEvaluate:fileNameUpdater.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4768
    ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4769
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4770
    box addVerticalSpace.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4771
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4772
    notice notNil ifTrue:[
3425
05be11d262e2 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3394
diff changeset
  4773
        component := box addTextLabel:notice adjust:#left.
05be11d262e2 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3394
diff changeset
  4774
        component borderWidth:0.
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4775
    ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4776
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4777
    box addVerticalSpace.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4778
    box addAbortAndOkButtons.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4779
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4780
    (YesToAllNotification notNil and:[YesToAllNotification isHandled]) ifTrue:[
3683
fb6ad154b94d class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3679
diff changeset
  4781
        component := Button label:(resources string:'Yes to All').
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4782
        component action:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4783
                            YesToAllNotification queryWith:true.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4784
                            box doAccept.
2253
7d7b0d2d1fe7 changed: #askForContainer:title:note:initialModule:initialPackage:initialFileName:forNewContainer:
Claus Gittinger <cg@exept.de>
parents: 2242
diff changeset
  4785
                            box okPressed.
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4786
                         ].
3394
8e7ee24c6e7b class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3384
diff changeset
  4787
        box addButton:component.
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4788
    ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4789
    (AbortAllSignal isHandled) ifTrue:[
3683
fb6ad154b94d class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3679
diff changeset
  4790
        component := Button label:(resources string:'Cancel All').
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4791
        component action:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4792
                            box hide.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4793
                            AbortAllSignal raiseSignal.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4794
                         ].
3394
8e7ee24c6e7b class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3384
diff changeset
  4795
        box addButton:component before:nil.
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4796
    ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4797
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4798
    (YesToAllQuery notNil and:[YesToAllQuery isHandled]) ifTrue:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4799
        answer := YesToAllQuery query.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4800
    ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4801
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4802
    answer isNil ifTrue:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4803
        box showAtPointer.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4804
        answer := box accepted
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4805
    ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4806
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4807
    box destroy.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4808
    answer ifFalse:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4809
        ^ nil
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4810
    ].
1000
3687dbf412db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 998
diff changeset
  4811
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4812
    module := moduleHolder value withoutSpaces.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4813
    package := packageHolder value withoutSpaces.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4814
    fileName := fileNameHolder value withoutSpaces.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4815
    ^ Dictionary new
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4816
        at:#module put:module;
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4817
        at:#package put:package;
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4818
        at:#fileName put:fileName;
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4819
        yourself
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4820
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4821
    "
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4822
     self 
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4823
        askForContainer:'enter container' title:'container' note:'some note'
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4824
        initialModule:'foo' initialPackage:'bar' initialFileName:'baz'        
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4825
    "
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
  4826
3394
8e7ee24c6e7b class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3384
diff changeset
  4827
    "Modified: / 29-08-2013 / 12:26:04 / cg"
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4828
!
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4829
2570
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  4830
askForExistingRevision:boxText title:title class:aClass
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  4831
    "open a dialog asking for a containers revision;
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  4832
     return a revision number, or nil if canceled."
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  4833
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  4834
    |mgr sourceInfo module package fileName|
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  4835
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  4836
    mgr := self sourceCodeManagerFor:aClass.
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  4837
    sourceInfo := mgr sourceInfoOfClass:aClass.
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  4838
    sourceInfo isNil ifTrue:[^ nil].
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  4839
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  4840
    package := mgr directoryFromSourceInfo:sourceInfo.
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  4841
    module := mgr moduleFromSourceInfo:sourceInfo.  
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  4842
    fileName := mgr containerFromSourceInfo:sourceInfo.
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  4843
    ^ self
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  4844
        askForExistingRevision:boxText 
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  4845
        title:title 
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  4846
        class:aClass 
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  4847
        manager:mgr 
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  4848
        module:module package:package 
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  4849
        fileName:fileName
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  4850
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  4851
    "
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  4852
     SourceCodeManagerUtilities
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  4853
        askForRevisionToCompare:'enter revision'
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  4854
        title:'revision'
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  4855
        class:Array
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  4856
    "
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  4857
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  4858
    "Modified: / 12-09-2006 / 14:17:04 / cg"
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  4859
!
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  4860
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
  4861
askForExistingRevision:boxText title:title class:clsOrNil manager:aSourceCodeManager module:module package:directory fileName:fileName
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4862
    "open a dialog asking for a containers revision;
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4863
     return a revision number, or nil if canceled."
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4864
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4865
    |partialLog revisions items newestRev
3551
e8feddd829f9 class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3546
diff changeset
  4866
     box y component revisionHolder symbolicNames stableRevision releasedRevision
4287
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  4867
     tagPlusRevisionHolder tagHolder tagList lockChange|
2325
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  4868
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4869
    partialLog := aSourceCodeManager
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4870
        revisionLogOf:clsOrNil
4287
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  4871
        numberOfRevisions:30
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4872
        fileName:fileName
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
  4873
        directory:directory 
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4874
        module:module.
1522
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  4875
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4876
    partialLog notNil ifTrue:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4877
        newestRev := partialLog at:#newestRevision.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4878
        revisions := partialLog at:#revisions.
4287
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  4879
        symbolicNames := partialLog at:#symbolicNames ifAbsent:[nil].
1456
673e4fc61c36 Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents: 1449
diff changeset
  4880
        symbolicNames notNil ifTrue:[
4287
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  4881
            stableRevision := symbolicNames at:'stable' ifAbsent:[nil].
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  4882
            releasedRevision := symbolicNames at:'released' ifAbsent:[nil].
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  4883
            
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  4884
            "/ sort by revision; within same revision, sort by tag name
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  4885
            tagList := (((symbolicNames associations 
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  4886
                            sort:[:a :b | a key < b key "self versionString:(a value) isLessThan:(b value)"])
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  4887
                                stableSort:[:a :b | self versionString:(a value) isLessThan:(b value)])
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  4888
                                    collect:[:assoc | assoc key]) reverse.
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  4889
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  4890
            stableRevision notNil ifTrue:[
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  4891
                tagList remove:'stable'.
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  4892
                tagList notEmpty ifTrue:[
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  4893
                    tagList addFirst:'-'
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  4894
                ].
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  4895
                tagList addFirst:'stable'.
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  4896
            ].
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  4897
            
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  4898
            LastTag notEmptyOrNil ifTrue:[
4174
3b55c406664f #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4160
diff changeset
  4899
                tagList addFirst:LastTag.
4287
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  4900
            ].
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  4901
            tagList := tagList collect:[:tag | 
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  4902
                                    |rev|
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  4903
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  4904
                                    rev := symbolicNames at:tag ifAbsent:[nil].
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  4905
                                    rev isNil ifTrue:[
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  4906
                                        tag
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  4907
                                    ] ifFalse:[
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  4908
                                        tag,((' (', rev value, ')') withColor:(Color grey))
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  4909
                                    ].
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  4910
                                ].
1456
673e4fc61c36 Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents: 1449
diff changeset
  4911
        ].
4007
ffa3939cd5af #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3993
diff changeset
  4912
ffa3939cd5af #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3993
diff changeset
  4913
        "/ fill in timestamps
ffa3939cd5af #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3993
diff changeset
  4914
        revisions do:[:each |
4160
29602d7fb4c9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4132
diff changeset
  4915
            |dateOrDateString timeOrTimeString timestampString timestamp|
29602d7fb4c9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4132
diff changeset
  4916
29602d7fb4c9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4132
diff changeset
  4917
            dateOrDateString := each at:#date ifAbsent:nil.
29602d7fb4c9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4132
diff changeset
  4918
            timeOrTimeString := each at:#time ifAbsent:nil.
29602d7fb4c9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4132
diff changeset
  4919
            dateOrDateString notNil ifTrue:[
29602d7fb4c9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4132
diff changeset
  4920
                dateOrDateString isString ifTrue:[
29602d7fb4c9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4132
diff changeset
  4921
                    timestamp := Timestamp readFrom:dateOrDateString onError:nil.
29602d7fb4c9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4132
diff changeset
  4922
                    timestamp notNil ifTrue:[
29602d7fb4c9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4132
diff changeset
  4923
                        each at:#timestamp put:timestamp.
29602d7fb4c9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4132
diff changeset
  4924
                    ].
29602d7fb4c9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4132
diff changeset
  4925
                ] ifFalse:[
29602d7fb4c9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4132
diff changeset
  4926
                    timeOrTimeString isString ifTrue:[
29602d7fb4c9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4132
diff changeset
  4927
                    self halt.
29602d7fb4c9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4132
diff changeset
  4928
    
29602d7fb4c9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4132
diff changeset
  4929
                    ] ifFalse:[
29602d7fb4c9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4132
diff changeset
  4930
                        (dateOrDateString notNil and:[timeOrTimeString notNil]) ifTrue:[
29602d7fb4c9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4132
diff changeset
  4931
                            timestamp := Timestamp fromDate:dateOrDateString andTime:timeOrTimeString.
29602d7fb4c9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4132
diff changeset
  4932
                            each at:#timestamp put:timestamp.
29602d7fb4c9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4132
diff changeset
  4933
                        ] ifFalse:[
29602d7fb4c9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4132
diff changeset
  4934
                            self halt
29602d7fb4c9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4132
diff changeset
  4935
                        ]    
29602d7fb4c9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4132
diff changeset
  4936
                    ]
29602d7fb4c9 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4132
diff changeset
  4937
                ].    
4007
ffa3939cd5af #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3993
diff changeset
  4938
            ].
ffa3939cd5af #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3993
diff changeset
  4939
        ].
ffa3939cd5af #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3993
diff changeset
  4940
ffa3939cd5af #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3993
diff changeset
  4941
        items := revisions 
ffa3939cd5af #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3993
diff changeset
  4942
                    collectWithIndex:[:each :idx| 
4410
bc87f63d00b9 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4402
diff changeset
  4943
                        |item rev timestamp date time dateAndTimeString who flag reason
4007
ffa3939cd5af #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3993
diff changeset
  4944
                         prevInfo prevDate nextInfo nextDate dateDifferentToPrev dateDifferentToNext|
ffa3939cd5af #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3993
diff changeset
  4945
ffa3939cd5af #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3993
diff changeset
  4946
                        rev := each at:#revision.
ffa3939cd5af #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3993
diff changeset
  4947
ffa3939cd5af #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3993
diff changeset
  4948
                        timestamp := each at:#timestamp.
ffa3939cd5af #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3993
diff changeset
  4949
                        timestamp notNil ifTrue:[
4410
bc87f63d00b9 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4402
diff changeset
  4950
                            date := each at:#date.
4007
ffa3939cd5af #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3993
diff changeset
  4951
                            date = Date today ifTrue:[
ffa3939cd5af #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3993
diff changeset
  4952
                                dateAndTimeString := timestamp asTime printString.
ffa3939cd5af #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3993
diff changeset
  4953
                            ] ifFalse:[
ffa3939cd5af #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3993
diff changeset
  4954
                                "/ if date is different to both previous AND next,
ffa3939cd5af #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3993
diff changeset
  4955
                                "/ only show the date
ffa3939cd5af #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3993
diff changeset
  4956
                                dateDifferentToPrev := dateDifferentToNext := false.
ffa3939cd5af #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3993
diff changeset
  4957
                                (idx > 1) ifTrue:[
ffa3939cd5af #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3993
diff changeset
  4958
                                    prevInfo := revisions at:idx-1.
4410
bc87f63d00b9 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4402
diff changeset
  4959
                                    prevDate := prevInfo at:#date ifAbsent:nil.
bc87f63d00b9 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4402
diff changeset
  4960
                                    dateDifferentToPrev := prevDate notNil and:[prevDate ~= date].
4007
ffa3939cd5af #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3993
diff changeset
  4961
                                ].
ffa3939cd5af #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3993
diff changeset
  4962
                                (idx < revisions size) ifTrue:[
ffa3939cd5af #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3993
diff changeset
  4963
                                    nextInfo := revisions at:idx+1.
4410
bc87f63d00b9 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4402
diff changeset
  4964
                                    nextDate := nextInfo at:#date ifAbsent:nil.
bc87f63d00b9 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4402
diff changeset
  4965
                                    dateDifferentToNext := nextDate notNil and:[nextDate ~= date].
4007
ffa3939cd5af #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3993
diff changeset
  4966
                                ].
4410
bc87f63d00b9 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4402
diff changeset
  4967
                                dateDifferentToPrev & dateDifferentToPrev ifTrue:[
4007
ffa3939cd5af #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3993
diff changeset
  4968
                                    dateAndTimeString := date printString.
ffa3939cd5af #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3993
diff changeset
  4969
                                ] ifFalse:[
ffa3939cd5af #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3993
diff changeset
  4970
                                    dateAndTimeString := date printString,' ',(timestamp asTime printString).
ffa3939cd5af #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3993
diff changeset
  4971
                                ]
ffa3939cd5af #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3993
diff changeset
  4972
                            ].
ffa3939cd5af #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3993
diff changeset
  4973
                        ] ifFalse:[
ffa3939cd5af #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3993
diff changeset
  4974
                            dateAndTimeString := (each at:#date ifAbsent:nil) ? '(unknown time)'.
ffa3939cd5af #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3993
diff changeset
  4975
                        ].
ffa3939cd5af #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3993
diff changeset
  4976
                        who := (each at:#author ifAbsent:nil) ? '?'.
ffa3939cd5af #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3993
diff changeset
  4977
                        rev = stableRevision ifTrue:[
ffa3939cd5af #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3993
diff changeset
  4978
                            flag := ' Stable' allBold.
ffa3939cd5af #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3993
diff changeset
  4979
                        ] ifFalse:[rev = releasedRevision ifTrue:[
ffa3939cd5af #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3993
diff changeset
  4980
                            flag := ' Released' allBold.
ffa3939cd5af #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3993
diff changeset
  4981
                        ] ifFalse:[
ffa3939cd5af #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3993
diff changeset
  4982
                            flag := ''
ffa3939cd5af #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3993
diff changeset
  4983
                        ]].
4410
bc87f63d00b9 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4402
diff changeset
  4984
                        reason := each loggedReason.
bc87f63d00b9 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4402
diff changeset
  4985
                        item := '%1%2 [%3 by %4 (%5 %6)]' bindWith:rev allBold with:flag with:dateAndTimeString 
bc87f63d00b9 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4402
diff changeset
  4986
                                                  with:who with:reason with:each changedLinesInfo.
bc87f63d00b9 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4402
diff changeset
  4987
                        reason = 'BUGFIX' ifTrue:[
bc87f63d00b9 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4402
diff changeset
  4988
                            item colorizeAllWith:Color red
bc87f63d00b9 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4402
diff changeset
  4989
                        ] ifFalse:[reason = 'DOCUMENTATION' ifTrue:[
bc87f63d00b9 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4402
diff changeset
  4990
                            item colorizeAllWith:Color grey
bc87f63d00b9 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4402
diff changeset
  4991
                        ] ifFalse:[
bc87f63d00b9 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4402
diff changeset
  4992
                            item
bc87f63d00b9 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4402
diff changeset
  4993
                        ]]
4007
ffa3939cd5af #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3993
diff changeset
  4994
                   ].
ffa3939cd5af #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 3993
diff changeset
  4995
4349
7f65b32fd957 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4338
diff changeset
  4996
        revisions := revisions collectColumn:#revision.
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4997
    ] ifFalse:[
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
  4998
        newestRev := aSourceCodeManager newestRevisionInFile:fileName directory:directory module:module.
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4999
        revisions := items := nil.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5000
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5001
        newestRev isNil ifTrue:[
4226
e4ab49b2ce35 #REFACTORING by cg
Claus Gittinger <cg@exept.de>
parents: 4204
diff changeset
  5002
            (aSourceCodeManager checkForExistingContainer:fileName inModule:module directory:directory warn:true)
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5003
            ifFalse:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5004
                ^ nil
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5005
            ]
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5006
        ]
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5007
    ].
2325
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  5008
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  5009
    lockChange := false.
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  5010
    revisionHolder := newestRev asValue.
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5011
    revisionHolder onChangeEvaluate:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5012
        "/ cut off everything after revision
2325
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  5013
        |s first words tag|
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5014
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5015
        s := revisionHolder value.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5016
        words := s asCollectionOfWords.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5017
        words size > 0 ifTrue:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5018
            first := words first string.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5019
            first ~= s ifTrue:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5020
                revisionHolder value:first
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5021
            ]
2325
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  5022
        ].
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  5023
        lockChange ifFalse:[
4287
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  5024
            tagPlusRevisionHolder value:''.
2325
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  5025
            tagHolder value:''
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  5026
        ].
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5027
    ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5028
2325
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  5029
    tagHolder := '' asValue.
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  5030
    tagHolder 
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  5031
        onChangeEvaluate:[
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  5032
            |tag rev|
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  5033
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  5034
            (tag := tagHolder value) notEmptyOrNil ifTrue:[
4192
3651741019db #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4179
diff changeset
  5035
                "/ LastTag := tag.
4287
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  5036
                rev := symbolicNames at:tag ifAbsent:[nil].
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  5037
                (rev notNil and:[rev ~= revisionHolder value]) ifTrue:[
2325
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  5038
                    lockChange := true.
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  5039
                    revisionHolder value:rev.
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  5040
                    lockChange := false.
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  5041
                ].
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  5042
            ]
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  5043
        ].
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  5044
4287
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  5045
    tagPlusRevisionHolder := '' asValue.
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  5046
    tagPlusRevisionHolder
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  5047
        onChangeEvaluate:[
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  5048
            |tagPlusRevision tag|
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  5049
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  5050
            (tagPlusRevision := tagPlusRevisionHolder value) notEmptyOrNil ifTrue:[
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  5051
                tag := (tagPlusRevision string upTo:$( ) withoutSeparators.
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  5052
                tagHolder value:tag.
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  5053
            ]
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  5054
        ].
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  5055
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5056
    "/
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5057
    "/ open a dialog for this
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5058
    "/
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5059
    box := DialogBox new.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5060
    box label:title.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5061
3425
05be11d262e2 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3394
diff changeset
  5062
    component := box addTextLabel:boxText withCRs adjust:#left.
05be11d262e2 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3394
diff changeset
  5063
    component borderWidth:0.
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5064
    box addVerticalSpace.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5065
    box addVerticalSpace.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5066
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5067
    y := box yPosition.
3425
05be11d262e2 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3394
diff changeset
  5068
    component := box addTextLabel:(resources string:'Revision:') adjust:#right.
05be11d262e2 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3394
diff changeset
  5069
    component width:0.4.
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5070
    box yPosition:y.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5071
    component := box addComboBoxOn:revisionHolder tabable:true.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5072
    component list:items.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5073
    component width:0.6; left:0.4; immediateAccept:true; acceptOnLeave:false; cursorMovementWhenUpdating:#beginOfLine.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5074
2325
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  5075
    y := box yPosition.
3425
05be11d262e2 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3394
diff changeset
  5076
    component := box addTextLabel:(resources string:'or Tag:') adjust:#right.
05be11d262e2 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3394
diff changeset
  5077
    component width:0.4.
2325
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  5078
    box yPosition:y.
4287
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  5079
    component := box addComboListOn:tagPlusRevisionHolder tabable:true.
2325
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  5080
    component list:tagList.
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  5081
    component width:0.6; left:0.4.
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  5082
    tagList isNil ifTrue:[
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  5083
        component disable
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  5084
    ].
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  5085
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5086
    box addVerticalSpace.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5087
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5088
    box addAbortAndOkButtons.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5089
2325
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  5090
    AbortAllOperationWantedQuery query ifTrue:[
4410
bc87f63d00b9 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4402
diff changeset
  5091
        (box addAbortButtonLabelled:'Cancel all') action:[AbortAllOperationRequest raise].
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5092
    ].
4192
3651741019db #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4179
diff changeset
  5093
    LastTag notEmptyOrNil ifTrue:[
4193
6a4b646749ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4192
diff changeset
  5094
        (symbolicNames notNil and:[symbolicNames includesKey:LastTag]) ifTrue:[
6a4b646749ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4192
diff changeset
  5095
            tagHolder value:LastTag.
6a4b646749ea #BUGFIX by cg
Claus Gittinger <cg@exept.de>
parents: 4192
diff changeset
  5096
        ].
4192
3651741019db #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4179
diff changeset
  5097
    ].
3651741019db #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4179
diff changeset
  5098
    
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5099
    box showAtPointer.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5100
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5101
    box accepted ifFalse:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5102
        box destroy.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5103
        ^ nil
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5104
    ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5105
    box destroy.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5106
4192
3651741019db #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4179
diff changeset
  5107
    LastTag := tagHolder value.
3651741019db #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4179
diff changeset
  5108
    
3865
b76ba0a9cf83 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3847
diff changeset
  5109
    "/ it is not a good idea to return the tag-name here,
b76ba0a9cf83 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3847
diff changeset
  5110
    "/ because it may get cached later when the source is fetched,
b76ba0a9cf83 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3847
diff changeset
  5111
    "/ and the tag could move to another version (making the cached file invalid)
b76ba0a9cf83 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3847
diff changeset
  5112
    "/ without me knowing about that fact.
b76ba0a9cf83 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3847
diff changeset
  5113
    "/ Therefore, we should return the real revision number.
b76ba0a9cf83 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3847
diff changeset
  5114
b76ba0a9cf83 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3847
diff changeset
  5115
    "/ ouch: however, checkout of a branch seems to not work the same way
b76ba0a9cf83 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3847
diff changeset
  5116
    "/ so we DO return the tag, but suppress caching it. sigh.
3551
e8feddd829f9 class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3546
diff changeset
  5117
    ^ (tagHolder value notEmptyOrNil ifTrue:[tagHolder] ifFalse:[revisionHolder]) value withoutSpaces.
3865
b76ba0a9cf83 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3847
diff changeset
  5118
    "/ ^ revisionHolder value withoutSpaces.
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5119
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5120
    "
4287
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  5121
     CVSSourceCodeManager utilities
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  5122
        askForExistingRevision:'enter revision'
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5123
        title:'revision'
4287
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  5124
        class:Array
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  5125
        manager:CVSSourceCodeManager 
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5126
        module:'stx'
4287
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  5127
        package:'libbasic'
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  5128
        fileName:nil
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5129
    "
1522
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  5130
4287
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  5131
    "Modified: / 06-12-2017 / 12:30:32 / cg"
4410
bc87f63d00b9 #FEATURE by stefan
Stefan Vogel <sv@exept.de>
parents: 4402
diff changeset
  5132
    "Modified: / 12-03-2019 / 11:46:34 / Stefan Vogel"
4421
d992c2e999b4 #DOCUMENTATION by cg
Claus Gittinger <cg@exept.de>
parents: 4416
diff changeset
  5133
    "Modified: / 12-05-2019 / 13:04:06 / Claus Gittinger"
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5134
!
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5135
1426
609f0db77471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1424
diff changeset
  5136
checkAndWarnAboutBadMessagesInClass:aClass checkAgainHolder:checkAgainHolder
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5137
    "check if a class contains message-sends to:
2237
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  5138
        #halt , #halt:
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5139
        #error
2237
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  5140
        #todo , #todo:
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  5141
        (and maybe more in the future)
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  5142
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  5143
     Only checks in non-extension methods - as this is only called when checking "
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5144
1994
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5145
    |badStuff whatIsBad msg answer labels values defaultAnswer dontShowAgain
3551
e8feddd829f9 class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3546
diff changeset
  5146
     methodsWithBadStuff|
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5147
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5148
    badStuff := #(
2237
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  5149
        ( halt         'send of #halt (use for debugging only) - better use #error:''some message'' or #breakPoint:')
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  5150
        ( halt:        'send of #halt: (use for debugging only) - better use #error: or #breakPoint:')
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  5151
        ( error        'send of #error without descriptive message - better use #error:''some message''' )
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  5152
        ( todo         'send of #todo - unfinished code present?' )
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  5153
        ( todo:        'send of #todo:- unfinished code present?' )
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5154
    ).
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5155
1994
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5156
    methodsWithBadStuff := Set new.
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5157
    whatIsBad := Set new.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5158
    aClass theNonMetaclass instAndClassSelectorsAndMethodsDo:[:sel :mthd |
2237
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  5159
        |setOfLiterals setOfSentMessages|
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  5160
2977
e5bfe652373f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 2974
diff changeset
  5161
        mthd isExtension ifFalse:[
2237
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  5162
            setOfLiterals := mthd literals.  "/ try without parsing first.
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  5163
            (badStuff contains:[:eachEntry | setOfLiterals includes:eachEntry first]) ifTrue:[
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  5164
                setOfSentMessages := mthd messagesSent.
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  5165
                badStuff do:[:eachEntry | 
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  5166
                    (setOfSentMessages includes:eachEntry first) ifTrue:[
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  5167
                        whatIsBad add:eachEntry second.
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  5168
                        methodsWithBadStuff add:mthd.
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  5169
                    ]
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  5170
                ].
1000
3687dbf412db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 998
diff changeset
  5171
            ].
3687dbf412db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 998
diff changeset
  5172
        ].
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5173
    ].
1994
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5174
    whatIsBad isEmpty ifTrue:[^ true].
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5175
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5176
    (YesToAllQuery notNil and:[YesToAllQuery isHandled]) ifTrue:[
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5177
        answer := YesToAllQuery query.
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5178
        answer notNil ifTrue:[ ^ answer ].
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5179
    ].
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5180
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5181
    msg := resources string:'%1 contains the following (considered bad style) message sends:' with:aClass name.
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5182
    msg := msg , '\\'.
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5183
    whatIsBad do:[:each |
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5184
        msg := msg , '   ' , each , '\'
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5185
    ].
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5186
    msg := msg , '\'.
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5187
    methodsWithBadStuff size == 1 ifTrue:[
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5188
        msg := msg , (resources string:'In %1.' 
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5189
                        with:methodsWithBadStuff anElement whoString allBold).
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5190
    ] ifFalse:[
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5191
        msg := msg , (resources string:'In %1 and %2 other methods.' 
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5192
                        with:methodsWithBadStuff anElement whoString allBold 
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5193
                        with:methodsWithBadStuff size-1).
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5194
    ].
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5195
    msg := msg , '\\' , (resources string:'Do you really want to checkIn the %1 class ?' with:aClass name).
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5196
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5197
    (YesToAllNotification notNil and:[YesToAllNotification isHandled]) ifTrue:[
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5198
        labels := #('Cancel All' 'Cancel' 'No to All' 'No' 'No, Browse' 'Yes to All' 'Yes') "#('Yes' 'Yes to All' 'No' 'No to All' 'Cancel')".
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5199
        values := #(#cancelAll nil #noToAll #noBrowse false #yesToAll true) "#(true #yesToAll false #noToAll nil)".
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5200
        defaultAnswer := #yesToAll.
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5201
    ] ifFalse:[
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5202
        labels := #('No' 'No, Browse' 'Yes').
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5203
        values := #(false #noBrowse true).
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5204
        defaultAnswer := true.
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5205
    ].
1426
609f0db77471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1424
diff changeset
  5206
1456
673e4fc61c36 Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents: 1449
diff changeset
  5207
"/        AbortAllOperationRequest isHandled ifTrue:[
1426
609f0db77471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1424
diff changeset
  5208
"/            labels := #('Cancel All') , labels.
609f0db77471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1424
diff changeset
  5209
"/            values := #(#cancelAll) , values.
609f0db77471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1424
diff changeset
  5210
"/        ].
609f0db77471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1424
diff changeset
  5211
3812
173678af0074 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3692
diff changeset
  5212
    Dialog modifyingBoxWith:[:box |
1994
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5213
        checkAgainHolder isValueModel ifTrue:[
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5214
            dontShowAgain := checkAgainHolder value not asValue.
3812
173678af0074 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3692
diff changeset
  5215
            box addCheckBoxAtBottom:(resources string:'Do not show this Dialog again (reenable in Launcher).')
2129
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  5216
                on:dontShowAgain.
1426
609f0db77471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1424
diff changeset
  5217
        ].
1994
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5218
    ] do:[
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5219
        answer := OptionBox 
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5220
                      request:msg withCRs
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5221
                      label:(resources string:'Really CheckIn ?')
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5222
                      image:(InfoBox iconBitmap)
3551
e8feddd829f9 class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3546
diff changeset
  5223
                      buttonLabels:(Dialog classResources array:labels)
1994
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5224
                      values:values
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5225
                      default:defaultAnswer
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5226
                      onCancel:nil.
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5227
    ].
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5228
    answer isNil ifTrue:[
3433
eee3079d18d3 AbortSignal -> AbortOperationRequest
Stefan Vogel <sv@exept.de>
parents: 3425
diff changeset
  5229
        AbortOperationRequest raise.
1994
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5230
    ].
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5231
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5232
    dontShowAgain notNil ifTrue:[
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5233
        checkAgainHolder value:dontShowAgain value not 
1000
3687dbf412db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 998
diff changeset
  5234
    ].
1994
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5235
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5236
    answer == #noBrowse ifTrue:[
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5237
        UserPreferences browserClass browseMethods:methodsWithBadStuff title:'Methods with Bad Stuff'.
1995
f832f7ec6ccf Don't use possibly uninitialized class variable
Stefan Vogel <sv@exept.de>
parents: 1994
diff changeset
  5238
        self yesToAllNotification queryWith:false.
1994
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5239
        ^ false
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5240
    ].
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5241
    answer == #cancelAll ifTrue:[
3433
eee3079d18d3 AbortSignal -> AbortOperationRequest
Stefan Vogel <sv@exept.de>
parents: 3425
diff changeset
  5242
        AbortOperationRequest raise.
1994
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5243
    ].
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5244
    answer == #yesToAll ifTrue:[
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5245
        YesToAllNotification queryWith:true.
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5246
        ^ true
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5247
    ].
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5248
    answer == #noToAll ifTrue:[
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5249
        YesToAllNotification queryWith:false.
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5250
        ^ false
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5251
    ].
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  5252
    ^ answer
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5253
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5254
    "
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5255
     self checkAndWarnAboutBadMessagesInClass:(SourceCodeManagerUtilities)  
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5256
    "
2775
d1908ae4aed8 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2774
diff changeset
  5257
d1908ae4aed8 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2774
diff changeset
  5258
    "Modified: / 28-02-2012 / 10:41:38 / cg"
1460
2e1c304e5b52 Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents: 1456
diff changeset
  5259
!
2e1c304e5b52 Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents: 1456
diff changeset
  5260
2129
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  5261
getCheckinInfoFor:aClassNameOrPackageNameString initialAnswer:initialAnswerOrNil
2283
2de925716786 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  5262
    "ask for a log message for checking in a class (plus checkinQuick state info),
2de925716786 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  5263
     and other info (mark as stable, for example).
2de925716786 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  5264
     Return the info-object (actually: the dialog) or nil if aborted."
1460
2e1c304e5b52 Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents: 1456
diff changeset
  5265
1704
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  5266
    ^ self
2129
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  5267
        getCheckinInfoFor:aClassNameOrPackageNameString 
1704
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  5268
        initialAnswer:initialAnswerOrNil
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  5269
        withQuickOption:false
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  5270
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  5271
    "
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  5272
     SourceCodeManagerUtilities getCheckinInfoFor:'hello' initialAnswer:'bla'
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  5273
    "
1460
2e1c304e5b52 Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents: 1456
diff changeset
  5274
2283
2de925716786 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  5275
    "Modified: / 06-07-2010 / 11:22:15 / cg"
1704
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  5276
!
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  5277
2129
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  5278
getCheckinInfoFor:aClassNameOrPackageNameString initialAnswer:initialAnswerOrNil withQuickOption:withQuickOption
2283
2de925716786 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  5279
    "ask for a log message for checking in a class (plus checkinQuick state info),
2de925716786 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  5280
     and other info (mark as stable, for example).
2106
35b6c567ff7e comment
Claus Gittinger <cg@exept.de>
parents: 2097
diff changeset
  5281
     Return the info-object (actually: the dialog) or nil if aborted."
35b6c567ff7e comment
Claus Gittinger <cg@exept.de>
parents: 2097
diff changeset
  5282
3140
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
  5283
    ^  self 
4079
05771563133b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4058
diff changeset
  5284
        getCheckinInfoFor:aClassNameOrPackageNameString initialAnswer:initialAnswerOrNil 
05771563133b #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4058
diff changeset
  5285
        withQuickOption:withQuickOption
3140
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
  5286
        withValidateConsistencyOption:false
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
  5287
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
  5288
    "
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
  5289
     SourceCodeManagerUtilities default getCheckinInfoFor:'hello' initialAnswer:'bla'
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
  5290
    "
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
  5291
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
  5292
    "Modified: / 12-03-2012 / 13:12:40 / cg"
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
  5293
!
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
  5294
4272
d0105e003a5a #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4266
diff changeset
  5295
getCheckinInfoFor:infoString initialAnswer:initialAnswerOrNil withQuickOption:withQuickOption withValidateConsistencyOption:withValidateConsistencyOption
3140
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
  5296
    "ask for a log message for checking in a class (plus checkinQuick state info),
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
  5297
     and other info (mark as stable, for example).
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
  5298
     Return the info-object (actually: the dialog) or nil if aborted."
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
  5299
4320
a8d8e5c80595 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4301
diff changeset
  5300
    ^ self
a8d8e5c80595 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4301
diff changeset
  5301
        getCheckinInfoFor:infoString initialAnswer:initialAnswerOrNil 
a8d8e5c80595 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4301
diff changeset
  5302
        withQuickOption:withQuickOption withValidateConsistencyOption:withValidateConsistencyOption
a8d8e5c80595 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4301
diff changeset
  5303
        showChangesAction:nil
a8d8e5c80595 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4301
diff changeset
  5304
a8d8e5c80595 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4301
diff changeset
  5305
    "
a8d8e5c80595 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4301
diff changeset
  5306
     SourceCodeManagerUtilities default getCheckinInfoFor:'hello' initialAnswer:'bla'
a8d8e5c80595 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4301
diff changeset
  5307
    "
a8d8e5c80595 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4301
diff changeset
  5308
a8d8e5c80595 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4301
diff changeset
  5309
    "Modified: / 12-03-2012 / 13:12:40 / cg"
a8d8e5c80595 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4301
diff changeset
  5310
    "Modified (format): / 04-12-2017 / 23:07:39 / cg"
a8d8e5c80595 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4301
diff changeset
  5311
!
a8d8e5c80595 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4301
diff changeset
  5312
a8d8e5c80595 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4301
diff changeset
  5313
getCheckinInfoFor:infoString initialAnswer:initialAnswerOrNil 
a8d8e5c80595 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4301
diff changeset
  5314
    withQuickOption:withQuickOption withValidateConsistencyOption:withValidateConsistencyOption
a8d8e5c80595 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4301
diff changeset
  5315
    showChangesAction:showChangesActionOrNil
a8d8e5c80595 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4301
diff changeset
  5316
a8d8e5c80595 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4301
diff changeset
  5317
    "ask for a log message for checking in a class (plus checkinQuick state info),
a8d8e5c80595 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4301
diff changeset
  5318
     and other info (mark as stable, for example).
a8d8e5c80595 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4301
diff changeset
  5319
     Return the info-object (actually: the dialog) or nil if aborted."
a8d8e5c80595 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4301
diff changeset
  5320
2106
35b6c567ff7e comment
Claus Gittinger <cg@exept.de>
parents: 2097
diff changeset
  5321
    |logMsg infoDialog|
35b6c567ff7e comment
Claus Gittinger <cg@exept.de>
parents: 2097
diff changeset
  5322
4320
a8d8e5c80595 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4301
diff changeset
  5323
    infoDialog := Tools::CheckinInfoDialog new
a8d8e5c80595 #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4301
diff changeset
  5324
                    showChangesAction:showChangesActionOrNil;
4272
d0105e003a5a #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4266
diff changeset
  5325
                    getCheckinInfoFor:infoString 
2795
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
  5326
                    initialAnswer:(initialAnswerOrNil ? LastSourceLogMessage)
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
  5327
                    withQuickOption:withQuickOption
3140
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
  5328
                    logHistory:(LastSourceLogMessages ? #())
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
  5329
                    withValidateConsistencyOption:withValidateConsistencyOption.
2795
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
  5330
2106
35b6c567ff7e comment
Claus Gittinger <cg@exept.de>
parents: 2097
diff changeset
  5331
    infoDialog notNil ifTrue:[
35b6c567ff7e comment
Claus Gittinger <cg@exept.de>
parents: 2097
diff changeset
  5332
        logMsg := infoDialog logMessage.
2284
624993d61344 comment
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
  5333
        logMsg notEmptyOrNil ifTrue:[
2795
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
  5334
            LastSourceLogMessage := logMsg.
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
  5335
            LastSourceLogMessages isNil ifTrue:[
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
  5336
                LastSourceLogMessages := OrderedCollection new.
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
  5337
            ].
2796
78401b160a28 changed: #getCheckinInfoFor:initialAnswer:withQuickOption:
Claus Gittinger <cg@exept.de>
parents: 2795
diff changeset
  5338
            LastSourceLogMessages remove:logMsg ifAbsent:[].
2795
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
  5339
            LastSourceLogMessages addFirst:logMsg.
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
  5340
            LastSourceLogMessages size > 10 ifTrue:[
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
  5341
                LastSourceLogMessages removeLast
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
  5342
            ].
1460
2e1c304e5b52 Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents: 1456
diff changeset
  5343
        ].
2e1c304e5b52 Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents: 1456
diff changeset
  5344
    ].
2106
35b6c567ff7e comment
Claus Gittinger <cg@exept.de>
parents: 2097
diff changeset
  5345
    ^ infoDialog
1460
2e1c304e5b52 Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents: 1456
diff changeset
  5346
2e1c304e5b52 Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents: 1456
diff changeset
  5347
    "
2795
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
  5348
     SourceCodeManagerUtilities default getCheckinInfoFor:'hello' initialAnswer:'bla'
1460
2e1c304e5b52 Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents: 1456
diff changeset
  5349
    "
1501
6bb154127b0f CheckInDialog class moved
Claus Gittinger <cg@exept.de>
parents: 1500
diff changeset
  5350
2796
78401b160a28 changed: #getCheckinInfoFor:initialAnswer:withQuickOption:
Claus Gittinger <cg@exept.de>
parents: 2795
diff changeset
  5351
    "Modified: / 12-03-2012 / 13:12:40 / cg"
4272
d0105e003a5a #FEATURE by cg
Claus Gittinger <cg@exept.de>
parents: 4266
diff changeset
  5352
    "Modified (format): / 04-12-2017 / 23:07:39 / cg"
2129
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  5353
!
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  5354
3344
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  5355
revisionForSymbolicName:tag class:cls fileName:classFileName directory:packageDir module:moduleDir manager:aSourceCodeManager
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  5356
    "given a tag, return the corresponding revision"
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  5357
4287
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  5358
    ^ aSourceCodeManager revisionForSymbolicName:tag class:cls fileName:classFileName directory:packageDir module:moduleDir
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  5359
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  5360
    "
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  5361
     CVSSourceCodeManager 
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  5362
        revisionForSymbolicName:'stable' 
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  5363
        class:Array fileName:'Array.st' 
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  5364
        directory:'libbasic' module:'stx' 
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  5365
    "
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  5366
c9ef4001cebd #UI_ENHANCEMENT by cg
Claus Gittinger <cg@exept.de>
parents: 4281
diff changeset
  5367
    "Modified (format): / 06-12-2017 / 11:45:12 / cg"
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5368
! !
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  5369
873
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  5370
!SourceCodeManagerUtilities class methodsFor:'documentation'!
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  5371
2487
c8f4417b9edc changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents: 2484
diff changeset
  5372
version
3892
3e7000585011 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3865
diff changeset
  5373
    ^ '$Header$'
2487
c8f4417b9edc changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents: 2484
diff changeset
  5374
!
c8f4417b9edc changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents: 2484
diff changeset
  5375
2175
50349cb87bf4 changed:
fm
parents: 2161
diff changeset
  5376
version_CVS
3892
3e7000585011 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3865
diff changeset
  5377
    ^ '$Header$'
873
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  5378
! !
3134
93b8f75424c5 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 2977
diff changeset
  5379