SourceCodeManagerUtilities.st
author Stefan Vogel <sv@exept.de>
Thu, 16 Apr 2015 11:35:17 +0200
changeset 3847 94661e33541c
parent 3818 25607a4f1e98
child 3849 3c85146be3fa
child 3865 b76ba0a9cf83
permissions -rw-r--r--
class: SourceCodeManagerUtilities added: #tagClasses:as:revision: changed: #tagClasses:as:
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3812
173678af0074 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3692
diff changeset
     1
"{ Encoding: utf8 }"
173678af0074 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3692
diff changeset
     2
906
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
     3
"
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
     4
 COPYRIGHT (c) 2000 eXept Software AG
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
     5
              All Rights Reserved
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
     6
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
     7
 This software is furnished under a license and may be used
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
     8
 only in accordance with the terms of that license and with the
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
     9
 inclusion of the above copyright notice.   This software may not
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
    10
 be provided or otherwise made available to, or used by, any
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
    11
 other person.  No title to or ownership of the software is
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
    12
 hereby transferred.
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
    13
"
920
ab68cf4c6ee6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
    14
"{ Package: 'stx:libbasic3' }"
ab68cf4c6ee6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
    15
3812
173678af0074 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3692
diff changeset
    16
"{ NameSpace: Smalltalk }"
173678af0074 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3692
diff changeset
    17
873
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
Object subclass:#SourceCodeManagerUtilities
2847
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
    19
	instanceVariableNames:'manager resources confirmNewFiles'
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
    20
	classVariableNames:'LastSourceLogMessage LastModule LastPackage YesToAllQuery
3635
765b567f596a oops - a global variable named "Default" was introduced
Claus Gittinger <cg@exept.de>
parents: 3633
diff changeset
    21
		YesToAllNotification LastSourceLogMessages DefaultUtilities'
2847
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
    22
	poolDictionaries:''
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
    23
	category:'System-SourceCodeManagement'
873
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
!
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
!SourceCodeManagerUtilities class methodsFor:'documentation'!
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
906
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
    28
copyright
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
    29
"
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
    30
 COPYRIGHT (c) 2000 eXept Software AG
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
    31
              All Rights Reserved
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
    32
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
    33
 This software is furnished under a license and may be used
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
    34
 only in accordance with the terms of that license and with the
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
    35
 inclusion of the above copyright notice.   This software may not
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
    36
 be provided or otherwise made available to, or used by, any
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
    37
 other person.  No title to or ownership of the software is
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
    38
 hereby transferred.
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
!
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
    42
873
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
documentation
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
"
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
    utility code which is useful at more than one place
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
    (extracted from the browser)
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
    [author:]
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
        Claus Gittinger (cg@exept)
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    50
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51
    [see also:]
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
    [instance variables:]
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
    [class variables:]
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
"
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    57
! !
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    58
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
    59
!SourceCodeManagerUtilities class methodsFor:'instance creation'!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
    60
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
    61
forManager: aSourceCodeManager
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
    62
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
    63
    ^self new setManager: aSourceCodeManager
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
    64
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
    65
    "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
    66
!
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
    67
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
    68
new
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
    69
    "return an initialized instance"
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
    70
2969
3549ac095c10 changed: #new
Claus Gittinger <cg@exept.de>
parents: 2950
diff changeset
    71
    self == SourceCodeManagerUtilities ifTrue:[ 
3549ac095c10 changed: #new
Claus Gittinger <cg@exept.de>
parents: 2950
diff changeset
    72
        self abstractClassInstantiationError
3549ac095c10 changed: #new
Claus Gittinger <cg@exept.de>
parents: 2950
diff changeset
    73
    ].
2597
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
    74
    ^ self basicNew initialize.
2847
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
    75
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
    76
    "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
    77
! !
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
    78
992
83f257a4fa0c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
    79
!SourceCodeManagerUtilities class methodsFor:'Signal constants'!
83f257a4fa0c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
    80
83f257a4fa0c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
    81
yesToAllNotification
83f257a4fa0c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
    82
    YesToAllNotification isNil ifTrue:[
83f257a4fa0c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
    83
        YesToAllNotification := QuerySignal new.
83f257a4fa0c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
    84
    ].
83f257a4fa0c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
    85
    ^ YesToAllNotification
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
83f257a4fa0c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
    88
yesToAllQuery
83f257a4fa0c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
    89
    YesToAllQuery isNil ifTrue:[
83f257a4fa0c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
    90
        YesToAllQuery := QuerySignal new.
83f257a4fa0c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
    91
    ].
83f257a4fa0c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
    92
    ^ YesToAllQuery
83f257a4fa0c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
    93
! !
83f257a4fa0c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
    94
1084
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
    95
!SourceCodeManagerUtilities class methodsFor:'accessing'!
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
    96
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
    97
default
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
    98
3635
765b567f596a oops - a global variable named "Default" was introduced
Claus Gittinger <cg@exept.de>
parents: 3633
diff changeset
    99
    DefaultUtilities isNil ifTrue:[DefaultUtilities := SourceCodeManagerUtilitiesForContainerBasedManagers new].
3642
28683778b9c3 class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3635
diff changeset
   100
    ^ DefaultUtilities
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   101
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   102
    "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
   103
    "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
   104
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   105
1084
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   106
lastModule
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   107
    "return the value of the static variable 'LastModule' (automatically generated)"
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   108
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   109
    ^ LastModule
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
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   112
lastModule:something
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   113
    "set the value of the static variable 'LastModule' (automatically generated)"
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   114
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   115
    LastModule := something.
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
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   118
lastPackage
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   119
    "return the value of the static variable 'LastPackage' (automatically generated)"
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   120
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   121
    ^ LastPackage
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
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   124
lastPackage:something
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   125
    "set the value of the static variable 'LastPackage' (automatically generated)"
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   126
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   127
    LastPackage := something.
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   128
! !
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   129
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   130
!SourceCodeManagerUtilities class methodsFor:'error handling'!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   131
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   132
doesNotUnderstand: aMessage
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   133
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   134
    (self default respondsTo: aMessage selector) ifTrue:[
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   135
        "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
   136
        self breakPoint: #jv.
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   137
        self breakPoint: #cg.
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   138
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   139
        ^aMessage sendTo: self default
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   140
    ] ifFalse:[
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   141
        ^super doesNotUnderstand: aMessage
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
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   144
    "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
   145
! !
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   146
2569
vrany
parents: 2556
diff changeset
   147
!SourceCodeManagerUtilities class methodsFor:'private-migration'!
vrany
parents: 2556
diff changeset
   148
vrany
parents: 2556
diff changeset
   149
compileForwarders
vrany
parents: 2556
diff changeset
   150
vrany
parents: 2556
diff changeset
   151
    "Utility method"
vrany
parents: 2556
diff changeset
   152
vrany
parents: 2556
diff changeset
   153
    "
vrany
parents: 2556
diff changeset
   154
        SourceCodeManagerUtilities compileForwarders.
vrany
parents: 2556
diff changeset
   155
    "
vrany
parents: 2556
diff changeset
   156
vrany
parents: 2556
diff changeset
   157
    self methodsDo:[:m|
vrany
parents: 2556
diff changeset
   158
        | sel |
vrany
parents: 2556
diff changeset
   159
        sel := m selector.
vrany
parents: 2556
diff changeset
   160
        ((self class includesSelector: sel) and: [(self class >> sel) source = m source]) ifTrue:[
vrany
parents: 2556
diff changeset
   161
            | source header |
vrany
parents: 2556
diff changeset
   162
vrany
parents: 2556
diff changeset
   163
            header := m source asStringCollection first.
vrany
parents: 2556
diff changeset
   164
            source := '%1
vrany
parents: 2556
diff changeset
   165
vrany
parents: 2556
diff changeset
   166
    <resource: #obsolete>
vrany
parents: 2556
diff changeset
   167
vrany
parents: 2556
diff changeset
   168
    self obsoleteMethodWarning: ''Please use instance protocol (SourceCodeManagerUtilities default doSomething)''.
vrany
parents: 2556
diff changeset
   169
vrany
parents: 2556
diff changeset
   170
    ^self default %1' bindWith: header with: header.
vrany
parents: 2556
diff changeset
   171
vrany
parents: 2556
diff changeset
   172
            self halt: 'Inspect source'.
vrany
parents: 2556
diff changeset
   173
            self class compile: source classified: m category.    
vrany
parents: 2556
diff changeset
   174
        ].
vrany
parents: 2556
diff changeset
   175
            
vrany
parents: 2556
diff changeset
   176
    ]
vrany
parents: 2556
diff changeset
   177
vrany
parents: 2556
diff changeset
   178
    "Created: / 11-10-2011 / 10:55:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
vrany
parents: 2556
diff changeset
   179
! !
vrany
parents: 2556
diff changeset
   180
1806
fdcaa790756a resources from libtool
Claus Gittinger <cg@exept.de>
parents: 1800
diff changeset
   181
!SourceCodeManagerUtilities class methodsFor:'resources'!
fdcaa790756a resources from libtool
Claus Gittinger <cg@exept.de>
parents: 1800
diff changeset
   182
fdcaa790756a resources from libtool
Claus Gittinger <cg@exept.de>
parents: 1800
diff changeset
   183
resourcePackage
fdcaa790756a resources from libtool
Claus Gittinger <cg@exept.de>
parents: 1800
diff changeset
   184
    ^ #'stx:libtool'
fdcaa790756a resources from libtool
Claus Gittinger <cg@exept.de>
parents: 1800
diff changeset
   185
! !
fdcaa790756a resources from libtool
Claus Gittinger <cg@exept.de>
parents: 1800
diff changeset
   186
873
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   187
!SourceCodeManagerUtilities class methodsFor:'utilities'!
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   188
1882
8b3a4c2a2c2a when creating a new container, set the package of all methods.
Claus Gittinger <cg@exept.de>
parents: 1879
diff changeset
   189
classIsNotYetInRepository:aClass withManager:mgr
2570
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
   190
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
   191
    <resource: #obsolete>
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
   192
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
   193
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
   194
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
   195
    ^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
   196
!
8b3a4c2a2c2a when creating a new container, set the package of all methods.
Claus Gittinger <cg@exept.de>
parents: 1879
diff changeset
   197
1704
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
   198
nameOfExtensionsContainer
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   199
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   200
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   201
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   202
    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
   203
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   204
    ^self default nameOfExtensionsContainer
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
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   207
setPackageOfAllMethodsIn:aClass to:aPackage
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   208
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   209
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   210
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   211
    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
   212
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   213
    ^self default setPackageOfAllMethodsIn:aClass to:aPackage
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   214
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   215
    "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
   216
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   217
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   218
setPackageOfAllMethodsInChangeSet:aChangeSet to:aPackage
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   219
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   220
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   221
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   222
    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
   223
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   224
    ^self default setPackageOfAllMethodsInChangeSet:aChangeSet to:aPackage
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   225
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   226
    "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
   227
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   228
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   229
sourceCodeManagerFor:aClass
3370
9953065c1ea1 class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3354
diff changeset
   230
    |mgr assumption|
9953065c1ea1 class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3354
diff changeset
   231
9953065c1ea1 class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3354
diff changeset
   232
    mgr := aClass theNonMetaclass sourceCodeManager.
9953065c1ea1 class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3354
diff changeset
   233
    mgr isNil ifTrue:[
9953065c1ea1 class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3354
diff changeset
   234
        SourceCodeManager isNil ifTrue:[
9953065c1ea1 class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3354
diff changeset
   235
            "/ 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
   236
            ^ nil.
9953065c1ea1 class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3354
diff changeset
   237
        ].
9953065c1ea1 class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3354
diff changeset
   238
        assumption := AbstractSourceCodeManager defaultManager ? CVSSourceCodeManager.
9953065c1ea1 class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3354
diff changeset
   239
        assumption notNil ifTrue:[
9953065c1ea1 class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3354
diff changeset
   240
            (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
   241
                ^ nil
9953065c1ea1 class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3354
diff changeset
   242
            ].
9953065c1ea1 class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3354
diff changeset
   243
            mgr := assumption.
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
    ].
9953065c1ea1 class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3354
diff changeset
   246
    ^ mgr
2556
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
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   249
sourceCodeOfClass:aClass
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   250
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   251
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   252
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   253
    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
   254
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   255
    ^self default sourceCodeOfClass:aClass
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
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   258
versionString:a isLessThan:b
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   259
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   260
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   261
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   262
    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
   263
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   264
    ^self default versionString:a isLessThan:b
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
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   267
!SourceCodeManagerUtilities class methodsFor:'utilities-cvs'!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   268
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   269
changeSetForExtensionMethodsForPackage:packageToCheckOut askForRevision:askForRevision usingManager:aSourceCodeManager
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   270
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   271
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   272
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   273
    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
   274
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   275
    ^self default changeSetForExtensionMethodsForPackage:packageToCheckOut askForRevision:askForRevision usingManager:aSourceCodeManager
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   276
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   277
    "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
   278
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   279
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   280
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
   281
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   282
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   283
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   284
    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
   285
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   286
    ^self default 
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   287
        changeSetForExtensionMethodsForPackage:packageToCheckOut 
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   288
        revision:revisionOrNil 
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   289
        orAskForRevision:askForRevision 
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   290
        usingManager:aSourceCodeManager
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   291
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   292
    "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
   293
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   294
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   295
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
   296
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   297
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   298
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   299
    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
   300
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   301
    ^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
   302
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   303
    "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
   304
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   305
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   306
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
   307
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   308
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   309
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   310
    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
   311
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   312
    ^self default checkForExistingModule:module directory:directory usingManager:mgr allowCreate:allowCreate
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   313
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   314
    "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
   315
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   316
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   317
checkForExistingModule:module usingManager:mgr allowCreate:allowCreate
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   318
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   319
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   320
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   321
    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
   322
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   323
    ^self default checkForExistingModule:module usingManager:mgr allowCreate:allowCreate
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   324
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   325
    "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
   326
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   327
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   328
checkinClass:aClass
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   329
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   330
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   331
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   332
    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
   333
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   334
    ^self default checkinClass:aClass
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
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   337
checkinClass:aClass withInfo:aLogInfoOrNil
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   338
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   339
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   340
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   341
    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
   342
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   343
    ^self default checkinClass:aClass withInfo:aLogInfoOrNil
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
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   346
checkinClass:aClass withInfo:aLogInfoOrNil withCheck:doCheckClass
2569
vrany
parents: 2556
diff changeset
   347
vrany
parents: 2556
diff changeset
   348
    <resource: #obsolete>
vrany
parents: 2556
diff changeset
   349
vrany
parents: 2556
diff changeset
   350
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
vrany
parents: 2556
diff changeset
   351
vrany
parents: 2556
diff changeset
   352
    ^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
   353
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   354
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   355
checkinClasses:aCollectionOfClass
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   356
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   357
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   358
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   359
    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
   360
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   361
    ^self default checkinClasses:aCollectionOfClass
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
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   364
checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrNil
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   365
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   366
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   367
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   368
    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
   369
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   370
    ^self default checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrNil
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   371
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   372
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   373
checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrStringNil withCheck:doCheckClasses
2569
vrany
parents: 2556
diff changeset
   374
vrany
parents: 2556
diff changeset
   375
    <resource: #obsolete>
vrany
parents: 2556
diff changeset
   376
vrany
parents: 2556
diff changeset
   377
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
vrany
parents: 2556
diff changeset
   378
vrany
parents: 2556
diff changeset
   379
    ^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
   380
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   381
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   382
checkinExtensionMethods:aCollectionOfMethods forPackage:aPackageID withInfo:aLogInfoOrStringOrNil
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   383
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   384
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   385
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   386
    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
   387
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   388
    ^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
   389
!
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
checkoutClass:aClass askForMerge:askForMerge
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   392
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   393
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   394
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   395
    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
   396
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   397
    ^self default checkoutClass:aClass askForMerge:askForMerge
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   398
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   399
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   400
checkoutClass:aClass askForRevision:askForRevision askForMerge:askForMerge
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   401
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   402
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   403
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   404
    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
   405
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   406
    ^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
   407
!
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
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
   410
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   411
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   412
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   413
    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
   414
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   415
    ^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
   416
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   417
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   418
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
   419
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   420
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   421
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   422
    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
   423
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   424
    ^self default checkoutExtensionMethodsForPackage:packageToCheckOut askForRevision:askForRevision askForMerge:askForMerge usingManager:aSourceCodeManager
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   425
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   426
    "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
   427
!
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
compareClassWithRepository:aClass
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
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   432
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   433
    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
   434
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   435
    ^self default compareClassWithRepository:aClass
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   436
!
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
compareClassWithRepository:aClass askForRevision:askForRevision
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
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   441
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   442
    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
   443
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   444
    ^self default compareClassWithRepository:aClass askForRevision:askForRevision
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   445
!
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
compareProject:aProject withRepositoryVersionFrom:aDateOrNilForNewest
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
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   450
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   451
    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
   452
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   453
    ^self default compareProject:aProject withRepositoryVersionFrom:aDateOrNilForNewest
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   454
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   455
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   456
compareProjectWithRepository:aProject
2569
vrany
parents: 2556
diff changeset
   457
vrany
parents: 2556
diff changeset
   458
    <resource: #obsolete>
vrany
parents: 2556
diff changeset
   459
vrany
parents: 2556
diff changeset
   460
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
vrany
parents: 2556
diff changeset
   461
vrany
parents: 2556
diff changeset
   462
    ^self default compareProjectWithRepository:aProject
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   463
!
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
createSourceContainerForClass:aClass
2569
vrany
parents: 2556
diff changeset
   466
vrany
parents: 2556
diff changeset
   467
    <resource: #obsolete>
vrany
parents: 2556
diff changeset
   468
vrany
parents: 2556
diff changeset
   469
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
vrany
parents: 2556
diff changeset
   470
vrany
parents: 2556
diff changeset
   471
    ^self default createSourceContainerForClass:aClass
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   472
!
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
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
   475
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   476
    <resource: #obsolete>
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
    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
   479
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   480
    ^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
   481
!
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
diffSetOfProject:aProject againstRepositoryVersionFrom:aDateOrNilForNewest
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   484
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   485
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   486
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   487
    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
   488
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   489
    ^self default diffSetOfProject:aProject againstRepositoryVersionFrom:aDateOrNilForNewest
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   490
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   491
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   492
ensureCorrectVersionMethodsInClass:aClass usingManager:aManager
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   493
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   494
    <resource: #obsolete>
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
    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
   497
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   498
    ^self default ensureCorrectVersionMethodsInClass:aClass usingManager:aManager
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   499
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   500
    "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
   501
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   502
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   503
getLogMessageForClassCheckinTakingDefaultsFromPreviousLogInfo:aLogInfoOrNil forClass:aClass valuesInto:aBlock
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
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   506
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   507
    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
   508
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   509
    ^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
   510
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   511
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   512
removeSourceContainerForClass:aClass
2569
vrany
parents: 2556
diff changeset
   513
vrany
parents: 2556
diff changeset
   514
    <resource: #obsolete>
vrany
parents: 2556
diff changeset
   515
vrany
parents: 2556
diff changeset
   516
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
vrany
parents: 2556
diff changeset
   517
vrany
parents: 2556
diff changeset
   518
    ^self default removeSourceContainerForClass:aClass
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   519
!
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
removeSourceContainerForClass:aClass confirm:doConfirm warn:doWarn
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
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   524
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   525
    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
   526
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   527
    ^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
   528
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   529
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   530
repositoryLogOf:aClass onto:aStream
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   531
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   532
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   533
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   534
    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
   535
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   536
    ^self default repositoryLogOf:aClass onto:aStream
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   537
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   538
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   539
repositoryLogOf:aClass short:shortOrNot onto:aStream
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   540
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   541
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   542
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   543
    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
   544
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   545
    ^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
   546
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   547
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   548
tagClass:aClass as:tag
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   549
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   550
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   551
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   552
    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
   553
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   554
    ^self default tagClass:aClass as:tag
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
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   557
tagClasses:aCollectionOfClasses as:tag
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   558
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   559
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   560
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   561
    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
   562
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   563
    ^self default tagClasses:aCollectionOfClasses as:tag
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
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   566
tagPath:aPath as:tag usingManager:aManager
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   567
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   568
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   569
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   570
    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
   571
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   572
    ^self default tagPath:aPath as:tag usingManager:aManager
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   573
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   574
    "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
   575
! !
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   576
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   577
!SourceCodeManagerUtilities class methodsFor:'utilities-cvs-helpers'!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   578
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   579
getMethodVersionsOfClass:aClass selector:selector numberOfRevisions:numberOfRevisionsOrNil
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   580
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   581
    <resource: #obsolete>
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
    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
   584
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   585
    ^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
   586
! !
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   587
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   588
!SourceCodeManagerUtilities class methodsFor:'utilities-cvs-user interaction'!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   589
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   590
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
   591
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   592
    <resource: #obsolete>
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
    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
   595
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   596
    ^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
   597
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   598
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   599
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
   600
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   601
    <resource: #obsolete>
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
    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
   604
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   605
    ^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
   606
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   607
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   608
askForExistingRevision:boxText title:title class:aClass
2570
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
   609
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
   610
    <resource: #obsolete>
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
   611
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
   612
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
   613
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
   614
    ^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
   615
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   616
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   617
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
   618
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   619
    <resource: #obsolete>
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
    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
   622
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   623
    ^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
   624
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   625
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   626
checkAndWarnAboutBadMessagesInClass:aClass checkAgainHolder:checkAgainHolder
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   627
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   628
    <resource: #obsolete>
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
    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
   631
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   632
    ^self default checkAndWarnAboutBadMessagesInClass:aClass checkAgainHolder:checkAgainHolder
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
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   635
getCheckinInfoFor:aClassNameOrPackageNameString initialAnswer:initialAnswerOrNil
2795
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
   636
    ^self default 
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
   637
        getCheckinInfoFor:aClassNameOrPackageNameString     
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
   638
        initialAnswer:initialAnswerOrNil
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
   639
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
   640
    "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
   641
!
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
getCheckinInfoFor:aClassNameOrPackageNameString initialAnswer:initialAnswerOrNil withQuickOption:withQuickOption
2795
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
   644
    ^self default 
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
   645
        getCheckinInfoFor:aClassNameOrPackageNameString 
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
   646
        initialAnswer:initialAnswerOrNil 
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
   647
        withQuickOption:withQuickOption
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
   648
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
   649
    "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
   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
goodInitialLogMessageForCheckinClassOfClass:aClass
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 goodInitialLogMessageForCheckinClassOfClass:aClass
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
!SourceCodeManagerUtilities class methodsFor:'utilities-encoding'!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   662
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   663
guessEncodingOfFile:aFilename
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   664
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   665
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   666
2818
82c73234ac2d changed: #guessEncodingOfFile:
Stefan Vogel <sv@exept.de>
parents: 2817
diff changeset
   667
    self obsoleteMethodWarning:'ask CharacterEncoder'.
82c73234ac2d changed: #guessEncodingOfFile:
Stefan Vogel <sv@exept.de>
parents: 2817
diff changeset
   668
    ^ CharacterEncoder guessEncodingOfFile:aFilename
2556
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
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   671
guessEncodingOfStream:aStream
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   672
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   673
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   674
2817
8a836ca902d4 changed: #guessEncodingOfStream:
Stefan Vogel <sv@exept.de>
parents: 2796
diff changeset
   675
    self obsoleteMethodWarning:'ask CharacterEncoder'.
8a836ca902d4 changed: #guessEncodingOfStream:
Stefan Vogel <sv@exept.de>
parents: 2796
diff changeset
   676
    ^ CharacterEncoder guessEncodingOfStream:aStream
2556
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
!SourceCodeManagerUtilities methodsFor:'accessing'!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   680
2847
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   681
confirmNewFiles:aBoolean
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   682
    "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
   683
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   684
    confirmNewFiles := aBoolean.
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   685
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   686
    "Modified (comment): / 24-07-2012 / 18:18:34 / cg"
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   687
!
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   688
2795
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
   689
lastSourceLogMessageHeadlines
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
   690
    LastSourceLogMessage isNil ifTrue:[
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
   691
        LastSourceLogMessages := OrderedCollection new.
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
    ^ LastSourceLogMessages 
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
   694
        collect:[:msg |
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
   695
            msg withoutLeadingSeparators asCollectionOfLines first , '...'
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
   696
        ]
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
   697
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
   698
    "Created: / 12-03-2012 / 12:34:35 / cg"
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
   699
!
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
   700
2569
vrany
parents: 2556
diff changeset
   701
yesToAllNotification
vrany
parents: 2556
diff changeset
   702
vrany
parents: 2556
diff changeset
   703
    ^self class yesToAllNotification
vrany
parents: 2556
diff changeset
   704
vrany
parents: 2556
diff changeset
   705
    "Created: / 11-10-2011 / 12:01:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
vrany
parents: 2556
diff changeset
   706
!
vrany
parents: 2556
diff changeset
   707
vrany
parents: 2556
diff changeset
   708
yesToAllQuery
vrany
parents: 2556
diff changeset
   709
vrany
parents: 2556
diff changeset
   710
    ^self class yesToAllQuery
vrany
parents: 2556
diff changeset
   711
vrany
parents: 2556
diff changeset
   712
    "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
   713
! !
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   714
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   715
!SourceCodeManagerUtilities methodsFor:'error handling'!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   716
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   717
doesNotUnderstand: aMessage
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   718
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   719
    (self class respondsTo: aMessage selector) ifTrue:[
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   720
        "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
   721
        self breakPoint: #jv.
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   722
        self breakPoint: #cg.
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   723
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   724
        ^aMessage sendTo: self class
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   725
    ] ifFalse:[
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   726
        ^super doesNotUnderstand: aMessage
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   727
    ]
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   728
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   729
    "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
   730
! !
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   731
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   732
!SourceCodeManagerUtilities methodsFor:'initialization'!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   733
2597
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
   734
initialize
2847
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   735
    confirmNewFiles := true.
3551
e8feddd829f9 class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3546
diff changeset
   736
    resources := self class classResources.
2597
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
   737
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
   738
    "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
   739
    "Modified: / 24-07-2012 / 18:17:57 / cg"
2597
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
   740
!
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
   741
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   742
setManager: aSourceCodeManager
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   743
2847
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   744
    manager := aSourceCodeManager.
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   745
    manager isContainerBased ifFalse:[
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   746
        confirmNewFiles isNil "not yet set by user" ifTrue:[
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   747
            confirmNewFiles := false.
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   748
        ]
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   749
    ].
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   750
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   751
    "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
   752
    "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
   753
! !
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   754
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   755
!SourceCodeManagerUtilities methodsFor:'utilities'!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   756
2569
vrany
parents: 2556
diff changeset
   757
classIsNotYetInRepository:aClass withManager:mgr
vrany
parents: 2556
diff changeset
   758
    |info|
vrany
parents: 2556
diff changeset
   759
vrany
parents: 2556
diff changeset
   760
    info := mgr sourceInfoOfClass:aClass.
vrany
parents: 2556
diff changeset
   761
vrany
parents: 2556
diff changeset
   762
    ^ (info isNil 
vrany
parents: 2556
diff changeset
   763
    or:[(info at:#fileName ifAbsent:nil) isNil
vrany
parents: 2556
diff changeset
   764
    or:[(info at:#module ifAbsent:nil) isNil
vrany
parents: 2556
diff changeset
   765
    or:[(info at:#directory ifAbsent:nil) isNil]]])
vrany
parents: 2556
diff changeset
   766
vrany
parents: 2556
diff changeset
   767
    "Created: / 25-10-2006 / 09:43:00 / cg"
vrany
parents: 2556
diff changeset
   768
!
vrany
parents: 2556
diff changeset
   769
2673
06f4f56d7818 added: #defaultManager
Claus Gittinger <cg@exept.de>
parents: 2670
diff changeset
   770
defaultManager
06f4f56d7818 added: #defaultManager
Claus Gittinger <cg@exept.de>
parents: 2670
diff changeset
   771
    ^ manager
06f4f56d7818 added: #defaultManager
Claus Gittinger <cg@exept.de>
parents: 2670
diff changeset
   772
06f4f56d7818 added: #defaultManager
Claus Gittinger <cg@exept.de>
parents: 2670
diff changeset
   773
    "Created: / 22-12-2011 / 10:59:28 / cg"
06f4f56d7818 added: #defaultManager
Claus Gittinger <cg@exept.de>
parents: 2670
diff changeset
   774
!
06f4f56d7818 added: #defaultManager
Claus Gittinger <cg@exept.de>
parents: 2670
diff changeset
   775
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   776
nameOfExtensionsContainer
1704
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
   777
    ^ 'extensions.st'
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
   778
!
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
   779
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
   780
setPackageOfAllMethodsIn:aClass to:aPackage
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
   781
    "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
   782
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
   783
    |anyChange anyChangeHere|
893
09543b968f15 added askFor... utility.
Claus Gittinger <cg@exept.de>
parents: 886
diff changeset
   784
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
   785
    anyChange := false.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
   786
    aClass withAllPrivateClassesDo:[:eachClass |
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
   787
        anyChangeHere := false.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
   788
        eachClass instAndClassSelectorsAndMethodsDo:[:sel :mthd | 
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
   789
            mthd package ~= aPackage ifTrue:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
   790
                mthd setPackage:aPackage.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
   791
                anyChangeHere := true.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
   792
            ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
   793
        ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
   794
        anyChangeHere ifTrue:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
   795
            eachClass changed:#projectOrganization
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
   796
        ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
   797
        anyChangeHere ifTrue:[anyChange := true].
893
09543b968f15 added askFor... utility.
Claus Gittinger <cg@exept.de>
parents: 886
diff changeset
   798
    ].
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
   799
    anyChange ifTrue:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
   800
       Smalltalk changed:#projectOrganization
1185
e86907810d1f handle abortAll in checkIn
Claus Gittinger <cg@exept.de>
parents: 1160
diff changeset
   801
    ].
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
   802
    ^ anyChange
893
09543b968f15 added askFor... utility.
Claus Gittinger <cg@exept.de>
parents: 886
diff changeset
   803
!
09543b968f15 added askFor... utility.
Claus Gittinger <cg@exept.de>
parents: 886
diff changeset
   804
2193
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
   805
setPackageOfAllMethodsInChangeSet:aChangeSet to:aPackage
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
   806
    "make all methods belong to the classes project"
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
   807
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
   808
    aChangeSet do:[:eachChange |
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
   809
        eachChange isMethodCodeChange ifTrue:[
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
   810
            eachChange changeMethod package ~= aPackage ifTrue:[
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
   811
                Transcript showCR:'change package of ',eachChange changeMethod whoString.
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
   812
                eachChange changeMethod setPackage:aPackage.        
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
   813
            ]
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
   814
        ]
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
   815
    ].
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
   816
!
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
   817
3134
93b8f75424c5 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 2977
diff changeset
   818
sourceCodeForExtensions:aCollectionOfMethods package:aPackageID forManager:scmManagerOrNil
2847
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   819
    |s methodsSortedByName defClass|
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   820
3201
f0993e3fdf02 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3199
diff changeset
   821
    s := CharacterWriteStream on:(String new:1000).
2847
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   822
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   823
    s nextPutAll:'"{ Package: '''.
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   824
    s nextPutAll:aPackageID asString.
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   825
    s nextPutAll:''' }"'; nextPutChunkSeparator; cr; cr.
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   826
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   827
    "/ 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
   828
    "/ s nextPutAll:(Smalltalk timeStamp).
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   829
    "/ s nextPutChunkSeparator. 
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   830
    "/ s cr; cr.
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   831
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   832
    "/ sort them by name (to avoid conflicts due to SCM merge)
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   833
    methodsSortedByName := aCollectionOfMethods asOrderedCollection.
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   834
    methodsSortedByName sort:[:a :b |
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   835
                                |clsA clsB|
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   836
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   837
                                clsA := a mclass name.
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   838
                                clsB := b mclass name.
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   839
                                clsA < clsB ifTrue:[
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   840
                                    true
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   841
                                ] ifFalse:[
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   842
                                    clsA > clsB ifTrue:[
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   843
                                        false
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   844
                                    ] ifFalse:[
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   845
                                        a selector < b selector
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   846
                                    ]
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   847
                                ]
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   848
                              ].
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   849
    methodsSortedByName do:[:aMethod |
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   850
        aMethod mclass fileOutMethod:aMethod on:s.
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   851
        s cr.
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   852
    ].
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   853
3134
93b8f75424c5 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 2977
diff changeset
   854
    scmManagerOrNil notNil ifTrue:[
93b8f75424c5 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 2977
diff changeset
   855
        defClass := ProjectDefinition definitionClassForPackage:aPackageID.
93b8f75424c5 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 2977
diff changeset
   856
        defClass notNil ifTrue:[
93b8f75424c5 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 2977
diff changeset
   857
            "/ make sure, an extensionVersion_XXX method is included...
93b8f75424c5 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 2977
diff changeset
   858
            "/ (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
   859
            (methodsSortedByName contains:[:aMethod | aMethod selector == scmManagerOrNil nameOfVersionMethodForExtensions]) ifFalse:[
93b8f75424c5 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 2977
diff changeset
   860
                s nextPutLine:('!!%1 class methodsFor:''documentation''!!' bindWith:defClass name).
93b8f75424c5 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 2977
diff changeset
   861
                s cr.
93b8f75424c5 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 2977
diff changeset
   862
                s nextChunkPut:
93b8f75424c5 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 2977
diff changeset
   863
                    (scmManagerOrNil versionMethodTemplateForSmalltalkFor:(scmManagerOrNil nameOfVersionMethodForExtensions)).
93b8f75424c5 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 2977
diff changeset
   864
                s space; nextPutChunkSeparator; cr.
93b8f75424c5 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 2977
diff changeset
   865
            ].
2847
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   866
        ].
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   867
    ].
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   868
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   869
    ^ s contents.
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   870
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   871
    "Created: / 25-07-2012 / 18:38:05 / cg"
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   872
!
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
   873
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
   874
sourceCodeManagerFor:aClass
3370
9953065c1ea1 class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3354
diff changeset
   875
    manager notNil ifTrue:[^ manager].
9953065c1ea1 class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3354
diff changeset
   876
    ^ self class sourceCodeManagerFor:aClass.    
1449
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
   877
!
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
   878
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
   879
sourceCodeOfClass:aClass
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
   880
    |stream src|
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
   881
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
   882
    stream := '' writeStream.
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
   883
    Method flushSourceStreamCache.
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
   884
    aClass fileOutOn:stream withTimeStamp:false.
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
   885
    src := stream contents asString.
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
   886
    stream close.
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
   887
    ^ src
2326
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   888
!
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   889
3140
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
   890
validateConsistencyOfPackage:aPackage
3146
913e76c86499 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   891
    ^ self validateConsistencyOfPackage:aPackage doClasses:true  doExtensions:true
913e76c86499 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   892
!
913e76c86499 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   893
913e76c86499 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   894
validateConsistencyOfPackage:aPackage doClasses:doClasses doExtensions:doExtensions
3692
ce00ca02e94a class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3683
diff changeset
   895
    |checker report msg answer dialog problems numProblems|
3155
9c22d8b4315b class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3153
diff changeset
   896
9c22d8b4315b class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3153
diff changeset
   897
    "/ also done by ProjectChecker...
9c22d8b4315b class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3153
diff changeset
   898
    "/ defClass := aPackage asPackageId projectDefinitionClass.
3140
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
   899
    "/ defClass validateDescription.
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
   900
3146
913e76c86499 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   901
    checker := ProjectChecker new.
913e76c86499 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3140
diff changeset
   902
    checker checkExtensionsOnly:(doClasses not and:[ doExtensions ]).
3155
9c22d8b4315b class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3153
diff changeset
   903
    report := checker check: aPackage.
3692
ce00ca02e94a class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3683
diff changeset
   904
    (report notNil and:[(problems := report problems) notEmptyOrNil]) ifTrue:[
ce00ca02e94a class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3683
diff changeset
   905
        numProblems := problems size.
ce00ca02e94a class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3683
diff changeset
   906
        numProblems == 1 ifTrue:[
3140
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
   907
            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
   908
        ] ifFalse:[
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
   909
            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
   910
        ].
3692
ce00ca02e94a class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3683
diff changeset
   911
        answer := Dialog confirmWithCancel:(msg bindWith:numProblems 
ce00ca02e94a class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3683
diff changeset
   912
                                                with:problems first label) withCRs.
3140
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
   913
        answer isNil ifTrue:[
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
   914
            "/ cancel
3433
eee3079d18d3 AbortSignal -> AbortOperationRequest
Stefan Vogel <sv@exept.de>
parents: 3425
diff changeset
   915
            AbortOperationRequest raiseRequest
3140
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
   916
        ].
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
   917
        answer == true ifTrue:[
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
   918
            dialog := Tools::ProjectCheckerBrowser new.
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
   919
            dialog
3155
9c22d8b4315b class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3153
diff changeset
   920
                projectChecker: (ProjectChecker forPackage: aPackage);
3692
ce00ca02e94a class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3683
diff changeset
   921
                problemList:problems;
3140
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
   922
                showCancel:true;
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
   923
                openModal.
3155
9c22d8b4315b class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3153
diff changeset
   924
3140
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
   925
            dialog accepted ifFalse:[
3433
eee3079d18d3 AbortSignal -> AbortOperationRequest
Stefan Vogel <sv@exept.de>
parents: 3425
diff changeset
   926
                AbortOperationRequest raiseRequest
3140
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
   927
            ].
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
   928
        ].
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
   929
    ].
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
   930
!
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
   931
2326
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   932
versionString:a isLessThan:b
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   933
    "compare two strings of the form: a.b.c..."
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   934
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   935
    |i1 i2 a1 b1 rest1 rest2|
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   936
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   937
    i1 := a indexOf:$. .
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   938
    i2 := b indexOf:$. .
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   939
    i1 == 0 ifTrue:[
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   940
        i1 := a size + 1.
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   941
    ].
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   942
    i2 == 0 ifTrue:[
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   943
        i2 := b size + 1.
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   944
    ].
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   945
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   946
    a1 := Integer readFrom:(a copyTo:i1-1).
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   947
    b1 := Integer readFrom:(b copyTo:i2-1).
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   948
    a1 < b1 ifTrue:[^ true].
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   949
    a1 > b1 ifTrue:[^ false].
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   950
    rest1 := (a copyFrom:i1+1).
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   951
    rest2 := (b copyFrom:i2+1).
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   952
    rest1 isEmpty ifTrue:[
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   953
        ^ rest2 notEmpty
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   954
    ].
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   955
    rest2 isEmpty ifTrue:[
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   956
        ^ false
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   957
    ].
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   958
    ^ self versionString:rest1 isLessThan:rest2
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   959
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   960
    "
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   961
     self assert:(self versionString:'12.34.66' isLessThan:'12.35.66').
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   962
     self assert:(self versionString:'12.34.66' isLessThan:'12.35.67').
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   963
     self assert:(self versionString:'11.34.66' isLessThan:'12.34.67').
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   964
     self assert:(self versionString:'11.35.66' isLessThan:'12.34.67').
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   965
     self assert:(self versionString:'13.35.66' isLessThan:'12.34.67') not.
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   966
     self assert:(self versionString:'13.35.66' isLessThan:'13.34.67') not.
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   967
     self assert:(self versionString:'13.35.66' isLessThan:'13.35.67').
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   968
     self assert:(self versionString:'13.35.66' isLessThan:'13.35.65') not.
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   969
     self assert:(self versionString:'13.35.66.1' isLessThan:'13.35.66') not.
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   970
     self assert:(self versionString:'13.35.66' isLessThan:'13.35.66.1').
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   971
     self assert:(self versionString:'13.35.66.2' isLessThan:'13.35.66.1') not.
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   972
     self assert:(self versionString:'13.35.66.1' isLessThan:'13.35.66.2').
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   973
    "
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   974
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   975
    "Modified: / 17-02-2011 / 10:20:14 / cg"
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
   976
! !
1160
d56159f5a86f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1158
diff changeset
   977
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   978
!SourceCodeManagerUtilities methodsFor:'utilities-cvs'!
973
b9004b37290a check for #halt and #error when checking in
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
   979
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   980
changeSetForExtensionMethodsForPackage:packageToCheckOut askForRevision:askForRevision usingManager:aSourceCodeManager
1841
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   981
    "check-out an extension container from the source repository, and return the methods there as a change set.
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   982
     If askForRevision is false, check-out the newest version.
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   983
     Return a changeSet or nil (if any error occurred)"
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   984
2242
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
   985
    ^ self
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
   986
        changeSetForExtensionMethodsForPackage:packageToCheckOut 
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
   987
        revision:nil orAskForRevision:askForRevision 
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   988
        usingManager:aSourceCodeManager
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   989
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   990
    "Created: / 29-12-2011 / 14:26:01 / cg"
2242
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
   991
!
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
   992
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
   993
changeSetForExtensionMethodsForPackage:packageToCheckOut revision:revisionOrNil orAskForRevision:askForRevision usingManager:aSourceCodeManager
2242
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
   994
    "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
   995
     If askForRevision is false, check-out the newest version.
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
   996
     Return a changeSet or nil (if any error occurred)"
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
   997
2948
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
   998
    |directory module file aStream sourceToLoad rev msg newestRev |
1841
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   999
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1000
    directory := packageToCheckOut asPackageId directory.
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1001
    module := packageToCheckOut asPackageId module.
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1002
    file := self nameOfExtensionsContainer.
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1003
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1004
    "/
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1005
    "/ ask for revision
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1006
    "/
2242
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
  1007
    (rev := revisionOrNil) isNil ifTrue:[
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
  1008
        newestRev := aSourceCodeManager newestRevisionInFile:file directory:directory module:module.
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
  1009
        askForRevision ifFalse:[
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
  1010
            rev := newestRev ? ''
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
  1011
        ] ifTrue:[
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
  1012
            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
  1013
            newestRev notNil ifTrue:[
3261
7a585999dcef class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3259
diff changeset
  1014
                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
  1015
            ].
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
  1016
2791
0601ded0300b changed:
Stefan Vogel <sv@exept.de>
parents: 2775
diff changeset
  1017
            rev := self
2242
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
  1018
                    askForExistingRevision:msg 
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
  1019
                    title:'CheckOut from repository' 
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
  1020
                    class:nil 
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
  1021
                    manager:aSourceCodeManager 
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
  1022
                    module:module package:directory fileName:file.
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
  1023
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
  1024
            rev isNil ifTrue:[
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
  1025
                ^ nil   "/ canceled
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
  1026
            ].
1841
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1027
        ].
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1028
    ].
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1029
    rev withoutSpaces isEmpty ifTrue:[
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1030
        rev := #newest.
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1031
        msg := 'extracting newest %1 (' , (newestRev ? '???') , ')'.
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1032
    ] ifFalse:[
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1033
        msg := 'extracting previous %1'.
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1034
    ].
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1035
    aStream := aSourceCodeManager  
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1036
        streamForClass:nil
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1037
        fileName:file 
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1038
        revision:rev 
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1039
        directory:directory 
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1040
        module:module
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1041
        cache:true.
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1042
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1043
    aStream isNil ifTrue:[
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1044
        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
  1045
        ^ nil
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1046
    ].
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1047
    aStream class readErrorSignal handle:[:ex |
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1048
        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
  1049
        aStream close.
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1050
        ^ nil
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1051
    ] do:[
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1052
        sourceToLoad := aStream contents asString.
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1053
    ].
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1054
    aStream close.
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1055
    ^ ChangeSet fromStream:(sourceToLoad readStream).
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1056
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
  1057
    "Created: / 29-12-2011 / 14:27:00 / cg"
1841
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1058
!
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1059
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
  1060
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
  1061
    |moduleName directoryName containerName|
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  1062
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1063
    moduleName := module allBold.
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
  1064
    directoryName := directory allBold.
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1065
    containerName := containerFileName allBold.
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1066
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1067
    "/
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1068
    "/ check for the container
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1069
    "/
1787
db6157670930 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1782
diff changeset
  1070
    (mgr checkForExistingContainer:containerFileName inModule:module directory:directory) ifFalse:[
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1071
        allowCreate ifFalse:[
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1072
            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
  1073
                                   with:containerName with:moduleName with:directoryName) withCRs.
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1074
            ^ false
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1075
        ].
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1076
        (Dialog 
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1077
            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
  1078
                                 with:containerName with:moduleName with:directoryName) withCRs
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1079
            noLabel:'Cancel') 
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1080
        ifFalse:[
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1081
            ^ false.
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1082
        ].
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
  1083
        (mgr createContainerForText:'' inModule:module package:directory container:containerFileName) ifFalse:[
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1084
            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
  1085
                                 with:containerName with:moduleName with:directoryName).
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1086
            ^ false.
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1087
        ]
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1088
    ].
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1089
    ^ true.
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
  1090
1787
db6157670930 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1782
diff changeset
  1091
    "Modified: / 13-09-2006 / 18:24:57 / cg"
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
  1092
    "Created: / 29-12-2011 / 14:35:36 / cg"
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1093
!
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1094
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
  1095
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
  1096
    |moduleNameBold directoryNameBold|
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  1097
1704
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  1098
    moduleNameBold := module allBold.
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  1099
    directoryNameBold := directory allBold.
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1100
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1101
    "/
1704
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  1102
    "/ check for the directory
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1103
    "/
1840
c993a1c045cc obsolete method calls
Claus Gittinger <cg@exept.de>
parents: 1835
diff changeset
  1104
    (mgr checkForExistingModule:module directory:directory) ifFalse:[
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1105
        allowCreate ifFalse:[
1704
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  1106
            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
  1107
                                   with:directoryNameBold with:moduleNameBold) withCRs.
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1108
            ^ false
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1109
        ].
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1110
        (Dialog 
2651
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  1111
            confirm:(resources stringWithCRs:'''%1'' is a new directory in module ''%2''.\\Create it in %3?' 
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  1112
                                with:directoryNameBold 
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  1113
                                with:moduleNameBold
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  1114
                                with:mgr managerTypeName)
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1115
            noLabel:'Cancel') 
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1116
        ifFalse:[
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1117
            ^ false.
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1118
        ].
1840
c993a1c045cc obsolete method calls
Claus Gittinger <cg@exept.de>
parents: 1835
diff changeset
  1119
        (mgr createModule:module directory:directory) ifFalse:[
2651
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  1120
            self warn:(resources stringWithCRs:'Cannot create new directory: ''%1'' in module ''%2'' in %3' 
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  1121
                                 with:directoryNameBold 
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  1122
                                 with:moduleNameBold
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  1123
                                 with:mgr managerTypeName).
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1124
            ^ false.
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1125
        ]
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1126
    ].
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1127
    ^ true.
1840
c993a1c045cc obsolete method calls
Claus Gittinger <cg@exept.de>
parents: 1835
diff changeset
  1128
2651
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  1129
    "Modified: / 21-12-2011 / 18:46:11 / cg"
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
  1130
    "Created: / 29-12-2011 / 14:35:20 / cg"
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1131
!
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1132
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
  1133
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
  1134
    |moduleName answer|
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1135
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1136
    (mgr checkForExistingModule:module) ifFalse:[
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1137
        moduleName := module allBold.
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1138
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1139
        allowCreate ifFalse:[
1423
d15575ef3dba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1414
diff changeset
  1140
            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
  1141
                                  with:moduleName) .
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1142
            ^ false
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1143
        ].
2325
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  1144
        AbortAllOperationWantedQuery query ifTrue:[
1483
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  1145
            answer := Dialog 
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  1146
                confirmWithCancel:(resources stringWithCRs:'''%1'' is a new module.\\create it ?' with:moduleName)
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  1147
                labels:(resources array:#('Cancel All' 'Cancel' 'Yes' )).
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  1148
            answer isNil ifTrue:[ AbortAllOperationRequest raise ].
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  1149
        ] ifFalse:[
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  1150
            answer := Dialog 
2651
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  1151
                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
  1152
                noLabel:'Cancel'
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  1153
        ].
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  1154
        answer ifFalse:[ ^ false].
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1155
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1156
        (mgr createModule:module) ifFalse:[
2651
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  1157
            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
  1158
            ^ false.
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1159
        ]
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1160
    ].
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1161
    ^ true.
2325
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  1162
2651
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  1163
    "Modified: / 21-12-2011 / 18:42:03 / cg"
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
  1164
    "Created: / 29-12-2011 / 14:35:06 / cg"
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1165
!
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1166
3534
914309d517ed class: SourceCodeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3514
diff changeset
  1167
checkOutPackages: packages askForRevision: askForRevision
914309d517ed class: SourceCodeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3514
diff changeset
  1168
    "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
  1169
     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
  1170
     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
  1171
     revision. 
914309d517ed class: SourceCodeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3514
diff changeset
  1172
914309d517ed class: SourceCodeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3514
diff changeset
  1173
     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
  1174
     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
  1175
     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
  1176
     newest she wants.
914309d517ed class: SourceCodeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3514
diff changeset
  1177
914309d517ed class: SourceCodeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3514
diff changeset
  1178
     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
  1179
     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
  1180
914309d517ed class: SourceCodeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3514
diff changeset
  1181
    ^ self subclassResponsibility.
914309d517ed class: SourceCodeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3514
diff changeset
  1182
914309d517ed class: SourceCodeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3514
diff changeset
  1183
    "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
  1184
!
914309d517ed class: SourceCodeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3514
diff changeset
  1185
3602
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1186
checkinClass:aClass
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1187
    "check a class into the source repository.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1188
     Asks interactively for a log-message."
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1189
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1190
    ^ self checkinClass:aClass withInfo:nil
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1191
!
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1192
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1193
checkinClass:aClass withInfo:aLogInfoOrNil
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1194
    "check a class into the source repository.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1195
     If the argument, aLogInfoOrNil isNil, ask interactively for a log-message."
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1196
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1197
    ^ self checkinClass:aClass withInfo:aLogInfoOrNil withCheck:true
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1198
!
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1199
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1200
checkinClass:aClass withInfo:aLogInfoOrNil withCheck:doCheckClass
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1201
    "check a class into the source repository.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1202
     If the argument, aLogInfoOrNil isNil, ask interactively for log-message.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1203
     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
  1204
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1205
    ^ self 
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1206
        checkinClass:aClass 
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1207
        withInfo:aLogInfoOrNil 
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1208
        withCheck:doCheckClass 
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1209
        usingManager:(self sourceCodeManagerFor:aClass)
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1210
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1211
    "Modified: / 21-12-2011 / 18:19:55 / cg"
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1212
!
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1213
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1214
checkinClass:aClass withInfo:aLogInfoOrNil withCheck:doCheckClassHolder usingManager:managerOrNil
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1215
    "check a class into the source repository.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1216
     If the argument, aLogInfoOrNil isNil, ask interactively for log-message.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1217
     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
  1218
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1219
    |logMessage checkinInfo mgr pri|
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1220
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1221
    aClass isLoaded ifFalse:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1222
        self information:(resources string:'Cannot checkin unloaded classes (%1)' with:aClass name).
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1223
        ^ false.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1224
    ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1225
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1226
    mgr := managerOrNil.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1227
    mgr isNil ifTrue:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1228
        mgr := self sourceCodeManagerFor:aClass.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1229
        mgr isNil ifTrue:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1230
            ^ false
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1231
        ]
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1232
    ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1233
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1234
    self ensureCorrectVersionMethodsInClass:aClass usingManager:mgr.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1235
    mgr supportsCheckinLogMessages ifTrue:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1236
        (self 
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1237
            getLogMessageForClassCheckinTakingDefaultsFromPreviousLogInfo:aLogInfoOrNil 
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1238
            forClass:aClass
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1239
            valuesInto:[:logMessageRet :checkinInfoRet |
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1240
                logMessage := logMessageRet.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1241
                checkinInfo := checkinInfoRet.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1242
            ]
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1243
        ) ifFalse:[^ false].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1244
    ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1245
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1246
    (self classIsNotYetInRepository:aClass withManager:mgr) ifTrue:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1247
        (self createSourceContainerForClass:aClass usingManager:mgr) ifFalse:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1248
"/            self warn:'did not create a container for ''' , aClass name , ''''.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1249
            ^ false
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1250
        ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1251
        ^ true.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1252
    ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1253
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1254
    self activityNotification:(resources string:'checking in %1' with:aClass name).
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1255
    pri := Processor activePriority.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1256
    Processor activeProcess withPriority:pri-1 to:pri
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1257
    do:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1258
        |revision aborted freshCreated|
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1259
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1260
        freshCreated := false.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1261
        revision := aClass revision.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1262
        revision isNil ifTrue:[ 
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1263
            mgr isContainerBased ifTrue:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1264
                "/ mhmh - check if it has a container.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1265
                (mgr checkForExistingContainerForClass:aClass) ifFalse:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1266
                    (self createSourceContainerForClass:aClass usingManager:mgr) ifFalse:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1267
                        self warn:'Did not create/change repository container for ''' , aClass name allBold , ''''.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1268
                        ^ false.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1269
                    ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1270
                    freshCreated := true.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1271
                ]
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1272
            ]
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1273
        ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1274
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1275
        doCheckClassHolder value ifTrue:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1276
            "/ check if the class contains halts, error-sends etc.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1277
            (self checkAndWarnAboutBadMessagesInClass:aClass checkAgainHolder:doCheckClassHolder) ifFalse:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1278
                ^ false
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1279
            ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1280
        ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1281
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1282
        freshCreated ifFalse:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1283
            aborted := false.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1284
            AbortOperationRequest handle:[:ex |
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1285
                aborted := true.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1286
                ex return.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1287
            ] do:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1288
                |checkinState cause|
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1289
                checkinState := false.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1290
                cause := ''.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1291
                [
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1292
                    checkinState := mgr checkinClass:aClass logMessage:logMessage
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1293
                ] on:SourceCodeManagerError do:[:ex| 
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1294
                    cause := ex description.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1295
                    "/ ex proceed.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1296
                ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1297
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1298
                checkinState ifFalse:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1299
                    Transcript showCR:'checkin of ''' , aClass name , ''' failed - ', cause.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1300
                    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
  1301
                    AbortOperationRequest raise.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1302
                    "/ ^ false.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1303
                ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1304
                checkinInfo notNil ifTrue:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1305
                    checkinInfo isStable ifTrue:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1306
                        "set stable tag for class that has been checked in"
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1307
                        self tagClass:aClass as:#stable.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1308
                    ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1309
                    checkinInfo tagIt ifTrue:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1310
                        "set any additional tags for the class that has been checked in"
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1311
                        (checkinInfo tag asCollectionOfSubstringsSeparatedByAny:',;') do:[:eachTag |
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1312
                            self tagClass:aClass as:eachTag withoutSeparators.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1313
                        ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1314
                    ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1315
                    CVSSourceCodeManager recentTag:checkinInfo tag.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1316
                ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1317
            ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1318
            aborted ifTrue:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1319
                Transcript showCR:'Checkin of ''' , aClass name , ''' aborted'.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1320
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1321
                AbortAllOperationWantedQuery query ifTrue:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1322
                    (Dialog 
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1323
                        confirm:(resources stringWithCRs:'Checkin of "%1" aborted.\\Cancel all ?' with:aClass name)
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1324
                        default:false)
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1325
                    ifTrue:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1326
                        AbortAllOperationRequest raise.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1327
                    ]
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1328
                ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1329
                ^ false.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1330
            ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1331
        ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1332
    ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1333
    ^ true
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1334
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1335
    "Created: / 21-12-2011 / 18:19:14 / cg"
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1336
!
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1337
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1338
checkinClasses:aCollectionOfClass
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1339
    "check a collection of classes into the source repository.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1340
     Asks interactively for log-message."
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1341
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1342
    ^ self checkinClasses:aCollectionOfClass withInfo:nil
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1343
!
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1344
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1345
checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrNil
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1346
    "check a bunch of classes into the source repository.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1347
     If the argument, aLogInfoOrNil isNil, ask interactively for log-message."
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1348
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1349
    |checkClassWhenCheckingInHolder|
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1350
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1351
    checkClassWhenCheckingInHolder := ValueHolder with:(UserPreferences current at:#checkClassesWhenCheckingIn ifAbsent:true).
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1352
    checkClassWhenCheckingInHolder 
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1353
        onChangeEvaluate:[ UserPreferences current at:#checkClassesWhenCheckingIn put:checkClassWhenCheckingInHolder value ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1354
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1355
    ^ self
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1356
        checkinClasses:aCollectionOfClasses 
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1357
        withInfo:aLogInfoOrNil 
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1358
        withCheck:checkClassWhenCheckingInHolder
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1359
!
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1360
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1361
checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrStringNil withCheck:doCheckClassesHolder
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1362
    "check a bunch of classes into the source repository.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1363
     If the argument, aLogInfoOrStringNil isNil, ask interactively for log-message."
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1364
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1365
    self checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrStringNil withCheck:doCheckClassesHolder usingManager:nil
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1366
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1367
    "Modified: / 21-12-2011 / 18:24:47 / cg"
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1368
!
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1369
3818
25607a4f1e98 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3814
diff changeset
  1370
checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrStringOrNil withCheck:doCheckClassesHolder usingManager:aManagerOrNil
3602
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1371
    "check a bunch of classes into the source repository.
3818
25607a4f1e98 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3814
diff changeset
  1372
     If the argument, aLogInfoOrStringOrNil isNil, ask interactively for log-message."
3602
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1373
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1374
    |classes allClasses checkinInfoOrString yesOrNoToAll unchangedClasses|
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1375
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1376
    "/ ignore private classes
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1377
    classes := aCollectionOfClasses select:[:aClass | aClass owningClass isNil].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1378
    classes isEmpty ifTrue:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1379
        self information:'Only private classes given - nothing checked in.'.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1380
        ^ self
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1381
    ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1382
    classes := classes select:[:aClass | aClass isLoaded].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1383
    classes isEmpty ifTrue:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1384
        self information:'Only unloaded classes given - nothing checked in.'.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1385
        ^ self
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1386
    ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1387
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1388
    classes size == 1 ifTrue:[
3818
25607a4f1e98 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3814
diff changeset
  1389
        ^ self checkinClass:classes first withInfo:aLogInfoOrStringOrNil withCheck:doCheckClassesHolder usingManager:aManagerOrNil.
3602
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1390
    ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1391
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1392
    "ask once, for all classes"
3818
25607a4f1e98 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3814
diff changeset
  1393
    aLogInfoOrStringOrNil isNil ifTrue:[
3602
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1394
        checkinInfoOrString := self 
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1395
                        getCheckinInfoFor:(resources string:'%1 classes to checkin' with:aCollectionOfClasses size)
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1396
                        initialAnswer:nil
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1397
                        withQuickOption:true.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1398
        checkinInfoOrString isNil ifTrue:[^ self].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1399
    ] ifFalse:[
3818
25607a4f1e98 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3814
diff changeset
  1400
        checkinInfoOrString := aLogInfoOrStringOrNil.
3602
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1401
    ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1402
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1403
    allClasses := classes.    
3818
25607a4f1e98 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3814
diff changeset
  1404
    (checkinInfoOrString isString not and:[checkinInfoOrString quickCheckIn]) ifTrue:[
3602
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1405
        "/ not only the one's in the changeSet;
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1406
        "/ also those which have not been checked in before.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1407
        classes := classes select:[:each | each hasUnsavedChanges or:[ (each revisionOfManager:aManagerOrNil) isNil ]].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1408
        classes isEmpty ifTrue:[ Dialog information:'no changes to checkin (quickCheckIn)' ]
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1409
    ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1410
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1411
    "abortAll is handled, and also asked for here!!"
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1412
    AbortAllOperationRequest handleAndAnswerQueryIn:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1413
        classes notEmpty ifTrue:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1414
            self yesToAllNotification handle:[:ex |
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1415
                yesOrNoToAll := ex parameter.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1416
                ex proceed
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1417
            ] do:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1418
                self yesToAllQuery handle:[:ex |
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1419
                    ex proceedWith:yesOrNoToAll
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1420
                ] do:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1421
                    classes do:[:aClass |
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1422
                        self activityNotification:(resources string:'checking in %1' with:aClass name).
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1423
                        "/ ca does not want boxes to pop up all over ...
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1424
                        UserInformation handle:[:ex |
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1425
                            Transcript showCR:ex description.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1426
                            ex proceed.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1427
                        ] do:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1428
                            AbortOperationRequest catch:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1429
                                self 
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1430
                                    checkinClass:aClass 
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1431
                                    withInfo:checkinInfoOrString 
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1432
                                    withCheck:doCheckClassesHolder
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1433
                                    usingManager:aManagerOrNil
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1434
                            ]
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1435
                        ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1436
                    ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1437
                ]
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1438
            ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1439
        ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1440
3818
25607a4f1e98 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3814
diff changeset
  1441
        (checkinInfoOrString isString not and:[ (checkinInfoOrString isStable or:[checkinInfoOrString tagIt]) ])
3602
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1442
        ifTrue:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1443
            "/mhmh - but tag should be set on all (even unchanged ones)
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1444
            "/ the other onces have already been tagged
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1445
            unchangedClasses := allClasses reject:[:eachClass | (classes includes:eachClass)].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1446
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1447
            "mhmh - could still have to tag them"
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1448
            checkinInfoOrString isStable ifTrue:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1449
                unchangedClasses do:[:eachClass |
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1450
                    self tagClass:eachClass as:#stable.
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1451
                ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1452
            ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1453
            checkinInfoOrString tagIt ifTrue:[
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1454
                unchangedClasses do:[:eachClass |
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1455
                    self tagClass:eachClass as:(checkinInfoOrString tag).
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1456
                ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1457
            ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1458
        ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1459
    ].
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1460
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1461
    "Created: / 21-12-2011 / 18:24:25 / cg"
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1462
!
d5a67c9e51dd class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3594
diff changeset
  1463
986
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  1464
checkoutClass:aClass askForMerge:askForMerge
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  1465
    "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
  1466
1006
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1467
    self
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1468
        checkoutClass:aClass 
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1469
        askForRevision:true
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1470
        askForMerge:askForMerge
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1471
!
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1472
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1473
checkoutClass:aClass askForRevision:askForRevision askForMerge:askForMerge
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1474
    "check-out a class from the source repository.
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1475
     If askForRevision is false, check-out the newest version."
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1476
2013
0457926edfdb allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents: 2009
diff changeset
  1477
    self
0457926edfdb allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents: 2009
diff changeset
  1478
        checkoutClass:aClass askForRevision:askForRevision askForMerge:askForMerge 
0457926edfdb allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents: 2009
diff changeset
  1479
        askForConfirmation:true
0457926edfdb allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents: 2009
diff changeset
  1480
!
0457926edfdb allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents: 2009
diff changeset
  1481
0457926edfdb allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents: 2009
diff changeset
  1482
checkoutClass:aClass askForRevision:askForRevision askForMerge:askForMerge askForConfirmation:askForConfirmation
0457926edfdb allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents: 2009
diff changeset
  1483
    "check-out a class from the source repository.
0457926edfdb allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents: 2009
diff changeset
  1484
     If askForRevision is false, check-out the newest version."
0457926edfdb allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents: 2009
diff changeset
  1485
2948
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  1486
    |mgr sourceInfo
1339
9a1e91c28cb3 checkOut dialog labels
Claus Gittinger <cg@exept.de>
parents: 1338
diff changeset
  1487
     currentClass inChangeSet
1055
f44b12442c58 version update after load from rep.
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  1488
     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
  1489
     nm msg rev2 newestRev
1030
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  1490
     containerModule containerPackage containerFile rslt
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  1491
     pkg listHere listRep diffSet 
1054
4ecc5aeca084 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  1492
     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
  1493
     changedClasses default versionMethodsHere versionMethodsRep changedClassDefinitions
3ca8838014ee dont ask for changeSet-compression if the loaded
Claus Gittinger <cg@exept.de>
parents: 1877
diff changeset
  1494
     wasInChangeSetBefore|
986
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  1495
1189
fdc5e747c184 refactored check for a valid sourceCodeManager into one place
Claus Gittinger <cg@exept.de>
parents: 1185
diff changeset
  1496
    aClass isNil ifTrue:[self error:'nil class'].
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1497
986
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  1498
    currentClass := aClass theNonMetaclass.
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  1499
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  1500
    nm := currentClass name.
1189
fdc5e747c184 refactored check for a valid sourceCodeManager into one place
Claus Gittinger <cg@exept.de>
parents: 1185
diff changeset
  1501
    mgr := self sourceCodeManagerFor:currentClass.
986
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  1502
    mgr isNil ifTrue:[
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  1503
        ^ self
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  1504
    ].
1084
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1505
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1506
    sourceInfo := mgr sourceInfoOfClass:currentClass.
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1507
    sourceInfo notNil ifTrue:[
2209
e3a4510c45f2 Project noProjectID -> PackageId noProjectID
Claus Gittinger <cg@exept.de>
parents: 2200
diff changeset
  1508
        currentClass package ~= PackageId noProjectID ifTrue:[
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
  1509
            containerPackage := mgr directoryFromSourceInfo:sourceInfo.
1084
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1510
            containerModule := mgr moduleFromSourceInfo:sourceInfo.
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1511
        ].
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1512
        containerFile := mgr containerFromSourceInfo:sourceInfo.
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1513
    ].
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1514
989
bb70a0f30e98 care for autoloaded classes when checking out
Claus Gittinger <cg@exept.de>
parents: 987
diff changeset
  1515
    currentClass isLoaded ifTrue:[
bb70a0f30e98 care for autoloaded classes when checking out
Claus Gittinger <cg@exept.de>
parents: 987
diff changeset
  1516
        rev := currentClass binaryRevision.
bb70a0f30e98 care for autoloaded classes when checking out
Claus Gittinger <cg@exept.de>
parents: 987
diff changeset
  1517
        rev2 := currentClass revision.
bb70a0f30e98 care for autoloaded classes when checking out
Claus Gittinger <cg@exept.de>
parents: 987
diff changeset
  1518
        rev isNil ifTrue:[
bb70a0f30e98 care for autoloaded classes when checking out
Claus Gittinger <cg@exept.de>
parents: 987
diff changeset
  1519
            rev := rev2
bb70a0f30e98 care for autoloaded classes when checking out
Claus Gittinger <cg@exept.de>
parents: 987
diff changeset
  1520
        ].
bb70a0f30e98 care for autoloaded classes when checking out
Claus Gittinger <cg@exept.de>
parents: 987
diff changeset
  1521
        rev isNil ifTrue:[
1084
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1522
            pkg := currentClass package.
2209
e3a4510c45f2 Project noProjectID -> PackageId noProjectID
Claus Gittinger <cg@exept.de>
parents: 2200
diff changeset
  1523
            (pkg notNil and:[pkg ~= PackageId noProjectID]) ifTrue:[
1019
efc461bc89dc asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
  1524
                containerModule := pkg upTo:$:.
efc461bc89dc asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
  1525
                containerPackage := pkg copyFrom:(containerModule size + 2).
efc461bc89dc asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
  1526
            ].
efc461bc89dc asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
  1527
            containerModule size == 0 ifTrue:[
2791
0601ded0300b changed:
Stefan Vogel <sv@exept.de>
parents: 2775
diff changeset
  1528
                containerModule := (self class lastModule ) ? Project current repositoryModule.
1019
efc461bc89dc asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
  1529
            ].
efc461bc89dc asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
  1530
            containerPackage size == 0 ifTrue:[
2791
0601ded0300b changed:
Stefan Vogel <sv@exept.de>
parents: 2775
diff changeset
  1531
                containerPackage := (self class lastPackage ) ? Project current package.
1019
efc461bc89dc asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
  1532
            ].
1030
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  1533
            answer := self confirmWithCancel:(resources 
1035
092c701c91f3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
  1534
                                                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
  1535
                                                with:containerModule allBold 
1035
092c701c91f3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
  1536
                                                with:containerPackage allBold
1084
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1537
                                                with:currentClass name allBold) withCRs.
1030
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  1538
            answer isNil ifTrue:[^ self "cancelled"].
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  1539
            answer ifFalse:[
2791
0601ded0300b changed:
Stefan Vogel <sv@exept.de>
parents: 2775
diff changeset
  1540
                rslt := self
1030
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  1541
                    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
  1542
                    title:'Container to load from' note:nil 
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  1543
                    initialModule:containerModule 
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  1544
                    initialPackage:containerPackage 
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1545
                    initialFileName:(currentClass nameWithoutPrefix , '.st')
1030
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  1546
                    forNewContainer:false.
1084
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1547
1030
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  1548
                rslt isNil ifTrue:[
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  1549
                    "/ canel
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  1550
                    ^ self
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  1551
                ].
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  1552
                containerModule := "lastModule :=" rslt at:#module.
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  1553
                containerPackage := "lastPackage :=" rslt at:#package.
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  1554
                containerFile := rslt at:#fileName.
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  1555
            ].
1019
efc461bc89dc asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
  1556
2791
0601ded0300b changed:
Stefan Vogel <sv@exept.de>
parents: 2775
diff changeset
  1557
"/            rslt := self
1019
efc461bc89dc asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
  1558
"/                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
  1559
"/                title:'Container to checkOut' note:nil 
efc461bc89dc asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
  1560
"/                initialModule:containerModule 
efc461bc89dc asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
  1561
"/                initialPackage:containerPackage
efc461bc89dc asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
  1562
"/                initialFileName:(currentClass name , '.st').
1030
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  1563
"/                forNewContainer:false.
1019
efc461bc89dc asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
  1564
"/            rslt isNil ifTrue:[^ self].
efc461bc89dc asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
  1565
            "/ 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
  1566
            "/ ^ self
989
bb70a0f30e98 care for autoloaded classes when checking out
Claus Gittinger <cg@exept.de>
parents: 987
diff changeset
  1567
        ].
986
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  1568
    ].
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  1569
1966
d2e8ac3b2c0b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1964
diff changeset
  1570
    containerFile isNil ifTrue:[
d2e8ac3b2c0b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1964
diff changeset
  1571
        containerFile := currentClass classFilename.
d2e8ac3b2c0b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1964
diff changeset
  1572
    ].
d2e8ac3b2c0b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1964
diff changeset
  1573
986
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  1574
    "/
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  1575
    "/ 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
  1576
    "/
1978
91cb79a651aa *** empty log message ***
Michael Beyl <mb@exept.de>
parents: 1972
diff changeset
  1577
    containerModule isNil ifTrue:[
1982
305ae0785e65 nicer dialog
Claus Gittinger <cg@exept.de>
parents: 1978
diff changeset
  1578
        containerModule := Dialog request:(resources 
305ae0785e65 nicer dialog
Claus Gittinger <cg@exept.de>
parents: 1978
diff changeset
  1579
                                        stringWithCRs:'Missing Module Information for CheckOut of "%1".\\Module:'
305ae0785e65 nicer dialog
Claus Gittinger <cg@exept.de>
parents: 1978
diff changeset
  1580
                                        with:aClass name allBold).
1978
91cb79a651aa *** empty log message ***
Michael Beyl <mb@exept.de>
parents: 1972
diff changeset
  1581
        containerModule isEmptyOrNil ifTrue:[^ self].
91cb79a651aa *** empty log message ***
Michael Beyl <mb@exept.de>
parents: 1972
diff changeset
  1582
    ].
91cb79a651aa *** empty log message ***
Michael Beyl <mb@exept.de>
parents: 1972
diff changeset
  1583
    containerPackage isNil ifTrue:[
1982
305ae0785e65 nicer dialog
Claus Gittinger <cg@exept.de>
parents: 1978
diff changeset
  1584
        containerPackage := Dialog request:(resources 
305ae0785e65 nicer dialog
Claus Gittinger <cg@exept.de>
parents: 1978
diff changeset
  1585
                                        stringWithCRs:'Missing Package Information for CheckOut of "%1".\\Package:'
305ae0785e65 nicer dialog
Claus Gittinger <cg@exept.de>
parents: 1978
diff changeset
  1586
                                        with:aClass name allBold).
1978
91cb79a651aa *** empty log message ***
Michael Beyl <mb@exept.de>
parents: 1972
diff changeset
  1587
        containerPackage isEmptyOrNil ifTrue:[^ self].
91cb79a651aa *** empty log message ***
Michael Beyl <mb@exept.de>
parents: 1972
diff changeset
  1588
    ].
91cb79a651aa *** empty log message ***
Michael Beyl <mb@exept.de>
parents: 1972
diff changeset
  1589
1084
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1590
    newestRev := mgr newestRevisionInFile:containerFile directory:containerPackage module:containerModule.
1006
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1591
    askForRevision ifFalse:[
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1592
        rev := newestRev ? ''
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1593
    ] ifTrue:[
1019
efc461bc89dc asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
  1594
        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
  1595
        rev notNil ifTrue:[
1006
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1596
            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
  1597
                                           with:nm allBold with:rev).
1006
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1598
            (rev2 notNil and:[rev2 ~= rev]) ifTrue:[
2539
abce5c41eef8 comment/format in: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2522
diff changeset
  1599
                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
  1600
            ]
986
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  1601
        ].
1006
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1602
        newestRev notNil ifTrue:[
2539
abce5c41eef8 comment/format in: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2522
diff changeset
  1603
            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
  1604
        ].
986
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  1605
2791
0601ded0300b changed:
Stefan Vogel <sv@exept.de>
parents: 2775
diff changeset
  1606
        rev := self
1006
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1607
                    askForExistingRevision:msg 
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1608
                    title:'CheckOut from repository' 
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1609
                    class:currentClass.
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1610
        rev isNil ifTrue:[
1339
9a1e91c28cb3 checkOut dialog labels
Claus Gittinger <cg@exept.de>
parents: 1338
diff changeset
  1611
            ^ self   "/ canceled
987
fa4fc87b8540 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 986
diff changeset
  1612
        ].
1006
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1613
    ].
986
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  1614
1006
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1615
    rev withoutSpaces isEmpty ifTrue:[
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1616
        msg := 'extracting newest %1 (' , (newestRev ? '???') , ')'.
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1617
        "/ aStream := mgr getMostRecentSourceStreamForClassNamed:nm.
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1618
        aStream := mgr getSourceStreamFor:currentClass revision:newestRev.
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1619
        revString := '(newest: ' , (newestRev ? '???') , ')'.
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1620
    ] ifFalse:[
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1621
        msg := 'extracting previous %1'.
1084
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1622
"/        aStream := mgr getSourceStreamFor:currentClass revision:rev.
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1623
"/        revString := rev
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1624
        aStream := mgr  
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1625
            streamForClass:currentClass
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1626
            fileName:containerFile 
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1627
            revision:rev 
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1628
            directory:containerPackage 
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1629
            module:containerModule
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1630
            cache:true.
1006
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1631
    ].
996
551841dd0105 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 992
diff changeset
  1632
1006
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1633
    aStream isNil ifTrue:[
1800
560e29381f52 ask for condense changeSet when loading the newest revision
Claus Gittinger <cg@exept.de>
parents: 1787
diff changeset
  1634
        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
  1635
        ^ self
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1636
    ].
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1637
    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
  1638
        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
  1639
        aStream close.
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1640
        ^ self
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1641
    ] do:[
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1642
        sourceToLoad := aStream contents asString.
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1643
    ].
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1644
    aStream close.
987
fa4fc87b8540 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 986
diff changeset
  1645
1919
8d30ac5be40f *** empty log message ***
boris
parents: 1913
diff changeset
  1646
    wasInChangeSetBefore := ChangeSet current includesChangeForClassOrMetaclass:currentClass.
1879
3ca8838014ee dont ask for changeSet-compression if the loaded
Claus Gittinger <cg@exept.de>
parents: 1877
diff changeset
  1647
1006
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1648
    currentClass isLoaded ifFalse:[
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1649
        rev = newestRev ifTrue:[
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1650
            currentClass autoload.
996
551841dd0105 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 992
diff changeset
  1651
        ] ifFalse:[
1006
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1652
            sourceToLoad readStream fileIn.
996
551841dd0105 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 992
diff changeset
  1653
        ].
1879
3ca8838014ee dont ask for changeSet-compression if the loaded
Claus Gittinger <cg@exept.de>
parents: 1877
diff changeset
  1654
        wasInChangeSetBefore ifFalse:[
3ca8838014ee dont ask for changeSet-compression if the loaded
Claus Gittinger <cg@exept.de>
parents: 1877
diff changeset
  1655
            ChangeSet current condenseChangesForClass:currentClass.
3ca8838014ee dont ask for changeSet-compression if the loaded
Claus Gittinger <cg@exept.de>
parents: 1877
diff changeset
  1656
        ].
1006
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1657
        ^ self.
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1658
    ].
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1659
2236
050566d67400 changed:
Claus Gittinger <cg@exept.de>
parents: 2233
diff changeset
  1660
    inChangeSet := aClass hasUnsavedChanges.
1800
560e29381f52 ask for condense changeSet when loading the newest revision
Claus Gittinger <cg@exept.de>
parents: 1787
diff changeset
  1661
1972
32853d3cb43a care for errors during fileOut ofr local source
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  1662
    Error handle:[:ex |
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1663
        (Dialog 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1664
            confirm:(resources 
2426
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1665
                        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
  1666
                        with:ex description 
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1667
                        with:currentClass name allBold) 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1668
            noLabel:'Cancel') 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1669
        ifFalse:[
1999
57cad7a53262 changed #checkOutClasse
Stefan Vogel <sv@exept.de>
parents: 1997
diff changeset
  1670
            AbortOperationRequest raise
1972
32853d3cb43a care for errors during fileOut ofr local source
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  1671
        ].
2426
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1672
        sourceToLoad readStream fileIn.
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1673
        ^ self.
1972
32853d3cb43a care for errors during fileOut ofr local source
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  1674
    ] do:[
2426
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1675
        self activityNotification:'generating current source...'.
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1676
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1677
        currentSource := self sourceCodeOfClass:currentClass.
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1678
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1679
        self activityNotification:'comparing...'.
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1680
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1681
        sourceToLoad = currentSource ifTrue:[
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1682
            "/ make all methods belong to the classes project
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1683
            self setPackageOfAllMethodsIn:aClass to:aClass package.
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1684
            inChangeSet ifTrue:[
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1685
                rev = newestRev ifTrue:[
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1686
                    (askForConfirmation not
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1687
                    or:[ wasInChangeSetBefore not
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1688
                    or:[ self confirm:(resources 
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1689
                                    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
  1690
                                    with:aClass name)]]) 
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1691
                    ifTrue:[
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1692
                        ChangeSet current condenseChangesForClass:aClass.
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1693
                    ].
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1694
                ].
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1695
            ].
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1696
            self activityNotification:'... nothing changed in repository'.
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1697
            ^ self.
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1698
        ].
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1699
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1700
        self activityNotification:'generating diffSet...'.
1972
32853d3cb43a care for errors during fileOut ofr local source
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  1701
        listHere := ChangeSet fromStream:(currentSource readStream).
32853d3cb43a care for errors during fileOut ofr local source
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  1702
    ].
2426
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1703
1006
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1704
    listRep := ChangeSet fromStream:(sourceToLoad readStream).
1051
9f76e78c91d4 *** empty log message ***
frank
parents: 1050
diff changeset
  1705
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1706
    Error handle:[:ex |
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1707
        (Dialog 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1708
            confirm:(resources 
2426
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1709
                        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
  1710
                        with:ex description
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1711
                    ) 
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1712
            noLabel:'Cancel') 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1713
        ifFalse:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1714
            ^ self
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1715
        ].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1716
        sourceToLoad readStream fileIn.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1717
        ^ self.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1718
    ] do:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1719
        versionMethodsHere := listHere select:[:change | (change isMethodChange 
3354
d36778f0ff0b class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3351
diff changeset
  1720
                                               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
  1721
                                               and:[change changeClass isMeta]])].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1722
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1723
        versionMethodsRep := listRep select:[:change | (change isMethodChange 
3354
d36778f0ff0b class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3351
diff changeset
  1724
                                               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
  1725
                                               and:[change changeClass isMeta]])].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1726
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1727
        "/ compare all but the version methods
3291
7fc5a1fea0fd Fix stc compiler warnings
Stefan Vogel <sv@exept.de>
parents: 3287
diff changeset
  1728
        listHere := listHere reject:[:change | (change isMethodChange 
2184
4bb6267612be changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
fm
parents: 2175
diff changeset
  1729
                                               and:[(AbstractSourceCodeManager isVersionMethodSelector:change selector)
3291
7fc5a1fea0fd Fix stc compiler warnings
Stefan Vogel <sv@exept.de>
parents: 3287
diff changeset
  1730
                                               and:[change changeClass isMeta]])].
7fc5a1fea0fd Fix stc compiler warnings
Stefan Vogel <sv@exept.de>
parents: 3287
diff changeset
  1731
        listRep := listRep reject:[:change | (change isMethodChange 
2184
4bb6267612be changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
fm
parents: 2175
diff changeset
  1732
                                               and:[(AbstractSourceCodeManager isVersionMethodSelector:change selector)
3291
7fc5a1fea0fd Fix stc compiler warnings
Stefan Vogel <sv@exept.de>
parents: 3287
diff changeset
  1733
                                               and:[change changeClass isMeta]])].
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1734
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1735
        diffSet := listHere diffSetsAgainst:listRep.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1736
        changed := diffSet changed.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1737
        onlyHere := diffSet onlyInReceiver.
2794
77c62d93cc76 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2793
diff changeset
  1738
77c62d93cc76 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2793
diff changeset
  1739
        "/ reject extensions
77c62d93cc76 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2793
diff changeset
  1740
        onlyHere := onlyHere reject:[:eachDiff|  
2774
46c3fee4b485 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2719
diff changeset
  1741
                        |method methodsPackage|
2794
77c62d93cc76 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2793
diff changeset
  1742
3272
6ce72ad3d416 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3261
diff changeset
  1743
                        eachDiff isMethodChange  
2794
77c62d93cc76 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2793
diff changeset
  1744
                        and:[ eachDiff changeClass notNil
77c62d93cc76 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2793
diff changeset
  1745
                        and:[ (method := (eachDiff changeClass compiledMethodAt:eachDiff selector)) notNil 
77c62d93cc76 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2793
diff changeset
  1746
                        and:[ (methodsPackage := method package) ~= containerPackage
77c62d93cc76 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2793
diff changeset
  1747
                        and:[ methodsPackage ~= PackageId noProjectID  ]]]]
77c62d93cc76 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2793
diff changeset
  1748
                    ]. 
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1749
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1750
        onlyInRep := diffSet onlyInArg.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1751
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1752
        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
  1753
        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
  1754
        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
  1755
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1756
        labels := #('Cancel' 'Merge' 'Load'). 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1757
        values := #(nil #merge #load). 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1758
        default := askForRevision 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1759
                        ifTrue:[3. "i.e. load"]
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1760
                        ifFalse:[2. "i.e. merge"].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1761
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1762
        msg := 'About to load ''%4''.\\'.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1763
        onlyInRep size > 0 ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1764
            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
  1765
        ].
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1766
        onlyHere size > 0 ifTrue:[
2794
77c62d93cc76 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2793
diff changeset
  1767
            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
  1768
            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
  1769
        ].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1770
        changed size > 0 ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1771
            changed size == 1 ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1772
                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
  1773
                singleChangeSelector := changed first first selector allBold
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1774
            ] ifFalse:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1775
                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
  1776
            ]
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1777
        ].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1778
        changedClassDefinitions size > 0 ifTrue:[
2794
77c62d93cc76 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2793
diff changeset
  1779
            msg := msg , (changedClassDefinitions size == 1 
77c62d93cc76 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2793
diff changeset
  1780
                            ifTrue:['The class definition is different.\\'] 
77c62d93cc76 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2793
diff changeset
  1781
                            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
  1782
        ].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1783
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1784
        onlyHere isEmpty ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1785
            onlyInRep isEmpty ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1786
                (changed isEmpty and:[changedClassDefinitions isEmpty]) ifTrue:[
2605
93f1e7e8aee7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2602
diff changeset
  1787
                    versionMethodsRep notEmpty ifTrue:[
93f1e7e8aee7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2602
diff changeset
  1788
                        (self confirm:(resources string:'Only version methods are different in %1.\\Update the version-IDs ?' with:aClass name allBold) withCRs) ifTrue:[
93f1e7e8aee7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2602
diff changeset
  1789
                            versionMethodsRep do:[:each | each apply].
93f1e7e8aee7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2602
diff changeset
  1790
                        ]
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1791
                    ].
2193
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
  1792
                    "/ make all those methods belong to the classes project
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
  1793
                    "/ no - that is wrong !! self setPackageOfAllMethodsIn:aClass to:aClass package.
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
  1794
                    self setPackageOfAllMethodsInChangeSet:listRep to:aClass package.
2605
93f1e7e8aee7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2602
diff changeset
  1795
                    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
  1796
                    ^ self
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1797
                ].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1798
                inChangeSet ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1799
                    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
  1800
                ].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1801
                labels := #('Cancel' 'Load'). 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1802
                values := #(nil #load). 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1803
                default := askForRevision 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1804
                                ifTrue:[2. "i.e. load"]
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1805
                                ifFalse:[1. "i.e. cancel"].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1806
                default := 2. 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1807
            ] ifFalse:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1808
                changed isEmpty ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1809
                    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
  1810
                    labels := #('Cancel' 'Load'). 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1811
                    values := #(nil #load). 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1812
                    default := askForRevision 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1813
                                    ifTrue:[2. "i.e. load"]
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1814
                                    ifFalse:[1. "i.e. cancel"].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1815
                    default := 2. 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1816
                ] ifFalse:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1817
                    inChangeSet ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1818
                        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
  1819
                    ].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1820
                    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
  1821
                ].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1822
            ]
1006
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1823
        ] ifFalse:[
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1824
            onlyInRep isEmpty ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1825
                inChangeSet ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1826
                    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
  1827
                    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
  1828
                ].
1121
7531e9dd8ba8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1120
diff changeset
  1829
                labels := #('Cancel' 'Load'). 
987
fa4fc87b8540 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 986
diff changeset
  1830
                values := #(nil #load). 
1007
44c0229bcb43 better dialog message text and load/cancel default.
Claus Gittinger <cg@exept.de>
parents: 1006
diff changeset
  1831
                default := askForRevision 
44c0229bcb43 better dialog message text and load/cancel default.
Claus Gittinger <cg@exept.de>
parents: 1006
diff changeset
  1832
                                ifTrue:[2. "i.e. load"]
44c0229bcb43 better dialog message text and load/cancel default.
Claus Gittinger <cg@exept.de>
parents: 1006
diff changeset
  1833
                                ifFalse:[1. "i.e. cancel"].
1907
30ca5aea5a7a dialogs defaults
fm
parents: 1886
diff changeset
  1834
                default := 2. 
987
fa4fc87b8540 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 986
diff changeset
  1835
            ] ifFalse:[
1339
9a1e91c28cb3 checkOut dialog labels
Claus Gittinger <cg@exept.de>
parents: 1338
diff changeset
  1836
                inChangeSet ifTrue:[
9a1e91c28cb3 checkOut dialog labels
Claus Gittinger <cg@exept.de>
parents: 1338
diff changeset
  1837
                    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
  1838
                    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
  1839
                ]
1339
9a1e91c28cb3 checkOut dialog labels
Claus Gittinger <cg@exept.de>
parents: 1338
diff changeset
  1840
            ]
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1841
        ].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1842
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1843
        msg := msg bindWith:onlyInRep size printString 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1844
                   with:onlyHere size printString 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1845
                   with:changed size printString
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1846
                   with:aClass name allBold
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1847
                   with:changedClassDefinitions size printString
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1848
                   with:singleChangeSelector.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1849
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1850
        askForConfirmation ifFalse:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1851
            answer := #load           
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1852
        ] ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1853
            answer := (Dialog confirmWithCancel:msg withCRs
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1854
                   labels:(resources array:labels)
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1855
                   values:values 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1856
                   default:default).
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1857
            answer isNil ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1858
                self activityNotification:'...cancelled'.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1859
                ^ self
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1860
            ].
2013
0457926edfdb allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents: 2009
diff changeset
  1861
        ].
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1862
        self activityNotification:'updating...'.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1863
        changedClasses := IdentitySet new.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1864
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1865
        answer == #load ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1866
            "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
  1867
             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
  1868
            onlyHere do:[:eachChange |   
3272
6ce72ad3d416 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3261
diff changeset
  1869
                "remove this change (method not present in repository version)"
6ce72ad3d416 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3261
diff changeset
  1870
                |cClass|
6ce72ad3d416 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3261
diff changeset
  1871
                eachChange isMethodChange ifTrue:[
6ce72ad3d416 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3261
diff changeset
  1872
                    cClass := eachChange changeClass.
6ce72ad3d416 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3261
diff changeset
  1873
                    cClass notNil ifTrue:[ 
6ce72ad3d416 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3261
diff changeset
  1874
                       cClass basicRemoveSelector:eachChange selector 
6ce72ad3d416 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3261
diff changeset
  1875
                    ].
6ce72ad3d416 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3261
diff changeset
  1876
                ]
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1877
            ].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1878
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1879
            changedClassDefinitions do:[:eachChangeArr | 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1880
                |cHere eachChangedClass| 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1881
                cHere := eachChangeArr at:1.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1882
                eachChangedClass := cHere changeClass.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1883
                eachChangedClass notNil ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1884
                    changedClasses add:eachChangedClass.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1885
                    eachChangedClass := eachChangedClass theNonMetaclass.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1886
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1887
                    "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
  1888
                    changed do:[:eachChangeArr|
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1889
                        |eachChange eachClass|
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1890
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1891
                        eachChange := eachChangeArr first.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1892
                        eachChange isMethodChange ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1893
                            eachClass := eachChange changeClass.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1894
                            eachClass theNonMetaclass == eachChangedClass ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1895
                                eachClass basicRemoveSelector:eachChange selector.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1896
                            ].
1999
57cad7a53262 changed #checkOutClasse
Stefan Vogel <sv@exept.de>
parents: 1997
diff changeset
  1897
                        ].
57cad7a53262 changed #checkOutClasse
Stefan Vogel <sv@exept.de>
parents: 1997
diff changeset
  1898
                    ].
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1899
                ]
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1900
            ].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1901
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1902
           "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
  1903
           changedClassDefinitions do:[:eachChangeArr |    
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1904
                |cRep| 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1905
                cRep := eachChangeArr at:2.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1906
                cRep apply.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1907
            ].
1057
6903d4d5097d do not update the changesFile, when checkingOut
Claus Gittinger <cg@exept.de>
parents: 1056
diff changeset
  1908
        ].
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1909
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1910
        onlyInRep do:[:eachChange |
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1911
            |changeClass|
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1912
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1913
            "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
  1914
             eachChange apply.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1915
             eachChange isMethodChange ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1916
                 changeClass := eachChange changeClass.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1917
                 changeClass notNil ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1918
                     eachChange changeMethod setPackage:(changeClass package).
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1919
                     changedClasses add:changeClass.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1920
                 ]
2013
0457926edfdb allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents: 2009
diff changeset
  1921
             ]
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1922
        ]
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1923
    .
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1924
        answer == #load ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1925
            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
  1926
                 |cHere cRep| 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1927
                 cHere := eachChangeArr at:1.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1928
                 cRep := eachChangeArr at:2.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1929
                 cRep apply.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1930
                 cRep isMethodChange ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1931
                     cRep changeMethod setPackage:(cRep changeClass package).
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1932
                     changedClasses add:cRep changeClass.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1933
                 ]
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1934
            ].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1935
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1936
            versionMethodsRep size >= 1 ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1937
                versionMethodsRep last apply.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1938
            ] ifFalse:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1939
                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
  1940
            ].
2193
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
  1941
            "/ make all those methods belong to the classes project
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
  1942
            "/ no - that is wrong !! self setPackageOfAllMethodsIn:aClass to:aClass package.
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
  1943
            self setPackageOfAllMethodsInChangeSet:listRep to:aClass package.
1055
f44b12442c58 version update after load from rep.
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  1944
        ].
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1945
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1946
        answer == #load ifTrue:[
2236
050566d67400 changed:
Claus Gittinger <cg@exept.de>
parents: 2233
diff changeset
  1947
            inChangeSet := aClass hasUnsavedChanges.
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1948
            inChangeSet ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1949
                rev = newestRev ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1950
                    (wasInChangeSetBefore not
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1951
                     or:[ self confirm:(resources 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1952
                                    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
  1953
                                    with:aClass name)]) 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1954
                    ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1955
                        ChangeSet current condenseChangesForClass:aClass.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1956
                    ].
1800
560e29381f52 ask for condense changeSet when loading the newest revision
Claus Gittinger <cg@exept.de>
parents: 1787
diff changeset
  1957
                ].
560e29381f52 ask for condense changeSet when loading the newest revision
Claus Gittinger <cg@exept.de>
parents: 1787
diff changeset
  1958
            ].
560e29381f52 ask for condense changeSet when loading the newest revision
Claus Gittinger <cg@exept.de>
parents: 1787
diff changeset
  1959
        ].
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1960
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1961
        changedClasses do:[:eachClass |
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1962
             eachClass changed:#projectOrganization.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1963
        ].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1964
        Smalltalk changed:#projectOrganization.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1965
        self activityNotification:'... done'.
1800
560e29381f52 ask for condense changeSet when loading the newest revision
Claus Gittinger <cg@exept.de>
parents: 1787
diff changeset
  1966
    ].
560e29381f52 ask for condense changeSet when loading the newest revision
Claus Gittinger <cg@exept.de>
parents: 1787
diff changeset
  1967
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
  1968
    "Modified: / 07-02-2001 / 18:18:32 / ps"
3354
d36778f0ff0b class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3351
diff changeset
  1969
    "Modified: / 22-07-2013 / 13:17:32 / cg"
986
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  1970
!
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  1971
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
  1972
checkoutExtensionMethodsForPackage:packageToCheckOut askForRevision:askForRevision askForMerge:askForMerge usingManager:aSourceCodeManager
1522
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  1973
    "check-out a class from the source repository.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  1974
     If askForRevision is false, check-out the newest version."
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  1975
3291
7fc5a1fea0fd Fix stc compiler warnings
Stefan Vogel <sv@exept.de>
parents: 3287
diff changeset
  1976
    |inChangeSet extensionMethods msg
1704
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  1977
     listHere listRep diffSet 
1522
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  1978
     changed onlyHere onlyInRep answer labels values singleChangeSelector
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  1979
     changedClasses default |
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  1980
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
  1981
    listRep := self changeSetForExtensionMethodsForPackage:packageToCheckOut askForRevision:askForRevision usingManager:aSourceCodeManager.
1841
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  1982
    listRep isNil ifTrue:[ ^self ].
1522
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  1983
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  1984
    self activityNotification:'generating diffSet...'.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  1985
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  1986
    extensionMethods := OrderedCollection new.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  1987
    Smalltalk allClassesDo:[:aClass | |owner classPackage|
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  1988
        "/ individual methods ...
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  1989
        aClass isMeta ifFalse:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  1990
            (aClass package ~= packageToCheckOut) ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  1991
                aClass instAndClassSelectorsAndMethodsDo:[:sel :mthd |
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  1992
                    "/ methods in this project ...
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  1993
                    (mthd package = packageToCheckOut) ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  1994
                        "/ ... whose class is not in the ckechIn-set
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  1995
                        extensionMethods add:mthd
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  1996
                    ]
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  1997
                ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  1998
            ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  1999
        ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2000
    ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2001
    listHere := ChangeSet forExistingMethods:extensionMethods.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2002
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2003
    inChangeSet := listRep contains:[:someChange |
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2004
                            |cClass cSel|
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2005
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2006
                            someChange isMethodChange ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2007
                                cClass := someChange changeClass.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2008
                                cSel := someChange selector.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2009
                                ChangeSet current includesChangeForClass:cClass selector:cSel
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2010
                            ]
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2011
                    ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2012
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2013
    diffSet := listHere diffSetsAgainst:listRep.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2014
    changed := diffSet changed.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2015
    onlyHere := diffSet onlyInReceiver.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2016
    onlyInRep := diffSet onlyInArg.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2017
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2018
    labels := #('Cancel' 'Merge' 'Load'). 
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2019
    values := #(nil #merge #load). 
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2020
    default := askForRevision 
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2021
                    ifTrue:[3. "i.e. load"]
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2022
                    ifFalse:[2. "i.e. merge"].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2023
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2024
    msg := 'About to load extensions for ''%5''.\\'.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2025
    onlyInRep size > 0 ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2026
        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
  2027
    ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2028
    onlyHere size > 0 ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2029
        onlyInRep size > 0 ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2030
            msg := msg , 'And there '.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2031
        ] ifFalse:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2032
            msg := msg , 'There '.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2033
        ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2034
        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
  2035
    ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2036
    changed size > 0 ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2037
        changed size == 1 ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2038
            msg := msg , 'The ''%5''-method is different (present in both).\\'.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2039
            singleChangeSelector := changed first first selector allBold
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2040
        ] ifFalse:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2041
            msg := msg , '%3 methods are different (present in both).\\'.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2042
        ]
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2043
    ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2044
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2045
    onlyHere isEmpty ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2046
        onlyInRep isEmpty ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2047
            (changed isEmpty) ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2048
                listRep do:[:eachChange |
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2049
                    eachChange changeMethod setPackage:packageToCheckOut.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2050
                ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2051
                ^ self
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2052
            ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2053
            inChangeSet ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2054
                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
  2055
            ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2056
            labels := #('Cancel' 'Load'). 
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2057
            values := #(nil #load). 
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2058
            default := askForRevision 
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2059
                            ifTrue:[2. "i.e. load"]
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2060
                            ifFalse:[1. "i.e. cancel"].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2061
        ] ifFalse:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2062
            changed isEmpty ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2063
                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
  2064
                labels := #('Cancel' 'Load'). 
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2065
                values := #(nil #load). 
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2066
                default := askForRevision 
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2067
                                ifTrue:[2. "i.e. load"]
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2068
                                ifFalse:[1. "i.e. cancel"].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2069
            ] ifFalse:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2070
                inChangeSet ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2071
                    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
  2072
                ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2073
                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
  2074
            ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2075
        ]
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2076
    ] ifFalse:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2077
        onlyInRep isEmpty ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2078
            inChangeSet ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2079
                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
  2080
                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
  2081
            ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2082
            labels := #('Cancel' 'Load'). 
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2083
            values := #(nil #load). 
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2084
            default := askForRevision 
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2085
                            ifTrue:[2. "i.e. load"]
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2086
                            ifFalse:[1. "i.e. cancel"].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2087
        ] ifFalse:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2088
            inChangeSet ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2089
                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
  2090
                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
  2091
            ]
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2092
        ]
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2093
    ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2094
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2095
    msg := msg bindWith:onlyInRep size printString 
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2096
               with:onlyHere size printString 
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2097
               with:changed size printString
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2098
               with:singleChangeSelector
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2099
               with:packageToCheckOut allBold.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2100
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2101
    answer := (Dialog confirmWithCancel:msg withCRs
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2102
           labels:(resources array:labels)
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2103
           values:values 
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2104
           default:default).
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2105
    answer isNil ifTrue:[^ self].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2106
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2107
    self activityNotification:'updating...'.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2108
    changedClasses := IdentitySet new.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2109
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2110
"/    Class withoutUpdatingChangesDo:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2111
        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
  2112
                                     Class withoutUpdatingChangeSetDo:[ eachChange apply ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2113
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2114
                                     eachChange changeMethod setPackage:packageToCheckOut.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2115
                                     changedClasses add:eachChange changeClass.   
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2116
                     ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2117
        answer == #load ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2118
            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
  2119
                                         |cClass cSel|
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2120
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2121
                                         cClass := eachChange changeClass.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2122
                                         cSel := eachChange selector.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2123
                                         Class withoutUpdatingChangeSetDo:[ cClass removeSelector:cSel ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2124
                        ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2125
            changed do:[:eachChangeArr | "apply this change (go to rep-version)"
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2126
                                         |cHere cRep| 
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2127
                                         cHere := eachChangeArr at:1.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2128
                                         cRep := eachChangeArr at:2.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2129
                                         Class withoutUpdatingChangeSetDo:[ cRep apply ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2130
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2131
                                         cRep changeMethod setPackage:packageToCheckOut.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2132
                                         changedClasses add:cRep changeClass.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2133
                       ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2134
        ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2135
"/    ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2136
    changedClasses do:[:eachClass |
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2137
         eachClass changed:#projectOrganization.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2138
    ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2139
    Smalltalk changed:#projectOrganization.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2140
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2141
    "Modified: / 07-02-2001 / 18:18:32 / ps"
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
  2142
    "Created: / 29-12-2011 / 14:34:12 / cg"
1522
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2143
!
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2144
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2145
compareClassWithRepository:aClass
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2146
    "open a diff-textView comparing the current (in-image) version
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2147
     against its orgiginal version found in the repository."
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2148
1449
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2149
    self compareClassWithRepository:aClass askForRevision:true
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2150
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2151
    "
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2152
      self compareClassWithRepository:Array
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2153
    "
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2154
!
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2155
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2156
compareClassWithRepository:aClass askForRevision:askForRevision
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2157
    "open a diff-textView comparing the current (in-image) version
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2158
     against its orgiginal version found in the repository."
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2159
2948
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2160
    |classToCompare brwsr
1194
d60b2ed25f45 Remove unused method vars.
Stefan Vogel <sv@exept.de>
parents: 1193
diff changeset
  2161
     aStream comparedSource currentSource rev revString thisRevString mgr
1483
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  2162
     nm msg revisionInClass newestRev versionsAreTheSame|
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2163
1449
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2164
    classToCompare := aClass theNonMetaclass.
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2165
1449
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2166
    nm := classToCompare name.
2847
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  2167
    (mgr := manager) isNil ifTrue:[
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  2168
        mgr := self sourceCodeManagerFor:classToCompare.
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  2169
        mgr isNil ifTrue:[
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  2170
            self error:'oops - no sourcecode manager' mayProceed:true.
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  2171
            ^ self
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  2172
        ].
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2173
    ].
2397
e01669725571 changed: #compareClassWithRepository:askForRevision:
Claus Gittinger <cg@exept.de>
parents: 2383
diff changeset
  2174
e01669725571 changed: #compareClassWithRepository:askForRevision:
Claus Gittinger <cg@exept.de>
parents: 2383
diff changeset
  2175
    rev := classToCompare revisionInfoOfManager:mgr.
e01669725571 changed: #compareClassWithRepository:askForRevision:
Claus Gittinger <cg@exept.de>
parents: 2383
diff changeset
  2176
"/    rev := classToCompare binaryRevision.
3544
7efd6c5b392f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3536
diff changeset
  2177
    revisionInClass := classToCompare revisionOfManager:mgr.
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2178
    rev isNil ifTrue:[
1483
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  2179
        rev := revisionInClass
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2180
    ].
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2181
    rev isNil ifTrue:[
3546
13f0b8ba6c85 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3544
diff changeset
  2182
        (Dialog confirm:'Class seems to be not yet in the repository (or classes revision info is missing or corrupted)\\Proceed ?' withCRs)
1483
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  2183
        ifFalse:[
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  2184
            ^ self
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  2185
        ]
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2186
    ].
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2187
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2188
    "/
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2189
    "/ class in repository - ask for revision
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2190
    "/
2793
3732543d2393 changed: #compareClassWithRepository:askForRevision:
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  2191
    SourceCodeManagerError handle:[:ex |
3732543d2393 changed: #compareClassWithRepository:askForRevision:
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  2192
        Dialog warn:(resources 
3679
287d95522230 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3676
diff changeset
  2193
                                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)'
2793
3732543d2393 changed: #compareClassWithRepository:askForRevision:
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  2194
                                with:classToCompare name
3313
7765a349ce83 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3291
diff changeset
  2195
                                with:classToCompare sourceCodeManager managerTypeName
7765a349ce83 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3291
diff changeset
  2196
                                with:classToCompare package).
2793
3732543d2393 changed: #compareClassWithRepository:askForRevision:
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  2197
        ^ self.
3732543d2393 changed: #compareClassWithRepository:askForRevision:
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  2198
    ] do:[
3732543d2393 changed: #compareClassWithRepository:askForRevision:
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  2199
        newestRev := mgr newestRevisionOf:classToCompare.
3732543d2393 changed: #compareClassWithRepository:askForRevision:
Claus Gittinger <cg@exept.de>
parents: 2791
diff changeset
  2200
    ].
1449
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2201
    askForRevision ifTrue:[
1466
82e4152d5e9e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1462
diff changeset
  2202
        msg := resources string:'Compare to revision: (empty for newest)'.
1449
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2203
        rev notNil ifTrue:[
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2204
            msg := msg , '\\' , (resources string:'Current %1 is based upon rev %2.'
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2205
                                           with:nm allBold with:rev).
1483
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  2206
            (revisionInClass notNil and:[revisionInClass ~= rev]) ifTrue:[
1449
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2207
                msg := msg , '\' , (resources string:'And has been checked into the repository as %1.'
1483
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  2208
                                               with:revisionInClass)
1449
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2209
            ]
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2210
        ].
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2211
        newestRev notNil ifTrue:[
3261
7a585999dcef class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3259
diff changeset
  2212
            msg := msg , '\' , (resources string:'Newest in repository is %1.'
1449
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2213
                                           with:newestRev)
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2214
        ].
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2215
2791
0601ded0300b changed:
Stefan Vogel <sv@exept.de>
parents: 2775
diff changeset
  2216
        rev := self
1449
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2217
                    askForExistingRevision:msg 
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2218
                    title:'Compare with repository' 
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2219
                    class:classToCompare.
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2220
    ] ifFalse:[
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2221
        rev := newestRev.
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2222
    ].
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2223
3544
7efd6c5b392f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3536
diff changeset
  2224
    rev isNil ifTrue:[
7efd6c5b392f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3536
diff changeset
  2225
        mgr = classToCompare sourceCodeManager ifTrue:[
7efd6c5b392f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3536
diff changeset
  2226
            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)'
7efd6c5b392f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3536
diff changeset
  2227
        ] ifFalse:[
7efd6c5b392f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3536
diff changeset
  2228
            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)'
7efd6c5b392f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3536
diff changeset
  2229
        ].
7efd6c5b392f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3536
diff changeset
  2230
        Dialog warn:(resources 
7efd6c5b392f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3536
diff changeset
  2231
                                stringWithCRs:msg
7efd6c5b392f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3536
diff changeset
  2232
                                with:classToCompare name
7efd6c5b392f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3536
diff changeset
  2233
                                with:mgr managerTypeName
7efd6c5b392f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3536
diff changeset
  2234
                                with:classToCompare package
7efd6c5b392f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3536
diff changeset
  2235
                                with:(classToCompare sourceCodeManager managerTypeName)).
7efd6c5b392f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3536
diff changeset
  2236
        ^ self.
7efd6c5b392f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3536
diff changeset
  2237
        
7efd6c5b392f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3536
diff changeset
  2238
    ] ifFalse:[
1449
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2239
        rev withoutSpaces isEmpty ifTrue:[
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2240
            msg := 'extracting newest %1 (' , (newestRev ? '???') , ')'.
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2241
            "/ aStream := mgr getMostRecentSourceStreamForClassNamed:nm.
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2242
            aStream := mgr getSourceStreamFor:classToCompare revision:newestRev.
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2243
            revString := '(newest: ' , (newestRev ? '???') , ')'.
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2244
        ] ifFalse:[
1449
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2245
            msg := 'extracting previous %1'.
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2246
            aStream := mgr getSourceStreamFor:classToCompare revision:rev.
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2247
            revString := rev
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2248
        ].
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2249
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2250
        aStream isNil ifTrue:[
2692
e5b7d59ce49c changed: #compareClassWithRepository:askForRevision:
Claus Gittinger <cg@exept.de>
parents: 2691
diff changeset
  2251
            self warn:'Could not extract source from repository (check repository settings / network)'.
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2252
            ^ self
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2253
        ].
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2254
        aStream class readErrorSignal handle:[:ex |
2692
e5b7d59ce49c changed: #compareClassWithRepository:askForRevision:
Claus Gittinger <cg@exept.de>
parents: 2691
diff changeset
  2255
            self warn:('Read error while reading extracted source\\' , ex description) withCRs.
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2256
            aStream close.
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2257
            ^ self
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2258
        ] do:[
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2259
            comparedSource := aStream contents asString.
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2260
        ].
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2261
        aStream close.
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2262
1449
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2263
        self activityNotification:'generating current source...'.
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2264
1449
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2265
        currentSource := self sourceCodeOfClass:classToCompare.
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2266
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2267
        self activityNotification:'comparing...'.
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2268
1449
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2269
        versionsAreTheSame := false.
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2270
        comparedSource = currentSource ifTrue:[
1449
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2271
            versionsAreTheSame := true.
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2272
        ] ifFalse:[
1483
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  2273
            thisRevString := revisionInClass ? 'no revision'.
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2274
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2275
            revString = '(newest)' ifTrue:[
1449
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2276
                (rev := mgr newestRevisionOf:classToCompare) notNil ifTrue:[
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2277
                    revString := '(newest is ' , rev , ')'
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2278
                ]
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2279
            ].
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2280
1449
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2281
            self activityNotification:'comparing...'.
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2282
3579
d175474155c8 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  2283
            ChangeSet invalidChangeChunkError handle:[:ex |
d175474155c8 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  2284
                |answer|
d175474155c8 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  2285
d175474155c8 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  2286
                answer := Dialog 
d175474155c8 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  2287
                            confirm:(resources 
d175474155c8 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  2288
                                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?'
d175474155c8 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  2289
                                with:aClass)
d175474155c8 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  2290
                            yesLabel:(resources string:'Debug')
d175474155c8 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  2291
                            noLabel:(resources string:'Cancel')
d175474155c8 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  2292
                            initialAnswer:false.
d175474155c8 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  2293
                answer ifTrue:[ex reject].
d175474155c8 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  2294
                AbortOperationRequest raise.
d175474155c8 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  2295
            ] do:[
d175474155c8 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  2296
                brwsr := (UserPreferences versionDiffViewerClass)
d175474155c8 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  2297
                      openOnClass:classToCompare
d175474155c8 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  2298
                      labelA:('Repository: ' , revString)
d175474155c8 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  2299
                      sourceA:comparedSource
d175474155c8 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  2300
                      labelB:('Current: (based on: ' , thisRevString , ')')
d175474155c8 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  2301
                      sourceB:currentSource
d175474155c8 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  2302
                      title:('Comparing ' , classToCompare name)
d175474155c8 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  2303
                      ifSame:[versionsAreTheSame := true].
d175474155c8 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3551
diff changeset
  2304
            ].
1449
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2305
            versionsAreTheSame ifFalse:[
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2306
                brwsr classChangeSet 
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2307
                    classBeingCompared:classToCompare;
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2308
                    versionA:rev;
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2309
                    versionB:rev , 'mod'.
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2310
            ].
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2311
        ].
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2312
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2313
        versionsAreTheSame ifTrue:[
2236
050566d67400 changed:
Claus Gittinger <cg@exept.de>
parents: 2233
diff changeset
  2314
            (classToCompare hasUnsavedChanges) ifTrue:[
1449
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2315
                (self confirm:(resources 
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2316
                                stringWithCRs:'Versions of %1 are identical.\\Remove entries from changeSet ?'
1864
0a1a62489122 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  2317
                                with:classToCompare name allBold)) ifTrue:[
1449
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2318
                    ChangeSet current condenseChangesForClass:classToCompare.
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2319
                ].
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2320
            ] ifFalse:[
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2321
                self information:'Versions are identical.'.
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2322
                ChangeSet current unrememberChangedClasses.
1483
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  2323
            ].
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  2324
            revisionInClass isNil ifTrue:[
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  2325
                (Dialog confirm:'Update (Fix) the classes Revision Info ?' withCRs)
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  2326
                ifTrue:[
1497
061be9164dac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1483
diff changeset
  2327
                    |newString root|
1483
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  2328
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  2329
                    newString := mgr updatedRevisionStringOf:aClass forRevision:rev with:aClass revisionString.
1497
061be9164dac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1483
diff changeset
  2330
                    newString isNil ifTrue:[
061be9164dac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1483
diff changeset
  2331
                        root := mgr getCVSROOTForModule:(aClass package upTo:$:).
061be9164dac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1483
diff changeset
  2332
                        root := mgr repositoryTopDirectoryFromCVSRoot:root.
1500
70a48e2f5921 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1497
diff changeset
  2333
                        newString := '$', 'Header: ',(root copyReplaceAll: $: with:$/ ),'/'
1911
d4088b5ba0ac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1907
diff changeset
  2334
                                     ,(Smalltalk fileNameForClass:aClass),'.st,v ',rev,' '
2006
11622f51f754 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2003
diff changeset
  2335
                                     ,(Date today printStringFormat:'%y-%m-%d'),' '
11622f51f754 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2003
diff changeset
  2336
                                     ,(Time now printStringFormat:'%h:%m:%s'),' '
11622f51f754 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2003
diff changeset
  2337
                                     ,'+0000 '
1497
061be9164dac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1483
diff changeset
  2338
                                     ,(OperatingSystem getLoginName),' Exp $'.
061be9164dac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1483
diff changeset
  2339
                    ].
2637
dbfb2ef410bd changed:
Claus Gittinger <cg@exept.de>
parents: 2605
diff changeset
  2340
                    mgr updateVersionMethodOf:aClass for:newString.
1483
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  2341
                ]
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  2342
            ].
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2343
        ].
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2344
    ].
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2345
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2346
    "
997
c55b39b6c7a0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2347
      self compareClassWithRepository:Array
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2348
    "
1497
061be9164dac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1483
diff changeset
  2349
2847
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  2350
    "Modified: / 24-07-2012 / 18:11:27 / cg"
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2351
!
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2352
3536
cb8679184d3b Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3534
diff changeset
  2353
comparePackages:packages askForRevision:askForRevision 
cb8679184d3b Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3534
diff changeset
  2354
    "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
  2355
     and opens a diff browser on differences.
cb8679184d3b Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3534
diff changeset
  2356
cb8679184d3b Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3534
diff changeset
  2357
     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
  2358
     update. If `askForRevision` is false, then packages are updated to a 'newest'
cb8679184d3b Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3534
diff changeset
  2359
     revision. 
cb8679184d3b Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3534
diff changeset
  2360
cb8679184d3b Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3534
diff changeset
  2361
     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
  2362
     heads, it is not clear which one it is. In that case, even if `askForRevision` is
cb8679184d3b Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3534
diff changeset
  2363
     false, this method may result in user interation, asking user to select which of the
cb8679184d3b Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3534
diff changeset
  2364
     newest she wants."
cb8679184d3b Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3534
diff changeset
  2365
cb8679184d3b Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3534
diff changeset
  2366
    ^ self subclassResponsibility.
cb8679184d3b Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3534
diff changeset
  2367
cb8679184d3b Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3534
diff changeset
  2368
    "Created: / 04-04-2014 / 15:23:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
cb8679184d3b Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3534
diff changeset
  2369
!
cb8679184d3b Compare packages functionality moved from browser to SourceCoeManagerUtilities
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 3534
diff changeset
  2370
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2371
compareProject:aProject withRepositoryVersionFrom:aDateOrNilForNewest
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2372
    |diffSet|
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2373
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2374
    diffSet := self diffSetOfProject:aProject againstRepositoryVersionFrom:aDateOrNilForNewest.
1875
f00eb53229ae first attempt with compare-project functionality
Claus Gittinger <cg@exept.de>
parents: 1864
diff changeset
  2375
    VersionDiffBrowser 
f00eb53229ae first attempt with compare-project functionality
Claus Gittinger <cg@exept.de>
parents: 1864
diff changeset
  2376
        openOnDiffSet:diffSet 
f00eb53229ae first attempt with compare-project functionality
Claus Gittinger <cg@exept.de>
parents: 1864
diff changeset
  2377
        labelA:'Repository' 
f00eb53229ae first attempt with compare-project functionality
Claus Gittinger <cg@exept.de>
parents: 1864
diff changeset
  2378
        labelB:'Image' 
2522
d32ade066c3f changed: #compareProject:withRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2487
diff changeset
  2379
        title:('Differences of %1' bindWith:aProject)
2949
83170e2244f3 changed:
Claus Gittinger <cg@exept.de>
parents: 2948
diff changeset
  2380
        ignoreExtensions:true
83170e2244f3 changed:
Claus Gittinger <cg@exept.de>
parents: 2948
diff changeset
  2381
        ignoreVersionMethods:true.
2522
d32ade066c3f changed: #compareProject:withRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2487
diff changeset
  2382
d32ade066c3f changed: #compareProject:withRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2487
diff changeset
  2383
    "Modified: / 12-09-2011 / 11:56:01 / cg"
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2384
!
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2385
2939
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  2386
compareProject:aProject withRepositoryVersionTaggedAs:aSymbolicName
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  2387
    |diffSet|
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  2388
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  2389
    diffSet := self diffSetOfProject:aProject againstRepositoryVersionTaggedAs:aSymbolicName.
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  2390
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  2391
    VersionDiffBrowser 
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  2392
        openOnDiffSet:diffSet 
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  2393
        labelA:'Repository ("',aSymbolicName,'")' 
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  2394
        labelB:'Image' 
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  2395
        title:('Differences of %1' bindWith:aProject)
2949
83170e2244f3 changed:
Claus Gittinger <cg@exept.de>
parents: 2948
diff changeset
  2396
        ignoreExtensions:true
83170e2244f3 changed:
Claus Gittinger <cg@exept.de>
parents: 2948
diff changeset
  2397
        ignoreVersionMethods:true.
2939
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  2398
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  2399
    "Modified: / 12-09-2011 / 11:56:01 / cg"
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  2400
!
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  2401
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2402
compareProjectWithRepository:aProject
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2403
    ^ self compareProject:aProject withRepositoryVersionFrom:nil
1875
f00eb53229ae first attempt with compare-project functionality
Claus Gittinger <cg@exept.de>
parents: 1864
diff changeset
  2404
!
f00eb53229ae first attempt with compare-project functionality
Claus Gittinger <cg@exept.de>
parents: 1864
diff changeset
  2405
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2406
createSourceContainerForClass:aClass
2651
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2407
    "let user specify the source-repository values for aClass.
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2408
     Return false, if failed."
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2409
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2410
    ^ self 
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2411
        createSourceContainerForClass:aClass
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2412
        usingManager:(self sourceCodeManagerFor:aClass).
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2413
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2414
    "Modified: / 21-12-2011 / 18:31:49 / cg"
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2415
!
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2416
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2417
createSourceContainerForClass:aClass usingManager:aManager
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2418
    "let user specify the source-repository values for aClass.
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2419
     Return false, if failed."
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2420
2651
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2421
    aManager isNil ifTrue:[^ false].
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2422
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2423
    ^ self 
2651
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2424
        defineSourceContainerForClass:aClass
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2425
        usingManager:aManager
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2426
        title:(resources string:'Repository information for %1' with:aClass name)
2651
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2427
        text:(resources string:'Create new %1-repository container for ''%2''' 
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2428
                            with:aManager managerTypeName
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2429
                            with:aClass name allBold)
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2430
        createDirectories:true
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2431
        createContainer:true.
2651
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2432
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2433
    "Created: / 21-12-2011 / 18:31:23 / cg"
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2434
!
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2435
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2436
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
  2437
    "let user specify the source-repository values for aClass"
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2438
2651
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2439
    ^ self
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2440
        defineSourceContainerForClass:aClass 
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2441
        usingManager:(self sourceCodeManagerFor:aClass)
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2442
        title:title 
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2443
        text:boxText 
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2444
        createDirectories:createDirs 
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2445
        createContainer:createContainer
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2446
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2447
    "Modified: / 21-12-2011 / 18:34:44 / cg"
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2448
!
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2449
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2450
defineSourceContainerForClass:aClass usingManager:mgr title:title text:boxText createDirectories:createDirs createContainer:createContainer
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2451
    "let user specify the source-repository values for aClass"
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2452
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2453
    |className
2063
502166975e05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  2454
     "oldModule oldPackage" oldFileName
1533
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  2455
     module directory fileName nameSpace nameSpacePrefix
2651
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2456
     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
  2457
     answer doCheckinWithoutAsking forceCheckIn rslt note
3276
e6902cec8b2f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3272
diff changeset
  2458
     requiredPackage classPackage|
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2459
2651
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2460
    mgr isNil ifTrue:[^  false].
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2461
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2462
    aClass isLoaded ifFalse:[
1076
4adaffbd7ab0 upper-case
Claus Gittinger <cg@exept.de>
parents: 1070
diff changeset
  2463
        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
  2464
        ^ false.
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2465
    ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2466
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2467
    className := aClass name.
3276
e6902cec8b2f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3272
diff changeset
  2468
    classPackage := aClass package.
e6902cec8b2f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3272
diff changeset
  2469
    classPackage ~= PackageId noProjectID ifTrue:[
e6902cec8b2f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3272
diff changeset
  2470
        module := classPackage asPackageId module.
e6902cec8b2f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3272
diff changeset
  2471
        directory := classPackage asPackageId directory.
1533
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  2472
    ] ifFalse:[
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  2473
        "/
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  2474
        "/ defaults, if nothing at all is known
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  2475
        "/
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  2476
        (module := LastModule) isNil ifTrue:[
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  2477
            module := (OperatingSystem getLoginName).
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  2478
        ].
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  2479
        (directory := LastPackage) isNil ifTrue:[
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  2480
            directory := 'private'.
3153
c2bca6dbe3a7 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3146
diff changeset
  2481
        ]. 
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2482
    ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2483
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2484
    "/
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2485
    "/ 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
  2486
    "/
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2487
    (Project notNil and:[(project := Project current) notNil]) ifTrue:[
1533
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  2488
        directory isNil ifTrue:[
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2489
            (nm := project repositoryDirectory) isNil ifTrue:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2490
                nm := project name
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2491
            ].
1533
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  2492
            directory := nm.
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2493
        ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2494
        module isNil ifTrue:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2495
            (nm := project repositoryModule) notNil ifTrue:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2496
                module := nm
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2497
            ]
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2498
        ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2499
    ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2500
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2501
    "/
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2502
    "/ 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
  2503
    "/ if so, take that as a default.
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2504
    "/
1189
fdc5e747c184 refactored check for a valid sourceCodeManager into one place
Claus Gittinger <cg@exept.de>
parents: 1185
diff changeset
  2505
    info := mgr sourceInfoOfClass:aClass.
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2506
    info notNil ifTrue:[
1368
20cde03a3cd6 defineSource - fixed package & module extraction
martin
parents: 1347
diff changeset
  2507
        true "module ~= LastModule" ifTrue:[
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2508
            (info includesKey:#module) ifTrue:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2509
                module := (info at:#module).
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2510
            ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2511
        ].
1401
102c0c12b66b default package changed
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  2512
"/        true "package ~= LastPackage" ifTrue:[
102c0c12b66b default package changed
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  2513
"/            (info includesKey:#directory) ifTrue:[
102c0c12b66b default package changed
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  2514
"/                package := (info at:#directory).
102c0c12b66b default package changed
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  2515
"/            ].
102c0c12b66b default package changed
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  2516
"/        ].
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2517
        fileName := mgr containerFromSourceInfo:info.
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2518
        (nameSpace := aClass nameSpace) ~~ Smalltalk ifTrue:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2519
            nameSpacePrefix := nameSpace name , '::'.
3259
5eb58e78257e refactored
Claus Gittinger <cg@exept.de>
parents: 3227
diff changeset
  2520
            fileName := fileName withoutPrefix:nameSpacePrefix.
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2521
        ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2522
"/        (info includesKey:#fileName) ifTrue:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2523
"/            fileName := (info at:#fileName).
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2524
"/        ] ifFalse:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2525
"/            (info includesKey:#expectedFileName) ifTrue:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2526
"/                fileName := (info at:#expectedFileName).
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2527
"/            ] ifFalse:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2528
"/                (info includesKey:#classFileNameBase) ifTrue:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2529
"/                    fileName := (info at:#classFileNameBase) , '.st'.
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2530
"/                ]
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2531
"/            ]
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2532
"/        ]
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2533
    ].
3514
a35b833ed992 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
  2534
    directory isEmptyOrNil ifTrue:[
a35b833ed992 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
  2535
        directory := LastPackage.
a35b833ed992 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
  2536
    ].
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2537
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2538
    fileName isNil ifTrue:[
1338
bad5961fbff1 fileNameForClass:
Claus Gittinger <cg@exept.de>
parents: 1323
diff changeset
  2539
        fileName := (Smalltalk fileNameForClass:aClass) , '.st'.
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2540
    ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2541
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2542
    OperatingSystem isMSDOSlike ifTrue:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2543
        module replaceAll:$\ with:$/.
1533
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  2544
        directory replaceAll:$\ with:$/.
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2545
    ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2546
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2547
    "/
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2548
    "/ 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
  2549
    "/
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2550
    doCheckinWithoutAsking := false.
1831
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  2551
"/false ifTrue:[
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  2552
"/    (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
  2553
"/        answer := Dialog confirmWithCancel:(resources 
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  2554
"/                            string:'About to change the source container.
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  2555
"/
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  2556
"/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
  2557
"/
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  2558
"/    %2 / %3 / %4
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  2559
"/
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  2560
"/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
  2561
"/                            with:className
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  2562
"/                            with:module
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  2563
"/                            with:directory
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  2564
"/                            with:fileName)
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  2565
"/                labels:(resources array:#('Cancel' 'Check in' 'Change')).
3433
eee3079d18d3 AbortSignal -> AbortOperationRequest
Stefan Vogel <sv@exept.de>
parents: 3425
diff changeset
  2566
"/        answer isNil ifTrue:[AbortOperationRequest raise].
1831
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  2567
"/        answer ifTrue:[
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  2568
"/            doCheckinWithoutAsking := false.
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  2569
"/            oldModule := module.
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  2570
"/            oldPackage := directory.
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  2571
"/            oldFileName := fileName
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  2572
"/        ] ifFalse:[
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  2573
"/            doCheckinWithoutAsking := true.
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  2574
"/            creatingNew := false.
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  2575
"/        ].
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  2576
"/    ].
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  2577
"/].
2688
fa8075458983 changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  2578
    mgr isContainerBased ifTrue:[
fa8075458983 changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  2579
        doCheckinWithoutAsking ifFalse:[
fa8075458983 changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  2580
            "/
fa8075458983 changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  2581
            "/ open a dialog for this
fa8075458983 changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  2582
            "/
fa8075458983 changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  2583
            (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
  2584
                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
  2585
                creatingNew := true.
fa8075458983 changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  2586
            ] ifTrue:[
fa8075458983 changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  2587
                creatingNew := false.
fa8075458983 changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  2588
            ].
2847
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  2589
            confirmNewFiles ifTrue:[
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  2590
                rslt := self 
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  2591
                            askForContainer:boxText title:title note:note
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  2592
                            initialModule:module initialPackage:directory initialFileName:fileName
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  2593
                            forNewContainer:true.        
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  2594
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  2595
                rslt isNil ifTrue:[
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  2596
                    ^ false
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  2597
                ].
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  2598
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  2599
                module := rslt at:#module.
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  2600
                directory := rslt at:#package.
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  2601
                fileName := rslt at:#fileName.
3514
a35b833ed992 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
  2602
                (module isEmptyOrNil or:[directory isEmptyOrNil or:[fileName isEmptyOrNil]]) ifTrue:[
a35b833ed992 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
  2603
                    ^ false
a35b833ed992 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3433
diff changeset
  2604
                ].
2847
406b336637ae class definition
Claus Gittinger <cg@exept.de>
parents: 2836
diff changeset
  2605
            ]
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2606
        ].
2688
fa8075458983 changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  2607
        (fileName endsWith:',v') ifTrue:[
3227
bcaec3eb2d97 Changed usage of deprecated #copyWithoutLast: to #copyButLast:
Stefan Vogel <sv@exept.de>
parents: 3202
diff changeset
  2608
            fileName := fileName copyButLast:2
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2609
        ].
2688
fa8075458983 changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  2610
        (fileName endsWith:'.st') ifFalse:[
fa8075458983 changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  2611
            fileName := fileName , '.st'
fa8075458983 changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  2612
        ].
fa8075458983 changed: #defineSourceContainerForClass:usingManager:title:text:createDirectories:createContainer:
Claus Gittinger <cg@exept.de>
parents: 2673
diff changeset
  2613
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2614
    ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2615
952
c75976ac7b7f when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2616
    "/ 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
  2617
    "/ check for this ...
c75976ac7b7f when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2618
1533
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  2619
    requiredPackage := ((module ? '') , ':' , (directory ? '')) asSymbol.
952
c75976ac7b7f when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2620
    requiredPackage ~= aClass package ifTrue:[
c75976ac7b7f when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2621
"/        doCheckinWithoutAsking ifFalse:[
c75976ac7b7f when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2622
"/            (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
  2623
"/            ifFalse:[
c75976ac7b7f when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2624
"/                ^ false
c75976ac7b7f when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2625
"/            ]
c75976ac7b7f when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2626
"/        ].
1077
6b1bcfd27521 renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  2627
        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
  2628
        aClass package:requiredPackage.
c75976ac7b7f when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2629
    ].
c75976ac7b7f when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2630
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2631
    info := aClass revisionInfo.
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2632
    info notNil ifTrue:[
2063
502166975e05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  2633
        (info repositoryPathName isNil) ifTrue:[
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2634
            info := nil
2063
502166975e05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  2635
        ].
502166975e05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  2636
"/        (info includesKey:#repositoryPathName) ifFalse:[
502166975e05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  2637
"/            info := nil
502166975e05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  2638
"/        ]
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2639
    ].
2175
50349cb87bf4 changed:
fm
parents: 2161
diff changeset
  2640
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2641
    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
  2642
        true "doCheckinWithoutAsking" ifFalse:[
979
2374556f8a09 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 977
diff changeset
  2643
            answer := Dialog 
2374556f8a09 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 977
diff changeset
  2644
                 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
  2645
                 labels:(resources array:#( 'Cancel' 'No' 'Yes')).
979
2374556f8a09 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 977
diff changeset
  2646
            answer isNil ifTrue:[^ false].
2374556f8a09 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 977
diff changeset
  2647
        ] ifTrue:[
2374556f8a09 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 977
diff changeset
  2648
            answer := true.
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2649
        ].
979
2374556f8a09 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 977
diff changeset
  2650
        answer ifTrue:[
2637
dbfb2ef410bd changed:
Claus Gittinger <cg@exept.de>
parents: 2605
diff changeset
  2651
            mgr
2651
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2652
                updateVersionMethodOf:aClass 
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2653
                for:(mgr initialRevisionStringFor:aClass 
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2654
                         inModule:module 
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2655
                         directory:directory 
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2656
                         container:fileName).
979
2374556f8a09 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 977
diff changeset
  2657
        ].
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2658
    ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2659
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
  2660
    (self checkForExistingModule:module usingManager:mgr allowCreate:(createDirs or:[creatingNew]))
2651
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2661
        ifFalse:[^ false].
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2662
    LastModule := module.
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2663
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
  2664
    (self checkForExistingModule:module directory:directory usingManager:mgr allowCreate:(createDirs or:[creatingNew]))
2651
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2665
        ifFalse:[^ false].
1533
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  2666
    LastPackage := directory.
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2667
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2668
    "/
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2669
    "/ check for the container itself
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2670
    "/
2651
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2671
    (mgr isContainerBased not
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2672
    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
  2673
"/            (oldModule notNil
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2674
"/            and:[(oldModule ~= module)
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2675
"/                 or:[oldPackage ~= package
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2676
"/                 or:[oldFileName ~= fileName]]])
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2677
"/            ifFalse:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2678
"/                self warn:(resources string:'no change').
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2679
"/                ^ false.
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2680
"/            ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2681
2651
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2682
        mgr isContainerBased ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2683
            creatingNew ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2684
                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
  2685
            ].
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2686
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2687
            doCheckinWithoutAsking ifFalse:[
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2688
                (Dialog 
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2689
                    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
  2690
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2691
    %2 / %3 / %4  ?'
2651
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2692
                                    with:className
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2693
                                    with:module 
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2694
                                    with:directory 
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2695
                                    with:fileName) withCRs
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2696
                    noLabel:'Cancel') 
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2697
                ifFalse:[
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2698
                    ^ false.
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2699
                ].  
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2700
            ].  
2651
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2701
        ].
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2702
2637
dbfb2ef410bd changed:
Claus Gittinger <cg@exept.de>
parents: 2605
diff changeset
  2703
        mgr 
2651
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2704
            updateVersionMethodOf:aClass 
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2705
            for:('$' , 'Header' , '$'). "/ concatenated to avoid RCS-expansion
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2706
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2707
        oldFileName notNil ifTrue:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2708
            msg := ('forced checkin / source container change from ' , oldFileName).
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2709
        ] ifFalse:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2710
            msg := 'defined source container'
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2711
        ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2712
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2713
        (forceCheckIn := doCheckinWithoutAsking) ifFalse:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2714
            (mgr
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2715
                checkinClass:aClass 
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2716
                fileName:fileName 
1533
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  2717
                directory:directory 
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2718
                module:module 
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2719
                logMessage:msg)
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2720
            ifFalse:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2721
                doCheckinWithoutAsking ifFalse:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2722
                    (Dialog 
1076
4adaffbd7ab0 upper-case
Claus Gittinger <cg@exept.de>
parents: 1070
diff changeset
  2723
                        confirm:'No easy merge seems possible; force checkin (no merge) ?'
4adaffbd7ab0 upper-case
Claus Gittinger <cg@exept.de>
parents: 1070
diff changeset
  2724
                        noLabel:'Cancel') 
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2725
                    ifFalse:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2726
                        ^ false.
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2727
                    ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2728
                ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2729
                forceCheckIn := true.
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2730
            ]
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2731
        ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2732
        forceCheckIn ifTrue:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2733
            (mgr
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2734
                checkinClass:aClass 
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2735
                fileName:fileName 
1533
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  2736
                directory:directory 
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2737
                module:module 
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2738
                logMessage:msg
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2739
                force:true)
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2740
            ifFalse:[
1076
4adaffbd7ab0 upper-case
Claus Gittinger <cg@exept.de>
parents: 1070
diff changeset
  2741
                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
  2742
                ^ false.
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2743
            ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2744
        ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2745
        ^ true
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2746
    ] ifFalse:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2747
        (createContainer or:[creatingNew]) ifFalse:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2748
            (Dialog
1076
4adaffbd7ab0 upper-case
Claus Gittinger <cg@exept.de>
parents: 1070
diff changeset
  2749
                 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
  2750
                                      with:fileName with:module with:directory) withCRs
1076
4adaffbd7ab0 upper-case
Claus Gittinger <cg@exept.de>
parents: 1070
diff changeset
  2751
                 noLabel:'Cancel') ifFalse:[
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2752
                ^ false
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2753
            ]
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2754
        ]
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2755
    ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2756
1882
8b3a4c2a2c2a when creating a new container, set the package of all methods.
Claus Gittinger <cg@exept.de>
parents: 1879
diff changeset
  2757
    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
  2758
    aClass package:requiredPackage.
1913
d87c1ed5bf1f oops - halt
Claus Gittinger <cg@exept.de>
parents: 1911
diff changeset
  2759
3155
9c22d8b4315b class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3153
diff changeset
  2760
    [ mgr
2651
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2761
        createContainerFor:aClass
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2762
        inModule:module
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2763
        package:directory
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2764
        container:fileName
3155
9c22d8b4315b class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3153
diff changeset
  2765
    ] whileFalse:[
9c22d8b4315b class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3153
diff changeset
  2766
        (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
  2767
            ^ false.
9c22d8b4315b class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3153
diff changeset
  2768
        ].
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2769
    ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2770
    ^ true
1533
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  2771
2651
Claus Gittinger <cg@exept.de>
parents: 2642
diff changeset
  2772
    "Created: / 21-12-2011 / 18:34:02 / cg"
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2773
!
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2774
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2775
diffSetOfProject:aProject againstRepositoryVersionFrom:aDateOrNilForNewest
2939
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  2776
    ^ self
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  2777
        diffSetOfProject:aProject 
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  2778
        againstRepositoryVersionFrom:aDateOrNilForNewest
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  2779
        orTag:nil
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  2780
!
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  2781
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  2782
diffSetOfProject:aProject againstRepositoryVersionFrom:aDateOrNilForNewest orTag:aTagOrNil
2950
cd6dc0f1d994 comment/format in: #diffSetOfProject:againstRepositoryVersionFrom:orTag:
Claus Gittinger <cg@exept.de>
parents: 2949
diff changeset
  2783
    "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
  2784
     or a the version with a particular tag."
2939
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  2785
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2786
    |classesInImage filesInImage module directory perProjectInfo 
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2787
     classesNotInRepository filesNotInImage classesDeletedInRepository
2948
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2788
     classesModifiedInImage classesNotReallyModified classesReallyModified classesNewerInRepository 
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2789
     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
  2790
     box doCleanup diffSet def autoloadedFilesNotInImage 
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2791
     autoloadedClassesInImage autoloadedFilesInImage versionMethodsAndDoitsRejected|
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2792
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2793
    module := aProject asPackageId module.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2794
    directory := aProject asPackageId directory.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2795
2939
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  2796
    (aDateOrNilForNewest isNil and:[ aTagOrNil notNil ]) ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  2797
        perProjectInfo := SourceCodeManager revisionsInModule:module directory:directory taggedAs:aTagOrNil.
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  2798
    ] ifFalse:[
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  2799
        perProjectInfo := SourceCodeManager revisionsInModule:module directory:directory fromDate:aDateOrNilForNewest.
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  2800
    ].
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2801
    perProjectInfo := perProjectInfo ? #().
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2802
    perProjectInfo := perProjectInfo select:[:info | info key asFilename hasSuffix:'st'].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2803
    perProjectInfo := Dictionary withAssociations:perProjectInfo.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2804
2948
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2805
    "/ to ignore version_xxx methods
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2806
    versionMethodsAndDoitsRejected := 
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2807
        [:aChangeSet | 
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2808
            aChangeSet reject:[:chg | 
2949
83170e2244f3 changed:
Claus Gittinger <cg@exept.de>
parents: 2948
diff changeset
  2809
                false "chg isMethodChangeForVersionMethod" 
83170e2244f3 changed:
Claus Gittinger <cg@exept.de>
parents: 2948
diff changeset
  2810
                or:[false "chg isMethodChangeForExtensionsVersionMethod"
2948
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2811
                or:[chg isDoIt]]]
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2812
        ].
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2813
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2814
    classesInImage := Smalltalk allClassesInPackage:aProject.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2815
    autoloadedClassesInImage := classesInImage reject:[:cls | cls isLoaded].
2903
482f5086773d changed: #diffSetOfProject:againstRepositoryVersionFrom:
Stefan Vogel <sv@exept.de>
parents: 2864
diff changeset
  2816
    classesInImage := classesInImage select:[:cls | cls isLoaded and:[cls isPrivate not]].
482f5086773d changed: #diffSetOfProject:againstRepositoryVersionFrom:
Stefan Vogel <sv@exept.de>
parents: 2864
diff changeset
  2817
    filesInImage := classesInImage collect:[:cls | cls classBaseFilename] as:Set.
482f5086773d changed: #diffSetOfProject:againstRepositoryVersionFrom:
Stefan Vogel <sv@exept.de>
parents: 2864
diff changeset
  2818
    autoloadedFilesInImage := autoloadedClassesInImage collect:[:cls | cls classBaseFilename] as:Set.
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2819
    "/ any differences ?
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2820
    classesNotInRepository := classesInImage reject:[:cls | (perProjectInfo includesKey:cls classBaseFilename)].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2821
    classesDeletedInRepository := classesInImage select:[:cls | (perProjectInfo at:cls classBaseFilename ifAbsent:nil) == #deleted].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2822
    perProjectInfo := perProjectInfo reject:[:v | v == #deleted].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2823
    filesNotInImage := perProjectInfo keys reject:[:file | (filesInImage includes:file)].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2824
    filesNotInImage := filesNotInImage reject:[:file | (autoloadedFilesInImage includes:file)].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2825
    filesNotInImage remove:'extensions.st' ifAbsent:[].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2826
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2827
    "/ if comparing against the newest, only look for chaged stuff
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2828
    classesModifiedInImage := classesInImage select:[:cls | ChangeSet current includesChangeForClassOrMetaclass:cls].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2829
    classesModifiedInImage := classesModifiedInImage \ classesNotInRepository.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2830
2948
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2831
    classesNewerInRepository := classesInImage 
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2832
                                    select:[:cls | 
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2833
                                        |v clsRevision|
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2834
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2835
                                        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
  2836
                                        v notNil 
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2837
                                            and:[ cls isLoaded 
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2838
                                            and:[ (clsRevision := cls revision) notNil 
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2839
                                            and:[ v > clsRevision ]]]
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2840
                                    ].
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2841
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2842
    "/ stupid: as we do not have any revision information for extensions (sigh);
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2843
    "/ 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
  2844
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2845
    extensionMethods := Smalltalk allExtensionsForPackage:aProject.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2846
    extensionsInImage := ChangeSet forExistingMethods:extensionMethods.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2847
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2848
    [
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2849
        |s extensionsRevision|
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2850
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2851
        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
  2852
        [
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2853
            s := SourceCodeManager
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2854
                    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
  2855
                    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
  2856
            s notNil ifTrue:[
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2857
                extensionsInRepository := ChangeSet fromStream:s.
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2858
            ].
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2859
        ] ensure:[
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2860
            s notNil ifTrue:[s close]
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2861
        ].
2948
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2862
        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
  2863
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2864
        "/ 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
  2865
        extensionsInRepository := versionMethodsAndDoitsRejected value:extensionsInRepository.
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2866
    ] value.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2867
    extensionDiffs := extensionsInRepository diffSetsAgainst:extensionsInImage.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2868
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2869
    diffSet := extensionDiffs copy.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2870
2939
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  2871
    (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
  2872
        "/ we could do the same as below for each class.
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2873
        "/ however - as we do have change-info and revision info, we can avoid checking out
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2874
        "/ for all classes which are not changed and which have the same version info.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2875
        classesModifiedInImage notEmpty ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2876
            classesReallyModified :=
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2877
                classesModifiedInImage select:[:eachChangedClass |
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2878
                    |currentVersion repositoryVersion s stFile diffs|
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2879
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2880
                    stFile := eachChangedClass classBaseFilename.
2948
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2881
                    [    
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2882
                        s := SourceCodeManager
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2883
                                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
  2884
                                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
  2885
                        s notNil ifTrue:[
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2886
                            repositoryVersion := ChangeSet fromStream:s.
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2887
                        ].
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2888
                    ] ensure:[
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2889
                        s notNil ifTrue:[s close].
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2890
                    ].
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2891
                    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
  2892
                    repositoryVersion := versionMethodsAndDoitsRejected value:repositoryVersion.
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2893
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2894
                    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
  2895
                    currentVersion := versionMethodsAndDoitsRejected value:currentVersion.
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2896
                    diffs := repositoryVersion diffSetsAgainst:currentVersion .
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2897
                    diffSet addDiffSet:diffs.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2898
                    diffs notEmpty
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2899
                ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2900
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2901
            classesNotReallyModified := classesModifiedInImage \ classesReallyModified.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2902
        ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2903
    ] ifFalse:[
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2904
        classesReallyModified :=
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2905
            classesInImage select:[:eachClass |
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2906
                |currentVersion repositoryVersion s stFile stRevision diffs|
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2907
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2908
                stFile := eachClass classBaseFilename.
2948
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2909
                stRevision := perProjectInfo at:stFile ifAbsent:nil.
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2910
                stRevision notNil ifTrue:[
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2911
                    [
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2912
                        s := SourceCodeManager
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2913
                                streamForClass:nil fileName:stFile revision:stRevision 
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2914
                                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
  2915
                        s notNil ifTrue:[
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2916
                            repositoryVersion := ChangeSet fromStream:s.
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2917
                        ].
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2918
                    ] ensure:[
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2919
                        s notNil ifTrue:[s close].
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2920
                    ].
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2921
                ].
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2922
                repositoryVersion isNil ifTrue:[
2295
505293d1cfbd changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2294
diff changeset
  2923
                    repositoryVersion := ChangeSet new.
505293d1cfbd changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2294
diff changeset
  2924
                ].
2948
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2925
                repositoryVersion := versionMethodsAndDoitsRejected value:repositoryVersion.
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2926
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2927
                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
  2928
                currentVersion := versionMethodsAndDoitsRejected value:currentVersion.
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2929
                diffs := repositoryVersion diffSetsAgainst:currentVersion .
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2930
                diffSet addDiffSet:diffs.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2931
                diffs notEmpty
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2932
            ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2933
    ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2934
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2935
    filesNotInImage notEmpty ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2936
        "/ first, check if these are autoloaded classes which have NOT been installed
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2937
        "/ (for example, due to a --quick argument during startup)
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2938
        autoloadedFilesNotInImage := OrderedCollection new.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2939
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2940
        def := ProjectDefinition definitionClassForPackage:aProject createIfAbsent:false projectType:nil.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2941
        def notNil ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2942
            def classNamesAndAttributesDo:[:eachClassname :eachAttributes | 
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2943
                |cls eachFileName isAutoload|
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2944
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2945
                cls := Smalltalk classNamed:eachClassname.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2946
                cls isNil ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2947
                    isAutoload := eachAttributes includes:#autoload.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2948
                    isAutoload ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2949
                        eachFileName := Smalltalk fileNameForClass:eachClassname.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2950
                        autoloadedFilesNotInImage add:(eachFileName , '.st')
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2951
                    ]
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2952
                ]
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2953
            ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2954
        ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2955
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2956
        (filesNotInImage \ autoloadedFilesNotInImage) do:[:eachSTFile |
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2957
            |s chgSet classDefinitions|
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2958
2948
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2959
            [
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2960
                s := SourceCodeManager
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2961
                        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
  2962
                s isNil ifTrue:[
407ae2f32318 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3591
diff changeset
  2963
                    chgSet := ChangeSet new
407ae2f32318 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3591
diff changeset
  2964
                ] ifFalse:[
407ae2f32318 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3591
diff changeset
  2965
                    chgSet := ChangeSet fromStream:s.
407ae2f32318 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3591
diff changeset
  2966
                ]
2948
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2967
            ] ensure:[
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2968
                s notNil ifTrue:[s close].
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2969
            ].
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2970
            chgSet := versionMethodsAndDoitsRejected value:chgSet.
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2971
            diffSet onlyInReceiver addAll:chgSet
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2972
        ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2973
    ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2974
2948
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2975
    classesNewerInRepository notEmpty ifTrue:[
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2976
        classesNewerInRepository do:[:eachClass|
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2977
            |s diffs repositoryVersion currentVersion|
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2978
2948
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2979
            [
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2980
                s := SourceCodeManager
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2981
                        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
  2982
                repositoryVersion := ChangeSet fromStream:s.
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2983
            ] ensure:[
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2984
                s notNil ifTrue:[s close].
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2985
            ].
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2986
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2987
            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
  2988
            currentVersion := versionMethodsAndDoitsRejected value:currentVersion.
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2989
            diffs := repositoryVersion diffSetsAgainst:currentVersion .
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2990
            diffSet addDiffSet:diffs.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2991
        ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2992
    ].
2948
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  2993
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2994
    classesDeletedInRepository notEmpty ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2995
"/ self halt.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2996
    ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2997
    classesNotInRepository notEmpty ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2998
        "/ if there are no changeSet entries for those classes, they seem to be
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2999
        "/ no longer in the repository (possibly moved ?)
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3000
        "/ 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
  3001
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3002
        classesAddedInImage := classesNotInRepository \ classesDeletedInRepository.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3003
        classesAddedInImage do:[:eachAddedClass |
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3004
            |currentVersion|
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3005
2948
548a75a5a3b5 project diff fixed (care for version and loos methods)
Claus Gittinger <cg@exept.de>
parents: 2939
diff changeset
  3006
            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
  3007
            currentVersion := versionMethodsAndDoitsRejected value:currentVersion.
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3008
            diffSet onlyInArg addAll:currentVersion.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3009
        ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3010
    ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3011
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3012
    diffSet isEmpty ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3013
        "/ Dialog information:(resources string:'%1 is up-to-date.' with:eachProject allBold).
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3014
        Transcript showCR:('%1 is up-to-date.' bindWith:aProject allBold).
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3015
        (ChangeSet current includesChangeForPackage:aProject) ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3016
            (Dialog confirm:('%1 is up-to-date.\\Cleanup ChangeSet ?' bindWith:aProject allBold) withCRs) ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3017
                ChangeSet current condenseChangesForPackage:aProject.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3018
            ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3019
        ].
2286
ad425b1c40ab changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2284
diff changeset
  3020
        ^ diffSet.
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3021
    ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3022
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3023
    "/ 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
  3024
    "/ give user a chance to cleanup the changeSet here.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3025
    aDateOrNilForNewest isNil ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3026
        classesNotReallyModified notEmptyOrNil ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3027
            doCleanup := false.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3028
            box := Dialog
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3029
                forRequestText:(resources 
2939
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  3030
                                    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
  3031
                                    with:aProject allBold) 
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3032
                editViewClass:ListView
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3033
                lines:10 columns:20 
3199
830195868b71 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3155
diff changeset
  3034
                initialAnswer:nil 
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3035
                setupWith:
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3036
                   [:v :d | 
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3037
                            |removeButton|
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3038
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3039
                            v list:classesNotReallyModified.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3040
                            removeButton := Button label:(resources string:'Cleanup ChangeSet').
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3041
                            removeButton action:[ doCleanup := true. box okPressed. ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3042
                            d addButton:removeButton after:(d okButton).
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3043
                            d okButton label:(resources string:'Continue').
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3044
                            d okButton isReturnButton:false.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3045
                            removeButton isReturnButton:true.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3046
                   ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3047
            box open.
2286
ad425b1c40ab changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2284
diff changeset
  3048
            box accepted ifTrue:[
ad425b1c40ab changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2284
diff changeset
  3049
                doCleanup ifTrue:[
ad425b1c40ab changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2284
diff changeset
  3050
                    classesNotReallyModified do:[:class |
ad425b1c40ab changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2284
diff changeset
  3051
                        ChangeSet current condenseChangesForClass:class.
ad425b1c40ab changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2284
diff changeset
  3052
                    ]
ad425b1c40ab changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2284
diff changeset
  3053
                ].
ad425b1c40ab changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2284
diff changeset
  3054
            ]
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3055
        ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3056
    ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3057
    ^ diffSet
2286
ad425b1c40ab changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2284
diff changeset
  3058
2295
505293d1cfbd changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2294
diff changeset
  3059
    "Modified: / 01-11-2010 / 21:02:52 / cg"
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3060
!
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3061
2939
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  3062
diffSetOfProject:aProject againstRepositoryVersionTaggedAs:symbolicName
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  3063
    ^ self
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  3064
        diffSetOfProject:aProject 
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  3065
        againstRepositoryVersionFrom:nil
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  3066
        orTag:symbolicName
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  3067
!
Claus Gittinger <cg@exept.de>
parents: 2922
diff changeset
  3068
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
  3069
ensureCorrectVersionMethodsInClass:aClass usingManager:aManager
3674
d9b94d8afb2c class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  3070
    |theMetaclass versionMthd src newSrc versionMethodName oldVersionMethodName|
2383
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3071
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3072
    theMetaclass := aClass theMetaclass.
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3073
    versionMethodName := aManager nameOfVersionMethodInClasses.
2442
7ecd9a4248bb changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents: 2426
diff changeset
  3074
    oldVersionMethodName := aClass nameOfOldVersionMethod.
2383
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3075
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3076
    (theMetaclass includesSelector:versionMethodName) ifTrue:[
2442
7ecd9a4248bb changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents: 2426
diff changeset
  3077
"/        (theMetaclass includesSelector:oldVersionMethodName) ifTrue:[
7ecd9a4248bb changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents: 2426
diff changeset
  3078
"/            theMetaclass removeSelector:oldVersionMethodName.   
7ecd9a4248bb changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents: 2426
diff changeset
  3079
"/        ].
2383
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3080
        "/ ensure that my version method is parsable (contains $'s)
3674
d9b94d8afb2c class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  3081
        versionMthd := theMetaclass compiledMethodAt:versionMethodName.
d9b94d8afb2c class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  3082
        versionMthd notNil ifTrue:[
d9b94d8afb2c class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  3083
            src := versionMthd source.
d9b94d8afb2c class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  3084
            src notNil ifTrue:[
d9b94d8afb2c class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  3085
                newSrc := aManager ensureDollarsInVersionMethod:src.
d9b94d8afb2c class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  3086
                newSrc ~= src ifTrue:[
d9b94d8afb2c class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  3087
                    theMetaclass compile:newSrc categorized:#documentation.
d9b94d8afb2c class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  3088
                ]
d9b94d8afb2c class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  3089
            ].
2383
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3090
        ].
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3091
    ] ifFalse:[
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3092
        (theMetaclass includesSelector:oldVersionMethodName) ifTrue:[
2487
c8f4417b9edc changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents: 2484
diff changeset
  3093
            "/ but make sure, it is a version method for this sourcecodemanager...
c8f4417b9edc changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents: 2484
diff changeset
  3094
            (theMetaclass methodDictionary keys count:[:sel | sel startsWith:'version']) size == 1 ifTrue:[
3674
d9b94d8afb2c class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  3095
                versionMthd := theMetaclass compiledMethodAt:oldVersionMethodName.
d9b94d8afb2c class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  3096
                versionMthd notNil ifTrue:[
d9b94d8afb2c class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  3097
                    src := versionMthd source.
d9b94d8afb2c class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  3098
                    (src startsWith:oldVersionMethodName) ifTrue:[
d9b94d8afb2c class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  3099
                        newSrc := versionMethodName , (src copyFrom:(oldVersionMethodName size + 1))
d9b94d8afb2c class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  3100
                    ].
d9b94d8afb2c class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  3101
                    theMetaclass compile:newSrc categorized:#documentation.
d9b94d8afb2c class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3657
diff changeset
  3102
                ]
2487
c8f4417b9edc changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents: 2484
diff changeset
  3103
            ]
2383
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3104
        ].
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3105
    ].
2442
7ecd9a4248bb changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents: 2426
diff changeset
  3106
2487
c8f4417b9edc changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents: 2484
diff changeset
  3107
    "Modified: / 20-08-2011 / 14:40:27 / cg"
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
  3108
    "Created: / 29-12-2011 / 14:33:46 / cg"
2383
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3109
!
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3110
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3111
getLogMessageForClassCheckinTakingDefaultsFromPreviousLogInfo:aLogInfoOrNil forClass:aClass valuesInto:aBlock
3325
944f6a6e66ff class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3313
diff changeset
  3112
    "open a dialog, asking for commit/checkin log info.
944f6a6e66ff class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3313
diff changeset
  3113
     Returns 2 values: a log message and additional checkinInfo (containing things like
944f6a6e66ff class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3313
diff changeset
  3114
     markAsStable, etc,)"
2383
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3115
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3116
    |initialLogMessage checkinInfo logMessage|
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3117
    
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3118
    "/ heuristics for a useful initial log message...
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3119
    aLogInfoOrNil isNil ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3120
        initialLogMessage := (self goodInitialLogMessageForCheckinClassOfClass:aClass) ? ''.
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3121
        "/ initial checkin ?
3657
2de3a610d07c class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3642
diff changeset
  3122
        (aClass package isNil or:[(aClass revisionOfManager:manager) "revision" isNil]) ifTrue:[ 
2383
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3123
            initialLogMessage := 'initial checkin\\' withCRs , initialLogMessage
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3124
        ].
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3125
        checkinInfo := self 
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3126
                        getCheckinInfoFor:aClass name 
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3127
                        initialAnswer:initialLogMessage.
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3128
        checkinInfo isNil ifTrue:[^ false].
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3129
        logMessage := checkinInfo logMessage.
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3130
    ] ifFalse:[
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3131
        aLogInfoOrNil isString ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3132
            "soon obsolete..."    
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3133
            logMessage := aLogInfoOrNil
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3134
        ] ifFalse:[ 
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3135
            checkinInfo := aLogInfoOrNil.
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3136
            logMessage := checkinInfo logMessage.
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3137
        ].
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3138
    ].
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3139
    logMessage notNil ifTrue:[  
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3140
        logMessage := logMessage asSingleByteStringReplaceInvalidWith:$?
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3141
    ].
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3142
    aBlock value:logMessage value:checkinInfo.
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3143
    ^ true
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3144
!
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3145
976
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3146
removeSourceContainerForClass:aClass
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3147
    "show container & let user confirm twice."
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3148
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3149
    ^ self removeSourceContainerForClass:aClass confirm:true warn:true
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3150
!
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3151
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3152
removeSourceContainerForClass:aClass confirm:doConfirm warn:doWarn
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3153
    "show container & optionally let user confirm twice."
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3154
3814
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  3155
    |info mgr|
976
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3156
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3157
    aClass isLoaded ifFalse:[
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3158
        doWarn ifTrue:[
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3159
            self warn:(resources string:'Please load the class first.').
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3160
        ].
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3161
        ^ false.
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3162
    ].
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3163
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3164
    "/
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3165
    "/ 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
  3166
    "/ if so, take that as a default.
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3167
    "/
1782
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3168
    mgr := self sourceCodeManagerFor:aClass.
976
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3169
    mgr isNil ifTrue:[
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3170
        ^ false
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3171
    ].
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3172
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3173
    info := mgr sourceInfoOfClass:aClass.
3814
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  3174
    ^ self removeSourceContainerForClass:aClass usingSourceInfo:info confirm:doConfirm warn:doWarn
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  3175
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  3176
    "Modified: / 16-07-2013 / 19:46:50 / cg"
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  3177
!
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  3178
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  3179
removeSourceContainerForClass:aClass usingSourceInfo:info confirm:doConfirm warn:doWarn
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  3180
    "show container & optionally let user confirm twice."
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  3181
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  3182
    |module directory fileName mgr|
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  3183
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  3184
    aClass isLoaded ifFalse:[
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  3185
        doWarn ifTrue:[
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  3186
            self warn:(resources string:'Please load the class first.').
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  3187
        ].
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  3188
        ^ false.
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  3189
    ].
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  3190
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  3191
    "/
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  3192
    "/ ask the sourceCodeManager if it knows anything about that class
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  3193
    "/ if so, take that as a default.
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  3194
    "/
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  3195
    mgr := self sourceCodeManagerFor:aClass.
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  3196
    mgr isNil ifTrue:[
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  3197
        ^ false
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  3198
    ].
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  3199
976
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3200
    info notNil ifTrue:[
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3201
        (info includesKey:#module) ifTrue:[
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3202
            module := (info at:#module).
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3203
        ].
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3204
        (info includesKey:#directory) ifTrue:[
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
  3205
            directory := (info at:#directory).
976
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3206
        ].
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3207
        fileName := mgr containerFromSourceInfo:info.
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3208
    ].
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3209
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3210
    module isNil ifTrue:[
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3211
        doWarn ifTrue:[
1423
d15575ef3dba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1414
diff changeset
  3212
            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
  3213
        ].
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3214
        ^ false.
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3215
    ].
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
  3216
    directory isNil ifTrue:[
976
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3217
        doWarn ifTrue:[
1423
d15575ef3dba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1414
diff changeset
  3218
            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
  3219
        ].
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3220
        ^ false.
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3221
    ].
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3222
    fileName isNil ifTrue:[
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3223
        doWarn ifTrue:[
1423
d15575ef3dba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1414
diff changeset
  3224
            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
  3225
        ].
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3226
        ^ false.
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3227
    ].
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3228
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3229
    OperatingSystem isMSDOSlike ifTrue:[
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
  3230
        "cvs expects unix-filenames"
3591
d86841bb0d5c class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3579
diff changeset
  3231
        module := module asUnixFilenameString.
d86841bb0d5c class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3579
diff changeset
  3232
        directory := directory asUnixFilenameString.
976
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3233
    ].
1787
db6157670930 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1782
diff changeset
  3234
    (mgr checkForExistingContainer:fileName inModule:module directory:directory) ifFalse:[
976
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3235
        doWarn ifTrue:[
2830
f5204449764a changed: #removeSourceContainerForClass:confirm:warn:
Claus Gittinger <cg@exept.de>
parents: 2818
diff changeset
  3236
            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
  3237
        ].
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3238
        ^ false.
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3239
    ].
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3240
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3241
    doConfirm ifTrue:[
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3242
        (Dialog
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3243
            choose:(resources 
1423
d15575ef3dba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1414
diff changeset
  3244
                        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
  3245
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3246
container:    %2 / %3 / %4
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3247
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3248
Really remove ?' 
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3249
                        with:aClass name 
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3250
                        with:module 
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
  3251
                        with:directory 
976
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3252
                        with:fileName) 
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3253
            labels:(Array 
1129
89049988e8d3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1122
diff changeset
  3254
                        with:(resources string:'No') 
89049988e8d3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1122
diff changeset
  3255
                        with:(resources string:'Remove'))
976
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3256
            values:#(false true)
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3257
            default:false) ifFalse:[
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3258
            ^ false.
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3259
        ].
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3260
    ].
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3261
3814
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  3262
    (mgr removeContainer:fileName inModule:module directory:directory) 
466fa886aa65 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3812
diff changeset
  3263
    ifFalse:[
976
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3264
        doWarn ifTrue:[
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3265
            self warn:(resources string:'failed to remove container.').
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3266
        ].
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3267
        ^ true.
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3268
    ].
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3269
    ^ false
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
  3270
3351
68989ed1137f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
  3271
    "Modified: / 16-07-2013 / 19:46:50 / cg"
1000
3687dbf412db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 998
diff changeset
  3272
!
3687dbf412db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 998
diff changeset
  3273
1026
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3274
repositoryLogOf:aClass onto:aStream
2050
037e794f5857 +option to show a short revision log
Claus Gittinger <cg@exept.de>
parents: 2042
diff changeset
  3275
    self repositoryLogOf:aClass short:false onto:aStream
037e794f5857 +option to show a short revision log
Claus Gittinger <cg@exept.de>
parents: 2042
diff changeset
  3276
!
037e794f5857 +option to show a short revision log
Claus Gittinger <cg@exept.de>
parents: 2042
diff changeset
  3277
037e794f5857 +option to show a short revision log
Claus Gittinger <cg@exept.de>
parents: 2042
diff changeset
  3278
repositoryLogOf:aClass short:shortOrNot onto:aStream
1026
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3279
    |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
  3280
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3281
    info := aClass revisionInfo.
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3282
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3283
    rv := aClass binaryRevision.
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3284
    rv notNil ifTrue:[
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3285
        aStream nextPutLine:'**** Loaded classes binary information ****'; cr.
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3286
        aStream nextPutLine:'  Binary based upon : ' , rv.
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3287
        aStream cr.
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3288
    ].
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3289
3344
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3290
    "/ old
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3291
"/    info isNil ifTrue:[
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3292
"/        aStream nextPutLine:'No revision info found'.
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3293
"/        aClass isLoaded ifFalse:[
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3294
"/            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
  3295
"/        ] ifTrue:[
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3296
"/            fn := aClass classFilename.
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3297
"/            aClass wasAutoloaded ifTrue:[
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3298
"/                msg := 'This class was autoloaded.'.
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3299
"/                msg := msg , ' (from ''' , fn , ''')'.
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3300
"/            ] ifFalse:[
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3301
"/                msg := 'This class was loaded from ''' , fn , '''.'
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3302
"/            ].
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3303
"/            msg notNil ifTrue:[
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3304
"/                aStream cr; nextPutAll:msg.
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3305
"/            ]
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3306
"/        ].
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3307
"/        ^ self
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3308
"/    ]
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3309
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3310
    info isNil ifTrue:[
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3311
        aClass isLoaded ifFalse:[
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3312
            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
  3313
        ] ifTrue:[
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3314
            fn := aClass classFilename.
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3315
            aClass wasAutoloaded ifTrue:[
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3316
                msg := 'This class was autoloaded.'.
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3317
                msg := msg , ' (from ''' , fn , ''')'.
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3318
            ] ifFalse:[
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3319
                msg := 'This class was loaded from ''' , fn , '''.'
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3320
            ].
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3321
            msg notNil ifTrue:[
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3322
                aStream nextPutLine:msg.
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3323
            ]
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3324
        ].
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3325
        aStream cr.
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3326
    ] ifFalse:[
2041
fb85bf748dbb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2013
diff changeset
  3327
        (info revision notNil) ifFalse:[
1026
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3328
            aStream nextPutLine:'WARNING:'; cr.
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3329
            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
  3330
            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
  3331
            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
  3332
            aStream cr.
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3333
        ].
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3334
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3335
        aStream nextPutLine:'**** Classes source information ****'; cr.
2042
e2311b66ad94 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2041
diff changeset
  3336
        s := info repositoryPathName.
1026
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3337
        s notNil ifTrue:[
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3338
            aStream nextPutLine:'  Source repository : ' , s
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3339
        ].
3676
51859e5df3b5 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3674
diff changeset
  3340
        aStream nextPutLine:('  Filename ........ : %1' bindWith: (info fileName ? '?')).
51859e5df3b5 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3674
diff changeset
  3341
        info symbolicVersionName ~= info revision ifTrue:[
51859e5df3b5 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3674
diff changeset
  3342
            aStream nextPutLine:('  Symbolic Version  : %1' bindWith: (info symbolicVersionName ? '?')).
51859e5df3b5 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3674
diff changeset
  3343
        ].
51859e5df3b5 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3674
diff changeset
  3344
        aStream nextPutLine:('  Revision ........ : %1' bindWith: (info revision ? '?')).
51859e5df3b5 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3674
diff changeset
  3345
        aStream nextPutLine:('  Checkin date .... : %1 %2 %3' bindWith: (info date  ? '?') 
51859e5df3b5 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3674
diff changeset
  3346
                                                              with:(info time ? '?') 
51859e5df3b5 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3674
diff changeset
  3347
                                                              with:(info timezone ? '')).
51859e5df3b5 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3674
diff changeset
  3348
        aStream nextPutLine:('  Checkin user .... : %1' bindWith: (info user ? '?')).
3344
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3349
    ].
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3350
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3351
    (info2 := aClass packageSourceCodeInfo) notNil ifTrue:[
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3352
        aStream nextPutLine:'  Repository: ..... : ' , (info2 at:#module ifAbsent:'?').
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3353
        aStream nextPutLine:'  Directory: ...... : ' , (info2 at:#directory ifAbsent:'?').
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3354
    ].
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3355
    info notNil ifTrue:[
2042
e2311b66ad94 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2041
diff changeset
  3356
        aStream nextPutLine:'  Container ....... : ' , (info repositoryPathName ? '?').
3344
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3357
    ].
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3358
    aStream cr.
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3359
    mgr := self sourceCodeManagerFor:aClass.
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3360
    mgr notNil ifTrue:[
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3361
        aStream nextPutLine:'**** Repository information ****'; cr.
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3362
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3363
        module := nil.
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3364
        info2 notNil ifTrue:[
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3365
            module := info2 at:#module ifAbsent:nil.
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3366
        ].
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3367
        module notNil ifTrue:[
3632
c39f5d147a8b class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3602
diff changeset
  3368
            aStream nextPutLine:('  Repository URL ......: %1' bindWith: 
3633
abe27fb2c473 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3632
diff changeset
  3369
                                ((mgr repositoryNameForPackage:aClass package) ifNil:[mgr repositoryName , ' (default)']) asString).
3344
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3370
        ].
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  3371
        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
  3372
    ]
1782
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3373
2836
91e9be94d80b changed: #repositoryLogOf:short:onto:
Claus Gittinger <cg@exept.de>
parents: 2835
diff changeset
  3374
    "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
  3375
    "Modified: / 11-07-2012 / 13:50:59 / cg"
1726
e9fba6b66dd6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
  3376
!
e9fba6b66dd6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
  3377
e9fba6b66dd6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
  3378
tagClass:aClass as:tag
e9fba6b66dd6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
  3379
    |mgr|
e9fba6b66dd6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
  3380
e9fba6b66dd6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
  3381
    mgr := self sourceCodeManagerFor:aClass.
1782
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3382
    mgr
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3383
        setSymbolicName:tag 
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3384
        revision:nil 
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3385
        overWrite:true 
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3386
        class:aClass.
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3387
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3388
    "Modified: / 12-09-2006 / 13:03:59 / cg"
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3389
!
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3390
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3391
tagClasses:aCollectionOfClasses as:tag
3847
94661e33541c class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3818
diff changeset
  3392
    ^ self tagClasses:aCollectionOfClasses as:tag revision:nil
94661e33541c class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3818
diff changeset
  3393
94661e33541c class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3818
diff changeset
  3394
    "Created: / 12-09-2006 / 13:04:29 / cg"
94661e33541c class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3818
diff changeset
  3395
!
94661e33541c class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3818
diff changeset
  3396
94661e33541c class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3818
diff changeset
  3397
tagClasses:aCollectionOfClasses as:tag revision:revision
1782
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3398
    |classesPerManager|
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3399
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3400
    classesPerManager := Dictionary new.
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3401
    aCollectionOfClasses 
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3402
        do:[:eachClass | 
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3403
            |manager|
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3404
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3405
            manager := self sourceCodeManagerFor:eachClass.
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3406
            (classesPerManager at:manager ifAbsentPut:[Set new]) add:eachClass
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3407
        ].
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3408
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3409
    classesPerManager keysAndValuesDo:[:manager :classesPerManager|
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3410
        manager
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3411
            setSymbolicName:tag 
3847
94661e33541c class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3818
diff changeset
  3412
            revision:revision 
1782
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3413
            overWrite:true 
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3414
            classes:classesPerManager.
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3415
    ].
1726
e9fba6b66dd6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
  3416
    ^ true
e9fba6b66dd6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
  3417
!
e9fba6b66dd6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
  3418
2602
a8fcee161334 added: #tagPackage:as:
vrany
parents: 2597
diff changeset
  3419
tagPackage: package as:tag
a8fcee161334 added: #tagPackage:as:
vrany
parents: 2597
diff changeset
  3420
a8fcee161334 added: #tagPackage:as:
vrany
parents: 2597
diff changeset
  3421
    self tagClasses:(Smalltalk allClassesInPackage:package) as:tag.
a8fcee161334 added: #tagPackage:as:
vrany
parents: 2597
diff changeset
  3422
a8fcee161334 added: #tagPackage:as:
vrany
parents: 2597
diff changeset
  3423
    "Created: / 12-09-2006 / 13:04:29 / cg"
a8fcee161334 added: #tagPackage:as:
vrany
parents: 2597
diff changeset
  3424
    "Created: / 15-10-2011 / 22:47:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
a8fcee161334 added: #tagPackage:as:
vrany
parents: 2597
diff changeset
  3425
!
a8fcee161334 added: #tagPackage:as:
vrany
parents: 2597
diff changeset
  3426
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
  3427
tagPath:aPath as:tag usingManager:aManager
1782
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3428
    aManager 
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3429
        setSymbolicName:tag 
1726
e9fba6b66dd6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
  3430
        revision:nil 
e9fba6b66dd6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
  3431
        overWrite:true 
e9fba6b66dd6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
  3432
        path:aPath.
1782
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3433
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3434
    "Modified: / 12-09-2006 / 12:04:44 / cg"
2691
01d067355899 added:8 methods
Claus Gittinger <cg@exept.de>
parents: 2688
diff changeset
  3435
    "Created: / 29-12-2011 / 14:32:38 / cg"
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3436
! !
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3437
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
  3438
!SourceCodeManagerUtilities methodsFor:'utilities-cvs-helpers'!
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3439
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3440
getMethodVersionsOfClass:aClass selector:selector numberOfRevisions:numberOfRevisionsOrNil
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3441
    "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
  3442
     Return a dictionary associating revision with a changeList entries for that method.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3443
     Unfinished - need a GUI for that."
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3444
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3445
    |mgr theClass revisionLog revisions items s entriesPerRevision previousVersion|
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3446
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3447
    theClass := aClass theNonMetaclass.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3448
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3449
    mgr := self sourceCodeManagerFor:theClass.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3450
    mgr isNil ifTrue:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3451
        self error:'no sourceCodeManager'.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3452
    ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3453
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3454
    revisionLog := mgr
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3455
                        revisionLogOf:theClass
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3456
                        numberOfRevisions:numberOfRevisionsOrNil.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3457
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3458
    revisions := revisionLog at:#revisions.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3459
    items := revisions collect:[:each | |rev date who|
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3460
                                    rev := each at:#revision.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3461
                                    date := each at:#date.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3462
                                    who := each at:#author.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3463
                                    rev allBold , ' [' , date , ' by ' , who , ']'
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3464
                               ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3465
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3466
    revisions := revisions collect:[:each | each at:#revision].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3467
    revisions addFirst:#current.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3468
    entriesPerRevision := Dictionary new.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3469
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3470
    previousVersion := nil.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3471
    revisions reverseDo:[:eachRevision |
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3472
        |srcStream entries thisVersion|
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3473
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3474
        eachRevision == #current ifTrue:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3475
            s := '' writeStream.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3476
            theClass fileOutOn:s withTimeStamp:false.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3477
            srcStream := s contents readStream.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3478
        ] ifFalse:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3479
            self activityNotification:('checking out revision ' , eachRevision , '...').
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3480
            srcStream := mgr getSourceStreamFor:theClass revision:eachRevision.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3481
        ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3482
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3483
        entries := ChangeSet fromStream:srcStream.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3484
        srcStream close.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3485
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3486
        "/ remove all definitions       
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3487
        entries := entries select:[:each | each isMethodChange].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3488
        "/ remove all methods which are for other selectors      
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3489
        entries := entries select:[:each | each selector == selector].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3490
        "/ remove all methods which are for private subclasses      
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3491
        entries := entries select:[:each | each className = aClass name].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3492
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3493
        entries size == 1 ifTrue:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3494
            "/ the method is there
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3495
            thisVersion := entries first.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3496
            (previousVersion notNil and:[previousVersion sameAs:thisVersion]) ifTrue:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3497
                "/ no change
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3498
            ] ifFalse:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3499
                entriesPerRevision at:eachRevision put:thisVersion.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3500
            ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3501
        ] ifFalse:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3502
            "/ the method is not there
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3503
        ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3504
        previousVersion := thisVersion.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3505
    ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3506
    self error:'unfinished code'.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3507
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3508
    "
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3509
     self getMethodVersionsOfClass:MenuPanel selector:#'helpTextForItem:' numberOfRevisions:20
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3510
     self getMethodVersionsOfClass:NewLauncher class selector:#'menu' numberOfRevisions:20
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3511
    "
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3512
! !
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3513
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
  3514
!SourceCodeManagerUtilities methodsFor:'utilities-cvs-user interaction'!
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3515
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3516
askForContainer:boxText title:title note:notice initialModule:initialModule initialPackage:initialPackage initialFileName:initialFileName
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3517
    "open a dialog asking for a source container;
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3518
     return a dictionary containing module, package and filename,
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3519
     or nil if canceled."
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3520
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3521
    ^ self
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3522
        askForContainer:boxText title:title note:notice 
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3523
        initialModule:initialModule initialPackage:initialPackage initialFileName:initialFileName 
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3524
        forNewContainer:true
1026
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3525
!
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3526
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3527
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
  3528
    "open a dialog asking for a source container;
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3529
     return a dictionary containing module, package and filename,
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3530
     or nil if canceled."
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3531
3551
e8feddd829f9 class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3546
diff changeset
  3532
    |box y component answer
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3533
     moduleHolder packageHolder fileNameHolder
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3534
     module package fileName 
3202
b58b19cac708 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
  3535
     allPackageIDs knownContainers knownPackages packageUpdater
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3536
     packageBoxComponent fileNameBoxComponent fileNameUpdater|
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3537
3202
b58b19cac708 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
  3538
    allPackageIDs := Smalltalk allProjectIDs.
b58b19cac708 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
  3539
b58b19cac708 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
  3540
    knownContainers := allPackageIDs collect:[:package | (package upTo:$:)] as:Set.
b58b19cac708 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
  3541
3394
8e7ee24c6e7b class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3384
diff changeset
  3542
    knownContainers := knownContainers asOrderedCollection reject:[:module | module isBlank].
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3543
    knownContainers sort.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3544
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3545
    packageUpdater := [
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3546
        |theModulePrefix|
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3547
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3548
        theModulePrefix := moduleHolder value , ':'.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3549
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3550
        Cursor wait showWhile:[
3202
b58b19cac708 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
  3551
            knownPackages := 
b58b19cac708 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
  3552
                allPackageIDs
b58b19cac708 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
  3553
                    select:[:package | (package startsWith:theModulePrefix)]
b58b19cac708 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
  3554
                    thenCollect:[:package | |idx|
b58b19cac708 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
  3555
                        idx := package indexOf:$:.
b58b19cac708 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
  3556
                        (package copyFrom:idx + 1)].
b58b19cac708 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
  3557
b58b19cac708 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3201
diff changeset
  3558
            knownPackages := knownPackages asSet asOrderedCollection.
3291
7fc5a1fea0fd Fix stc compiler warnings
Stefan Vogel <sv@exept.de>
parents: 3287
diff changeset
  3559
            knownPackages := knownPackages reject:[:package | package isBlank].
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3560
            knownPackages sort.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3561
            packageBoxComponent list:knownPackages.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3562
        ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3563
    ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3564
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3565
    fileNameUpdater := [
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3566
        |module package files|
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3567
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3568
        Cursor read showWhile:[
2209
e3a4510c45f2 Project noProjectID -> PackageId noProjectID
Claus Gittinger <cg@exept.de>
parents: 2200
diff changeset
  3569
            module := moduleHolder value ? (PackageId noProjectID).
e3a4510c45f2 Project noProjectID -> PackageId noProjectID
Claus Gittinger <cg@exept.de>
parents: 2200
diff changeset
  3570
            package := packageHolder value ? (PackageId noProjectID).
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3571
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
  3572
            files := SourceCodeManager getExistingContainersInModule:module directory:package.
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3573
            files := files asOrderedCollection.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3574
            files := files select:[:eachFile | eachFile asFilename hasSuffix:'st'].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3575
            files sort.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3576
            fileNameBoxComponent list:files.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3577
        ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3578
    ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3579
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3580
    moduleHolder := initialModule asValue.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3581
    packageHolder := initialPackage asValue.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3582
    fileNameHolder := initialFileName asValue.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3583
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3584
    "/
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3585
    "/ open a dialog for this
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3586
    "/
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3587
    box := DialogBox new.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3588
    box label:title.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3589
3425
05be11d262e2 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3394
diff changeset
  3590
    component := box addTextLabel:boxText withCRs adjust:#left.
05be11d262e2 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3394
diff changeset
  3591
    component borderWidth:0.
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3592
    box addVerticalSpace.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3593
    box addVerticalSpace.
1000
3687dbf412db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 998
diff changeset
  3594
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3595
    y := box yPosition.
3425
05be11d262e2 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3394
diff changeset
  3596
    component := box addTextLabel:(resources string:'Module:') adjust:#right.
05be11d262e2 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3394
diff changeset
  3597
    component width:0.4.
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3598
    box yPosition:y.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3599
    component := box addComboBoxOn:moduleHolder tabable:true.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3600
    component list:knownContainers.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3601
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3602
"/    component := box addInputFieldOn:moduleHolder tabable:true.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3603
    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
  3604
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3605
    box addVerticalSpace.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3606
    y := box yPosition.
3425
05be11d262e2 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3394
diff changeset
  3607
    component := box addTextLabel:(resources string:'Package:') adjust:#right.
05be11d262e2 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3394
diff changeset
  3608
    component width:0.4.
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3609
    box yPosition:y.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3610
    packageBoxComponent := component := box addComboBoxOn:packageHolder tabable:true.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3611
"/    component := box addInputFieldOn:packageHolder tabable:true.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3612
    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
  3613
    packageUpdater value.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3614
    moduleHolder onChangeEvaluate:packageUpdater.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3615
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3616
    box addVerticalSpace.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3617
    y := box yPosition.
3425
05be11d262e2 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3394
diff changeset
  3618
    component := box addTextLabel:(resources string:'Filename:') adjust:#right.
05be11d262e2 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3394
diff changeset
  3619
    component width:0.4.
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3620
    box yPosition:y.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3621
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3622
    forNewContainer ifTrue:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3623
        component := box addInputFieldOn:fileNameHolder tabable:true.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3624
        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
  3625
    ] ifFalse:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3626
        fileNameBoxComponent := component := box addComboBoxOn:fileNameHolder tabable:true.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3627
        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
  3628
        fileNameUpdater value.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3629
        packageHolder onChangeEvaluate:fileNameUpdater.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3630
    ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3631
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3632
    box addVerticalSpace.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3633
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3634
    notice notNil ifTrue:[
3425
05be11d262e2 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3394
diff changeset
  3635
        component := box addTextLabel:notice adjust:#left.
05be11d262e2 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3394
diff changeset
  3636
        component borderWidth:0.
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3637
    ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3638
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3639
    box addVerticalSpace.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3640
    box addAbortAndOkButtons.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3641
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3642
    (YesToAllNotification notNil and:[YesToAllNotification isHandled]) ifTrue:[
3683
fb6ad154b94d class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3679
diff changeset
  3643
        component := Button label:(resources string:'Yes to All').
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3644
        component action:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3645
                            YesToAllNotification queryWith:true.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3646
                            box doAccept.
2253
7d7b0d2d1fe7 changed: #askForContainer:title:note:initialModule:initialPackage:initialFileName:forNewContainer:
Claus Gittinger <cg@exept.de>
parents: 2242
diff changeset
  3647
                            box okPressed.
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3648
                         ].
3394
8e7ee24c6e7b class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3384
diff changeset
  3649
        box addButton:component.
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3650
    ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3651
    (AbortAllSignal isHandled) ifTrue:[
3683
fb6ad154b94d class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3679
diff changeset
  3652
        component := Button label:(resources string:'Cancel All').
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3653
        component action:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3654
                            box hide.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3655
                            AbortAllSignal raiseSignal.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3656
                         ].
3394
8e7ee24c6e7b class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3384
diff changeset
  3657
        box addButton:component before:nil.
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3658
    ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3659
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3660
    (YesToAllQuery notNil and:[YesToAllQuery isHandled]) ifTrue:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3661
        answer := YesToAllQuery query.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3662
    ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3663
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3664
    answer isNil ifTrue:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3665
        box showAtPointer.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3666
        answer := box accepted
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3667
    ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3668
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3669
    box destroy.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3670
    answer ifFalse:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3671
        ^ nil
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3672
    ].
1000
3687dbf412db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 998
diff changeset
  3673
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3674
    module := moduleHolder value withoutSpaces.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3675
    package := packageHolder value withoutSpaces.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3676
    fileName := fileNameHolder value withoutSpaces.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3677
    ^ Dictionary new
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3678
        at:#module put:module;
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3679
        at:#package put:package;
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3680
        at:#fileName put:fileName;
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3681
        yourself
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3682
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3683
    "
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3684
     self 
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3685
        askForContainer:'enter container' title:'container' note:'some note'
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3686
        initialModule:'foo' initialPackage:'bar' initialFileName:'baz'        
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3687
    "
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
  3688
3394
8e7ee24c6e7b class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3384
diff changeset
  3689
    "Modified: / 29-08-2013 / 12:26:04 / cg"
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3690
!
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3691
2570
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3692
askForExistingRevision:boxText title:title class:aClass
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3693
    "open a dialog asking for a containers revision;
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3694
     return a revision number, or nil if canceled."
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3695
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3696
    |mgr sourceInfo module package fileName|
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3697
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3698
    mgr := self sourceCodeManagerFor:aClass.
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3699
    sourceInfo := mgr sourceInfoOfClass:aClass.
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3700
    sourceInfo isNil ifTrue:[^ nil].
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3701
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3702
    package := mgr directoryFromSourceInfo:sourceInfo.
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3703
    module := mgr moduleFromSourceInfo:sourceInfo.  
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3704
    fileName := mgr containerFromSourceInfo:sourceInfo.
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3705
    ^ self
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3706
        askForExistingRevision:boxText 
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3707
        title:title 
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3708
        class:aClass 
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3709
        manager:mgr 
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3710
        module:module package:package 
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3711
        fileName:fileName
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3712
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3713
    "
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3714
     SourceCodeManagerUtilities
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3715
        askForRevisionToCompare:'enter revision'
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3716
        title:'revision'
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3717
        class:Array
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3718
    "
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3719
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3720
    "Modified: / 12-09-2006 / 14:17:04 / cg"
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3721
!
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3722
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
  3723
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
  3724
    "open a dialog asking for a containers revision;
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3725
     return a revision number, or nil if canceled."
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3726
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3727
    |partialLog revisions items newestRev
3551
e8feddd829f9 class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3546
diff changeset
  3728
     box y component revisionHolder symbolicNames stableRevision releasedRevision
2325
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3729
     tagHolder tagList lockChange|
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3730
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3731
    partialLog := aSourceCodeManager
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3732
        revisionLogOf:clsOrNil
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3733
        numberOfRevisions:20
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3734
        fileName:fileName
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
  3735
        directory:directory 
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3736
        module:module.
1522
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  3737
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3738
    partialLog notNil ifTrue:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3739
        newestRev := partialLog at:#newestRevision.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3740
        revisions := partialLog at:#revisions.
1456
673e4fc61c36 Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents: 1449
diff changeset
  3741
        symbolicNames := partialLog at:#symbolicNames ifAbsent:[].
673e4fc61c36 Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents: 1449
diff changeset
  3742
        symbolicNames notNil ifTrue:[
673e4fc61c36 Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents: 1449
diff changeset
  3743
            stableRevision := symbolicNames at:'stable' ifAbsent:[].
673e4fc61c36 Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents: 1449
diff changeset
  3744
            releasedRevision := symbolicNames at:'released' ifAbsent:[].
3332
bc7ab41bb5bb class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3327
diff changeset
  3745
            tagList := ((symbolicNames associations sort:[:a :b | a key < b key "self versionString:(a value) isLessThan:(b value)"])
2325
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3746
                         collect:[:assoc | assoc key]) reverse.
3332
bc7ab41bb5bb class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3327
diff changeset
  3747
            tagList remove:'stable' ifAbsent:[].
bc7ab41bb5bb class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3327
diff changeset
  3748
            tagList notEmpty ifTrue:[tagList addFirst:'-'].
bc7ab41bb5bb class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3327
diff changeset
  3749
            tagList addFirst:'stable'.
1456
673e4fc61c36 Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents: 1449
diff changeset
  3750
        ].
673e4fc61c36 Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents: 1449
diff changeset
  3751
            
673e4fc61c36 Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents: 1449
diff changeset
  3752
        items := revisions collect:[:each | |rev date who flag|
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3753
                                        rev := each at:#revision.
2670
2aee2fd0314e refactoring
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  3754
                                        date := (each at:#date ifAbsent:nil) ? '?'.
2aee2fd0314e refactoring
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  3755
                                        who := (each at:#author ifAbsent:nil) ? '?'.
1456
673e4fc61c36 Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents: 1449
diff changeset
  3756
                                        rev = stableRevision ifTrue:[
673e4fc61c36 Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents: 1449
diff changeset
  3757
                                            flag := ' Stable' allBold.
673e4fc61c36 Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents: 1449
diff changeset
  3758
                                        ] ifFalse:[rev = releasedRevision ifTrue:[
673e4fc61c36 Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents: 1449
diff changeset
  3759
                                            flag := ' Released' allBold.
673e4fc61c36 Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents: 1449
diff changeset
  3760
                                        ] ifFalse:[
673e4fc61c36 Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents: 1449
diff changeset
  3761
                                            flag := ' '
673e4fc61c36 Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents: 1449
diff changeset
  3762
                                        ]].
673e4fc61c36 Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents: 1449
diff changeset
  3763
                                        rev allBold , flag, ' [' , date , ' by ' , who , ']'
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3764
                                   ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3765
        revisions := revisions collect:[:each | each at:#revision].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3766
    ] ifFalse:[
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
  3767
        newestRev := aSourceCodeManager newestRevisionInFile:fileName directory:directory module:module.
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3768
        revisions := items := nil.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3769
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3770
        newestRev isNil ifTrue:[
1787
db6157670930 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1782
diff changeset
  3771
            (aSourceCodeManager checkForExistingContainer:fileName inModule:module directory:directory)
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3772
            ifFalse:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3773
                self warn:'Could not find/access the container for ',fileName,' in the repository.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3774
This could be due to:
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3775
    - invalid/wrong CVS-Root setting
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3776
    - missing CVS access rights
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3777
        (no access / not logged in)
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3778
    - changed CVSRoot after compilation
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3779
        (i.e. wrong CVS-path in classes version method)
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3780
'.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3781
                ^ nil
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3782
            ]
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3783
        ]
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3784
    ].
2325
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3785
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3786
    lockChange := false.
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3787
    revisionHolder := newestRev asValue.
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3788
    revisionHolder onChangeEvaluate:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3789
        "/ cut off everything after revision
2325
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3790
        |s first words tag|
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3791
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3792
        s := revisionHolder value.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3793
        words := s asCollectionOfWords.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3794
        words size > 0 ifTrue:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3795
            first := words first string.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3796
            first ~= s ifTrue:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3797
                revisionHolder value:first
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3798
            ]
2325
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3799
        ].
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3800
        lockChange ifFalse:[
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3801
            tagHolder value:''
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3802
        ].
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3803
    ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3804
2325
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3805
    tagHolder := '' asValue.
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3806
    tagHolder 
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3807
        onChangeEvaluate:[
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3808
            |tag rev|
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3809
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3810
            (tag := tagHolder value) notEmptyOrNil ifTrue:[
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3811
                rev := symbolicNames at:tag.
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3812
                rev ~= revisionHolder value ifTrue:[
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3813
                    lockChange := true.
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3814
                    revisionHolder value:rev.
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3815
                    lockChange := false.
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3816
                ].
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3817
            ]
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3818
        ].
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3819
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3820
    "/
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3821
    "/ open a dialog for this
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3822
    "/
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3823
    box := DialogBox new.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3824
    box label:title.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3825
3425
05be11d262e2 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3394
diff changeset
  3826
    component := box addTextLabel:boxText withCRs adjust:#left.
05be11d262e2 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3394
diff changeset
  3827
    component borderWidth:0.
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3828
    box addVerticalSpace.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3829
    box addVerticalSpace.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3830
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3831
    y := box yPosition.
3425
05be11d262e2 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3394
diff changeset
  3832
    component := box addTextLabel:(resources string:'Revision:') adjust:#right.
05be11d262e2 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3394
diff changeset
  3833
    component width:0.4.
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3834
    box yPosition:y.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3835
    component := box addComboBoxOn:revisionHolder tabable:true.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3836
    component list:items.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3837
    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
  3838
2325
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3839
    y := box yPosition.
3425
05be11d262e2 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3394
diff changeset
  3840
    component := box addTextLabel:(resources string:'or Tag:') adjust:#right.
05be11d262e2 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3394
diff changeset
  3841
    component width:0.4.
2325
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3842
    box yPosition:y.
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3843
    component := box addComboListOn:tagHolder tabable:true.
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3844
    component list:tagList.
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3845
    component width:0.6; left:0.4.
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3846
    tagList isNil ifTrue:[
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3847
        component disable
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3848
    ].
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3849
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3850
    box addVerticalSpace.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3851
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3852
    box addAbortAndOkButtons.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3853
2325
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3854
    AbortAllOperationWantedQuery query ifTrue:[
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3855
        (box addAbortButtonLabelled:'Cancel all') action:[AbortAllSignal raise].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3856
    ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3857
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3858
    box showAtPointer.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3859
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3860
    box accepted ifFalse:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3861
        box destroy.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3862
        ^ nil
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3863
    ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3864
    box destroy.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3865
3551
e8feddd829f9 class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3546
diff changeset
  3866
    ^ (tagHolder value notEmptyOrNil ifTrue:[tagHolder] ifFalse:[revisionHolder]) value withoutSpaces.
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3867
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3868
    "
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3869
     SourceCodeManagerUtilities
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3870
        askForRevisionToCompare:'enter revision'
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3871
        title:'revision'
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3872
        class:nil
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3873
        manager:SourceCodeManager 
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3874
        module:'stx'
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
  3875
        directory:'libbasic'
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3876
        fileName:'Array.st'
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3877
    "
1522
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  3878
2670
2aee2fd0314e refactoring
Claus Gittinger <cg@exept.de>
parents: 2651
diff changeset
  3879
    "Modified: / 21-12-2011 / 23:09:26 / cg"
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3880
!
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3881
1426
609f0db77471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1424
diff changeset
  3882
checkAndWarnAboutBadMessagesInClass:aClass checkAgainHolder:checkAgainHolder
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3883
    "check if a class contains message-sends to:
2237
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  3884
        #halt , #halt:
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3885
        #error
2237
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  3886
        #todo , #todo:
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  3887
        (and maybe more in the future)
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  3888
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  3889
     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
  3890
1994
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3891
    |badStuff whatIsBad msg answer labels values defaultAnswer dontShowAgain
3551
e8feddd829f9 class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3546
diff changeset
  3892
     methodsWithBadStuff|
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3893
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3894
    badStuff := #(
2237
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  3895
        ( 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
  3896
        ( 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
  3897
        ( 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
  3898
        ( todo         'send of #todo - unfinished code present?' )
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  3899
        ( todo:        'send of #todo:- unfinished code present?' )
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3900
    ).
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3901
1994
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3902
    methodsWithBadStuff := Set new.
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3903
    whatIsBad := Set new.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3904
    aClass theNonMetaclass instAndClassSelectorsAndMethodsDo:[:sel :mthd |
2237
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  3905
        |setOfLiterals setOfSentMessages|
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  3906
2977
e5bfe652373f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 2974
diff changeset
  3907
        mthd isExtension ifFalse:[
2237
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  3908
            setOfLiterals := mthd literals.  "/ try without parsing first.
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  3909
            (badStuff contains:[:eachEntry | setOfLiterals includes:eachEntry first]) ifTrue:[
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  3910
                setOfSentMessages := mthd messagesSent.
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  3911
                badStuff do:[:eachEntry | 
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  3912
                    (setOfSentMessages includes:eachEntry first) ifTrue:[
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  3913
                        whatIsBad add:eachEntry second.
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  3914
                        methodsWithBadStuff add:mthd.
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  3915
                    ]
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  3916
                ].
1000
3687dbf412db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 998
diff changeset
  3917
            ].
3687dbf412db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 998
diff changeset
  3918
        ].
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3919
    ].
1994
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3920
    whatIsBad isEmpty ifTrue:[^ true].
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3921
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3922
    (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
  3923
        answer := YesToAllQuery query.
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3924
        answer notNil ifTrue:[ ^ answer ].
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3925
    ].
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3926
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3927
    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
  3928
    msg := msg , '\\'.
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3929
    whatIsBad do:[:each |
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3930
        msg := msg , '   ' , each , '\'
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3931
    ].
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3932
    msg := msg , '\'.
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3933
    methodsWithBadStuff size == 1 ifTrue:[
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3934
        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
  3935
                        with:methodsWithBadStuff anElement whoString allBold).
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3936
    ] ifFalse:[
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3937
        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
  3938
                        with:methodsWithBadStuff anElement whoString allBold 
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3939
                        with:methodsWithBadStuff size-1).
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3940
    ].
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3941
    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
  3942
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3943
    (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
  3944
        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
  3945
        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
  3946
        defaultAnswer := #yesToAll.
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3947
    ] ifFalse:[
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3948
        labels := #('No' 'No, Browse' 'Yes').
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3949
        values := #(false #noBrowse true).
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3950
        defaultAnswer := true.
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3951
    ].
1426
609f0db77471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1424
diff changeset
  3952
1456
673e4fc61c36 Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents: 1449
diff changeset
  3953
"/        AbortAllOperationRequest isHandled ifTrue:[
1426
609f0db77471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1424
diff changeset
  3954
"/            labels := #('Cancel All') , labels.
609f0db77471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1424
diff changeset
  3955
"/            values := #(#cancelAll) , values.
609f0db77471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1424
diff changeset
  3956
"/        ].
609f0db77471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1424
diff changeset
  3957
3812
173678af0074 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3692
diff changeset
  3958
    Dialog modifyingBoxWith:[:box |
1994
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3959
        checkAgainHolder isValueModel ifTrue:[
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3960
            dontShowAgain := checkAgainHolder value not asValue.
3812
173678af0074 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3692
diff changeset
  3961
            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
  3962
                on:dontShowAgain.
1426
609f0db77471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1424
diff changeset
  3963
        ].
1994
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3964
    ] do:[
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3965
        answer := OptionBox 
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3966
                      request:msg withCRs
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3967
                      label:(resources string:'Really CheckIn ?')
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3968
                      image:(InfoBox iconBitmap)
3551
e8feddd829f9 class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3546
diff changeset
  3969
                      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
  3970
                      values:values
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3971
                      default:defaultAnswer
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3972
                      onCancel:nil.
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3973
    ].
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3974
    answer isNil ifTrue:[
3433
eee3079d18d3 AbortSignal -> AbortOperationRequest
Stefan Vogel <sv@exept.de>
parents: 3425
diff changeset
  3975
        AbortOperationRequest raise.
1994
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3976
    ].
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3977
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3978
    dontShowAgain notNil ifTrue:[
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3979
        checkAgainHolder value:dontShowAgain value not 
1000
3687dbf412db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 998
diff changeset
  3980
    ].
1994
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3981
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3982
    answer == #noBrowse ifTrue:[
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3983
        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
  3984
        self yesToAllNotification queryWith:false.
1994
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3985
        ^ false
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3986
    ].
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3987
    answer == #cancelAll ifTrue:[
3433
eee3079d18d3 AbortSignal -> AbortOperationRequest
Stefan Vogel <sv@exept.de>
parents: 3425
diff changeset
  3988
        AbortOperationRequest raise.
1994
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3989
    ].
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3990
    answer == #yesToAll ifTrue:[
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3991
        YesToAllNotification queryWith:true.
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3992
        ^ true
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3993
    ].
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3994
    answer == #noToAll ifTrue:[
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3995
        YesToAllNotification queryWith:false.
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3996
        ^ false
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3997
    ].
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3998
    ^ answer
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3999
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4000
    "
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4001
     self checkAndWarnAboutBadMessagesInClass:(SourceCodeManagerUtilities)  
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4002
    "
2775
d1908ae4aed8 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2774
diff changeset
  4003
d1908ae4aed8 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2774
diff changeset
  4004
    "Modified: / 28-02-2012 / 10:41:38 / cg"
1460
2e1c304e5b52 Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents: 1456
diff changeset
  4005
!
2e1c304e5b52 Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents: 1456
diff changeset
  4006
2129
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4007
getCheckinInfoFor:aClassNameOrPackageNameString initialAnswer:initialAnswerOrNil
2283
2de925716786 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  4008
    "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
  4009
     and other info (mark as stable, for example).
2de925716786 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  4010
     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
  4011
1704
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4012
    ^ self
2129
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4013
        getCheckinInfoFor:aClassNameOrPackageNameString 
1704
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4014
        initialAnswer:initialAnswerOrNil
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4015
        withQuickOption:false
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4016
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4017
    "
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4018
     SourceCodeManagerUtilities getCheckinInfoFor:'hello' initialAnswer:'bla'
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4019
    "
1460
2e1c304e5b52 Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents: 1456
diff changeset
  4020
2283
2de925716786 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  4021
    "Modified: / 06-07-2010 / 11:22:15 / cg"
1704
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4022
!
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4023
2129
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4024
getCheckinInfoFor:aClassNameOrPackageNameString initialAnswer:initialAnswerOrNil withQuickOption:withQuickOption
2283
2de925716786 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  4025
    "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
  4026
     and other info (mark as stable, for example).
2106
35b6c567ff7e comment
Claus Gittinger <cg@exept.de>
parents: 2097
diff changeset
  4027
     Return the info-object (actually: the dialog) or nil if aborted."
35b6c567ff7e comment
Claus Gittinger <cg@exept.de>
parents: 2097
diff changeset
  4028
3140
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
  4029
    ^  self 
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
  4030
        getCheckinInfoFor:aClassNameOrPackageNameString initialAnswer:initialAnswerOrNil withQuickOption:withQuickOption
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
  4031
        withValidateConsistencyOption:false
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
  4032
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
  4033
    "
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
  4034
     SourceCodeManagerUtilities default getCheckinInfoFor:'hello' initialAnswer:'bla'
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
  4035
    "
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
  4036
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
  4037
    "Modified: / 12-03-2012 / 13:12:40 / cg"
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
  4038
!
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
  4039
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
  4040
getCheckinInfoFor:aClassNameOrPackageNameString initialAnswer:initialAnswerOrNil withQuickOption:withQuickOption withValidateConsistencyOption:withValidateConsistencyOption
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
  4041
    "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
  4042
     and other info (mark as stable, for example).
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
  4043
     Return the info-object (actually: the dialog) or nil if aborted."
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
  4044
2106
35b6c567ff7e comment
Claus Gittinger <cg@exept.de>
parents: 2097
diff changeset
  4045
    |logMsg infoDialog|
35b6c567ff7e comment
Claus Gittinger <cg@exept.de>
parents: 2097
diff changeset
  4046
35b6c567ff7e comment
Claus Gittinger <cg@exept.de>
parents: 2097
diff changeset
  4047
    infoDialog := Tools::CheckinInfoDialog 
2795
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
  4048
                    getCheckinInfoFor:aClassNameOrPackageNameString 
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
  4049
                    initialAnswer:(initialAnswerOrNil ? LastSourceLogMessage)
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
  4050
                    withQuickOption:withQuickOption
3140
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
  4051
                    logHistory:(LastSourceLogMessages ? #())
25a1a02ce3d9 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3134
diff changeset
  4052
                    withValidateConsistencyOption:withValidateConsistencyOption.
2795
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
  4053
2106
35b6c567ff7e comment
Claus Gittinger <cg@exept.de>
parents: 2097
diff changeset
  4054
    infoDialog notNil ifTrue:[
35b6c567ff7e comment
Claus Gittinger <cg@exept.de>
parents: 2097
diff changeset
  4055
        logMsg := infoDialog logMessage.
2284
624993d61344 comment
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
  4056
        logMsg notEmptyOrNil ifTrue:[
2795
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
  4057
            LastSourceLogMessage := logMsg.
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
  4058
            LastSourceLogMessages isNil ifTrue:[
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
  4059
                LastSourceLogMessages := OrderedCollection new.
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
  4060
            ].
2796
78401b160a28 changed: #getCheckinInfoFor:initialAnswer:withQuickOption:
Claus Gittinger <cg@exept.de>
parents: 2795
diff changeset
  4061
            LastSourceLogMessages remove:logMsg ifAbsent:[].
2795
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
  4062
            LastSourceLogMessages addFirst:logMsg.
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
  4063
            LastSourceLogMessages size > 10 ifTrue:[
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
  4064
                LastSourceLogMessages removeLast
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
  4065
            ].
1460
2e1c304e5b52 Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents: 1456
diff changeset
  4066
        ].
2e1c304e5b52 Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents: 1456
diff changeset
  4067
    ].
2106
35b6c567ff7e comment
Claus Gittinger <cg@exept.de>
parents: 2097
diff changeset
  4068
    ^ infoDialog
1460
2e1c304e5b52 Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents: 1456
diff changeset
  4069
2e1c304e5b52 Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents: 1456
diff changeset
  4070
    "
2795
26cfabcd623e previous log messages
Claus Gittinger <cg@exept.de>
parents: 2794
diff changeset
  4071
     SourceCodeManagerUtilities default getCheckinInfoFor:'hello' initialAnswer:'bla'
1460
2e1c304e5b52 Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents: 1456
diff changeset
  4072
    "
1501
6bb154127b0f CheckInDialog class moved
Claus Gittinger <cg@exept.de>
parents: 1500
diff changeset
  4073
2796
78401b160a28 changed: #getCheckinInfoFor:initialAnswer:withQuickOption:
Claus Gittinger <cg@exept.de>
parents: 2795
diff changeset
  4074
    "Modified: / 12-03-2012 / 13:12:40 / cg"
2129
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4075
!
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4076
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4077
goodInitialLogMessageForCheckinClassOfClass:aClass
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4078
    "figure out, if there were any non-comment changes. 
2971
7fefd3a142a4 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 2969
diff changeset
  4079
     Provide a reasonable initial log message (I am tired of typing in 'comment only').
7fefd3a142a4 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 2969
diff changeset
  4080
     This is a q&d hack - not complete and not correct (for example, it will generate a method change
7fefd3a142a4 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 2969
diff changeset
  4081
     info line, even if the selector was removed afterwards).
7fefd3a142a4 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 2969
diff changeset
  4082
     So check the outcome."
2129
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4083
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4084
    |selectorsInChangeSet newSelectors modifiedSelectors
3657
2de3a610d07c class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3642
diff changeset
  4085
     className metaClassName classChanges changesForThisClass definitionChangesForThisClass methodChangesForThisClass 
2194
c45cd185ee80 changed: #goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
  4086
     allMethodChangesForThisClass modifiedMethodsForThisClass newMethodsForThisClass removedMethodsForThisClass
2129
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4087
     initialLogStream printSelectors selectorsWithCommentOrFormattingChangeOnly
3327
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4088
     selectorsWithVariableChangeOnly newSelectorsRemoved
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4089
     removedSelectors categoryChanges categoryChangeSelectors additionalInfoPerChangedSelector|
2129
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4090
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4091
    "/ a helper function
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4092
    printSelectors := 
3327
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4093
        [:what :selectors :more |
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4094
            |sel moreInfo|
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4095
3334
c3473a753372 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3332
diff changeset
  4096
            selectors remove:nil ifAbsent:[].
2922
19cfd7d9b629 changed: #goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2903
diff changeset
  4097
            initialLogStream nextPutAll:(what,':').
2129
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4098
            selectors size < 5 ifTrue:[
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4099
                selectors size == 1 ifTrue:[
3327
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4100
                    sel := selectors first.
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4101
                    initialLogStream nextPutAll: ' #'; nextPutAll:sel.
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4102
                    more ifTrue:[
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4103
                        (moreInfo := additionalInfoPerChangedSelector at:sel ifAbsent:nil) notNil ifTrue:[
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4104
                            initialLogStream space; nextPutAll:moreInfo.
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4105
                        ]
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4106
                    ].
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4107
                    initialLogStream cr.
2129
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4108
                ] ifFalse:[
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4109
                    initialLogStream cr.
3327
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4110
                    selectors asSortedCollection do:[:sel | 
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4111
                        initialLogStream tab; nextPutAll:'#'; nextPutAll:sel. 
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4112
                        more ifTrue:[
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4113
                            (moreInfo := additionalInfoPerChangedSelector at:sel ifAbsent:nil) notNil ifTrue:[
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4114
                                initialLogStream space; nextPutAll:moreInfo.
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4115
                            ].
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4116
                        ].
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4117
                        initialLogStream cr
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4118
                    ].
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4119
                ].
2129
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4120
            ] ifFalse:[
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4121
                initialLogStream 
3343
01a016e0df7a class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3334
diff changeset
  4122
                    print: (selectors size); nextPutAll: ' methods'; cr.
2129
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4123
            ].
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4124
        ].
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4125
2312
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4126
    classChanges := ChangeSet current select:[:aChange | aChange isClassChange].
3657
2de3a610d07c class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3642
diff changeset
  4127
    className := aClass theNonMetaclass name.
2de3a610d07c class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3642
diff changeset
  4128
    metaClassName := aClass theMetaclass name.
2129
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4129
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4130
    changesForThisClass := classChanges 
3657
2de3a610d07c class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3642
diff changeset
  4131
                                select:[:aChange | aChange className = className
2de3a610d07c class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3642
diff changeset
  4132
                                                   or:[aChange className = metaClassName ]].
2129
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4133
3327
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4134
    additionalInfoPerChangedSelector := Dictionary new.
3291
7fc5a1fea0fd Fix stc compiler warnings
Stefan Vogel <sv@exept.de>
parents: 3287
diff changeset
  4135
    definitionChangesForThisClass := changesForThisClass reject:[:aChange | aChange isMethodChange].
2312
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4136
    categoryChanges := changesForThisClass select:[:aChange | aChange isMethodCategoryChange]. 
2194
c45cd185ee80 changed: #goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
  4137
    categoryChangeSelectors := categoryChanges collect:[:aChange | aChange changeSelector] as:Set.
2312
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4138
    allMethodChangesForThisClass := changesForThisClass select:[:aChange | aChange isMethodCodeChange].
2129
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4139
    selectorsInChangeSet := allMethodChangesForThisClass collect:[:aChange | aChange changeSelector] as:Set.
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4140
    methodChangesForThisClass := selectorsInChangeSet collect:[:eachSelector |
2161
c1d39e2f7115 changed: #goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2142
diff changeset
  4141
                                        allMethodChangesForThisClass detectLast:[:change | change changeSelector = eachSelector]] as:OrderedCollection.
2129
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4142
                                            
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4143
    modifiedMethodsForThisClass := methodChangesForThisClass 
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4144
                                select:[:aChange | aChange previousVersion notNil].
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4145
    modifiedSelectors := modifiedMethodsForThisClass collect:[:aChange | aChange changeSelector] as:Set.
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4146
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4147
    newMethodsForThisClass := allMethodChangesForThisClass 
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4148
                                select:[:aChange | aChange previousVersion isNil].
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4149
    newSelectors := newMethodsForThisClass collect:[:aChange | aChange changeSelector] as:Set.
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4150
    
3327
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4151
    removedMethodsForThisClass := changesForThisClass 
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4152
                                select:[:aChange | aChange isMethodRemoveChange and:[ aChange changeMethod isNil ]].
2194
c45cd185ee80 changed: #goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
  4153
    removedSelectors := removedMethodsForThisClass collect:[:aChange | aChange changeSelector] as:Set.
c45cd185ee80 changed: #goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
  4154
2129
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4155
    initialLogStream := '' writeStream.
2971
7fefd3a142a4 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 2969
diff changeset
  4156
7fefd3a142a4 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 2969
diff changeset
  4157
    initialLogStream printCR:'class: ',aClass name.
7fefd3a142a4 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 2969
diff changeset
  4158
2313
3dbafc3a51a4 changed:
Claus Gittinger <cg@exept.de>
parents: 2312
diff changeset
  4159
    "/ definition?
2312
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4160
    "/ suppress definition-message if initial checkin
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4161
    (aClass package isNil or:[aClass revision isNil]) ifFalse:[ 
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4162
        definitionChangesForThisClass notEmpty ifTrue:[
2974
df015da58d8a class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 2971
diff changeset
  4163
            "/ self halt.
2922
19cfd7d9b629 changed: #goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2903
diff changeset
  4164
            initialLogStream printCR:'class definition'.
2129
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4165
        ].
2312
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4166
    ].
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4167
2313
3dbafc3a51a4 changed:
Claus Gittinger <cg@exept.de>
parents: 2312
diff changeset
  4168
    "/ added selectors?
3327
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4169
    newSelectorsRemoved := newSelectors select:[:sel | removedSelectors includes:sel].
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4170
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4171
    newSelectors removeAllFoundIn:removedSelectors.
2312
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4172
    newSelectors notEmpty ifTrue:[
3327
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4173
        printSelectors value:'added' value:newSelectors value:false.
2312
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4174
    ].
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4175
    modifiedSelectors removeAllFoundIn:newSelectors.
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4176
    categoryChangeSelectors removeAllFoundIn:newSelectors.
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4177
2313
3dbafc3a51a4 changed:
Claus Gittinger <cg@exept.de>
parents: 2312
diff changeset
  4178
    "/ removed selectors?
3327
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4179
    removedSelectors removeAllFoundIn:newSelectorsRemoved.
2313
3dbafc3a51a4 changed:
Claus Gittinger <cg@exept.de>
parents: 2312
diff changeset
  4180
    removedSelectors notEmpty ifTrue:[
3327
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4181
        printSelectors value:'removed' value:removedSelectors value:false.
2313
3dbafc3a51a4 changed:
Claus Gittinger <cg@exept.de>
parents: 2312
diff changeset
  4182
    ].
3dbafc3a51a4 changed:
Claus Gittinger <cg@exept.de>
parents: 2312
diff changeset
  4183
    modifiedSelectors removeAllFoundIn:removedSelectors.
3dbafc3a51a4 changed:
Claus Gittinger <cg@exept.de>
parents: 2312
diff changeset
  4184
    categoryChangeSelectors removeAllFoundIn:removedSelectors.
3dbafc3a51a4 changed:
Claus Gittinger <cg@exept.de>
parents: 2312
diff changeset
  4185
3dbafc3a51a4 changed:
Claus Gittinger <cg@exept.de>
parents: 2312
diff changeset
  4186
    "/ modifications?
2312
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4187
    modifiedSelectors notEmpty ifTrue:[
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4188
        selectorsWithCommentOrFormattingChangeOnly := Set new.
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4189
        selectorsWithVariableChangeOnly := Set new.
2313
3dbafc3a51a4 changed:
Claus Gittinger <cg@exept.de>
parents: 2312
diff changeset
  4190
2922
19cfd7d9b629 changed: #goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2903
diff changeset
  4191
        "/ check for format/comment change
2312
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4192
        RBParser notNil ifTrue:[
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4193
            modifiedSelectors do:[:eachSelector |
3327
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4194
                |oldest newest oldMethod newMethod oldTree newTree 
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4195
                 variableMapping selectorMapping unchangedVariables unchangedSelectors|
2312
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4196
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4197
                (newSelectors includes:eachSelector) ifFalse:[
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4198
                    oldest := allMethodChangesForThisClass detect:[:change | change changeSelector = eachSelector].
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4199
                    newest := allMethodChangesForThisClass detectLast:[:change | change changeSelector = eachSelector].
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4200
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4201
                    oldest := oldest previousVersion notNil ifTrue:[oldest previousVersion] ifFalse:[oldest].
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4202
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4203
                    oldTree := RBParser parseMethod:oldest source onError:[:aString :pos | nil].
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4204
                    newTree := RBParser parseMethod:newest source onError:[:aString :pos | nil].
2922
19cfd7d9b629 changed: #goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2903
diff changeset
  4205
2312
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4206
                    (oldTree notNil and:[newTree notNil]) ifTrue:[
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4207
                        variableMapping := Dictionary new.
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4208
                        (oldTree equalTo:newTree withMapping: variableMapping) ifTrue:[
2922
19cfd7d9b629 changed: #goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2903
diff changeset
  4209
                            unchangedVariables := variableMapping keys select:[:k | (variableMapping at:k) = k].
19cfd7d9b629 changed: #goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2903
diff changeset
  4210
                            variableMapping removeAllKeys:unchangedVariables.
19cfd7d9b629 changed: #goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2903
diff changeset
  4211
19cfd7d9b629 changed: #goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2903
diff changeset
  4212
                            (variableMapping at:'self' ifAbsent:'self') = 'self' ifTrue:[
2312
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4213
                                ((variableMapping associations count:[:assoc | assoc key ~= assoc value]) == 0) ifTrue:[
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4214
                                    selectorsWithCommentOrFormattingChangeOnly add:eachSelector.
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4215
                                ] ifFalse:[
3327
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4216
                                    "/ check, if a global has changed (aka sends to another global)
2922
19cfd7d9b629 changed: #goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2903
diff changeset
  4217
                                    ((variableMapping keys contains:[:var | var first isUppercase])
19cfd7d9b629 changed: #goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2903
diff changeset
  4218
                                    or:[ (variableMapping values contains:[:var | var first isUppercase]) ]) ifFalse:[
19cfd7d9b629 changed: #goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2903
diff changeset
  4219
                                        selectorsWithVariableChangeOnly add:eachSelector.
19cfd7d9b629 changed: #goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2903
diff changeset
  4220
                                    ].
2142
d09c9d1b8c46 changed: #goodInitialLogMessageForCheckinClassOfClass:
sr
parents: 2137
diff changeset
  4221
                                ].
2129
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4222
                            ].
3327
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4223
                        ] ifFalse:[
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4224
                            selectorMapping := Dictionary new.
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4225
                            (oldTree equalTo:newTree withSelectorMapping: selectorMapping) ifTrue:[
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4226
                                unchangedSelectors := selectorMapping keys select:[:k | (selectorMapping at:k) = k].
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4227
                                selectorMapping removeAllKeys:unchangedSelectors.
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4228
                                (selectorMapping notEmpty and:[selectorMapping size <= 2]) ifTrue:[
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4229
                                    additionalInfoPerChangedSelector at:eachSelector put:(
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4230
                                        String streamContents:[:s |
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4231
                                            |first|
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4232
                        
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4233
                                            s nextPutAll:'('.
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4234
                                            first := true.
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4235
                                            selectorMapping keysAndValuesDo:[:selOld :selNew | 
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4236
                                                first ifFalse:[s nextPutAll:', '].
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4237
                                                s print:('send #',selNew,' instead of #',selOld).
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4238
                                                first := false.
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4239
                                            ].
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4240
                                            s nextPutAll:')'.
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4241
                                        ]).
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4242
                                ]
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4243
                            ]
2129
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4244
                        ].
2312
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4245
                    ].
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4246
                ]
2129
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4247
            ].
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4248
        ].
2313
3dbafc3a51a4 changed:
Claus Gittinger <cg@exept.de>
parents: 2312
diff changeset
  4249
2312
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4250
        modifiedSelectors removeAllFoundIn:selectorsWithCommentOrFormattingChangeOnly.
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4251
        modifiedSelectors removeAllFoundIn:selectorsWithVariableChangeOnly.
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4252
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4253
        (selectorsWithCommentOrFormattingChangeOnly notEmpty) ifTrue:[
3327
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4254
            printSelectors value:'comment/format in' value:selectorsWithCommentOrFormattingChangeOnly value:false.
2312
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4255
        ].
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4256
        (selectorsWithVariableChangeOnly notEmpty) ifTrue:[
3327
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4257
            printSelectors value:'variable renamed in' value:selectorsWithVariableChangeOnly value:false.
2312
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4258
        ].
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4259
        (modifiedSelectors notEmpty) ifTrue:[
3327
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4260
            printSelectors value:'changed' value:modifiedSelectors value:true.
2194
c45cd185ee80 changed: #goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
  4261
        ].
2129
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4262
    ].
2312
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4263
    categoryChanges notEmpty ifTrue:[
3327
a3200580a76f class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3325
diff changeset
  4264
        printSelectors value:'category of' value:categoryChangeSelectors value:false.
2312
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4265
    ].
2129
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4266
    ^ initialLogStream contents
2312
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4267
2922
19cfd7d9b629 changed: #goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2903
diff changeset
  4268
    "Modified: / 26-09-2012 / 18:31:38 / cg"
3344
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4269
!
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4270
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4271
revisionForSymbolicName:tag class:cls fileName:classFileName directory:packageDir module:moduleDir manager:aSourceCodeManager
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4272
    "given a tag, return the corresponding revision"
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4273
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4274
    |partialLog symbolicNames|
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4275
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4276
    partialLog := aSourceCodeManager
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4277
        revisionLogOf:cls
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4278
        numberOfRevisions:20
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4279
        fileName:classFileName
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4280
        directory:packageDir 
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4281
        module:moduleDir.
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4282
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4283
    partialLog notNil ifTrue:[
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4284
        symbolicNames := partialLog at:#symbolicNames ifAbsent:[].
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4285
        symbolicNames notNil ifTrue:[
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4286
            ^ symbolicNames at:tag ifAbsent:nil
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4287
        ].
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4288
    ].
4e577aa5b998 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 3343
diff changeset
  4289
    ^ nil
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4290
! !
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4291
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
  4292
!SourceCodeManagerUtilities methodsFor:'utilities-encoding'!
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4293
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4294
guessEncodingOfFile:aFilename
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4295
    "look for a string
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4296
        encoding #name
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4297
     or:
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4298
        encoding: name
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4299
     within the given buffer 
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4300
     (which is usually the first few bytes of a textFile).
2719
a25a07c06d84 refactored
Claus Gittinger <cg@exept.de>
parents: 2693
diff changeset
  4301
     If that's not found, use heuristics (in CharacterArray) to guess."
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4302
1433
c3696ad0922b mark obsolete messages as obsolete
Stefan Vogel <sv@exept.de>
parents: 1429
diff changeset
  4303
    <resource: #obsolete>
c3696ad0922b mark obsolete messages as obsolete
Stefan Vogel <sv@exept.de>
parents: 1429
diff changeset
  4304
1414
f67d4b166606 guessEncoding now implemented in CharacterEncoder
Claus Gittinger <cg@exept.de>
parents: 1403
diff changeset
  4305
    self obsoleteMethodWarning:'ask CharacterEncoder'.
f67d4b166606 guessEncoding now implemented in CharacterEncoder
Claus Gittinger <cg@exept.de>
parents: 1403
diff changeset
  4306
    ^ CharacterEncoder guessEncodingOfFile:aFilename
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4307
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4308
    "
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4309
     SourceCodeManagerUtilities guessEncodingOfFile:'../../libview2/resources/ApplicationModel_de.rs' asFilename
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4310
     SourceCodeManagerUtilities guessEncodingOfFile:'../../libview2/resources/ApplicationModel_ru.rs' asFilename
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4311
    "
2719
a25a07c06d84 refactored
Claus Gittinger <cg@exept.de>
parents: 2693
diff changeset
  4312
a25a07c06d84 refactored
Claus Gittinger <cg@exept.de>
parents: 2693
diff changeset
  4313
    "Modified (comment): / 14-01-2012 / 20:54:35 / cg"
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4314
!
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4315
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4316
guessEncodingOfStream:aStream
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4317
    "look for a string of the form
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4318
            encoding #name
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4319
     or:
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4320
            encoding: name
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4321
     in the first few bytes of aStream."
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4322
1433
c3696ad0922b mark obsolete messages as obsolete
Stefan Vogel <sv@exept.de>
parents: 1429
diff changeset
  4323
    <resource: #obsolete>
c3696ad0922b mark obsolete messages as obsolete
Stefan Vogel <sv@exept.de>
parents: 1429
diff changeset
  4324
1414
f67d4b166606 guessEncoding now implemented in CharacterEncoder
Claus Gittinger <cg@exept.de>
parents: 1403
diff changeset
  4325
    self obsoleteMethodWarning:'ask CharacterEncoder'.
f67d4b166606 guessEncoding now implemented in CharacterEncoder
Claus Gittinger <cg@exept.de>
parents: 1403
diff changeset
  4326
    ^ CharacterEncoder guessEncodingOfStream:aStream
873
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  4327
! !
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  4328
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  4329
!SourceCodeManagerUtilities class methodsFor:'documentation'!
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  4330
2487
c8f4417b9edc changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents: 2484
diff changeset
  4331
version
3847
94661e33541c class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3818
diff changeset
  4332
    ^ '$Header: /cvs/stx/stx/libbasic3/SourceCodeManagerUtilities.st,v 1.320 2015-04-16 09:35:17 stefan Exp $'
2487
c8f4417b9edc changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents: 2484
diff changeset
  4333
!
c8f4417b9edc changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents: 2484
diff changeset
  4334
2175
50349cb87bf4 changed:
fm
parents: 2161
diff changeset
  4335
version_CVS
3847
94661e33541c class: SourceCodeManagerUtilities
Stefan Vogel <sv@exept.de>
parents: 3818
diff changeset
  4336
    ^ '$Header: /cvs/stx/stx/libbasic3/SourceCodeManagerUtilities.st,v 1.320 2015-04-16 09:35:17 stefan Exp $'
873
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  4337
! !
3134
93b8f75424c5 class: SourceCodeManagerUtilities
Claus Gittinger <cg@exept.de>
parents: 2977
diff changeset
  4338