SourceCodeManagerUtilities.st
author vrany
Sun, 16 Oct 2011 00:23:36 +0200
changeset 2602 a8fcee161334
parent 2597 fcb5d74b32d2
child 2605 93f1e7e8aee7
permissions -rw-r--r--
added: #tagPackage:as: comment/format in: #diffSetOfProject:againstRepositoryVersionFrom:
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
906
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
     1
"
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
     2
 COPYRIGHT (c) 2000 eXept Software AG
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
     3
              All Rights Reserved
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
     4
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
     5
 This software is furnished under a license and may be used
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
     6
 only in accordance with the terms of that license and with the
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
     8
 be provided or otherwise made available to, or used by, any
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
     9
 other person.  No title to or ownership of the software is
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
    10
 hereby transferred.
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
    11
"
920
ab68cf4c6ee6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
    12
"{ Package: 'stx:libbasic3' }"
ab68cf4c6ee6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
    13
873
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
Object subclass:#SourceCodeManagerUtilities
2597
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
    15
	instanceVariableNames:'manager resources'
2286
ad425b1c40ab changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2284
diff changeset
    16
	classVariableNames:'LastSourceLogMessage LastModule LastPackage YesToAllQuery
ad425b1c40ab changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2284
diff changeset
    17
		YesToAllNotification'
ad425b1c40ab changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2284
diff changeset
    18
	poolDictionaries:''
ad425b1c40ab changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2284
diff changeset
    19
	category:'System-SourceCodeManagement'
873
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
!
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
!SourceCodeManagerUtilities class methodsFor:'documentation'!
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
906
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
    24
copyright
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
    25
"
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
    26
 COPYRIGHT (c) 2000 eXept Software AG
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
    27
              All Rights Reserved
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
    28
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
    29
 This software is furnished under a license and may be used
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
    30
 only in accordance with the terms of that license and with the
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
    31
 inclusion of the above copyright notice.   This software may not
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
    32
 be provided or otherwise made available to, or used by, any
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
    33
 other person.  No title to or ownership of the software is
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
    34
 hereby transferred.
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
    35
"
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
    36
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
    37
!
862b6903fbf3 copyrights
Claus Gittinger <cg@exept.de>
parents: 893
diff changeset
    38
873
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
documentation
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
"
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
    utility code which is useful at more than one place
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
    (extracted from the browser)
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
    [author:]
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
        Claus Gittinger (cg@exept)
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
    [see also:]
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
    [instance variables:]
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    50
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51
    [class variables:]
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
"
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    53
! !
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
    55
!SourceCodeManagerUtilities class methodsFor:'instance creation'!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
    56
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
    57
forManager: aSourceCodeManager
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
    58
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
    59
    ^self new setManager: aSourceCodeManager
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
    "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
    62
!
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
    63
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
    64
new
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
    65
    "return an initialized instance"
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
    ^ self basicNew initialize.
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
    68
! !
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
    69
992
83f257a4fa0c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
    70
!SourceCodeManagerUtilities class methodsFor:'Signal constants'!
83f257a4fa0c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
    71
83f257a4fa0c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
    72
yesToAllNotification
83f257a4fa0c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
    73
    YesToAllNotification isNil ifTrue:[
83f257a4fa0c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
    74
        YesToAllNotification := QuerySignal new.
83f257a4fa0c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
    75
    ].
83f257a4fa0c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
    76
    ^ YesToAllNotification
83f257a4fa0c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
    77
!
83f257a4fa0c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
    78
83f257a4fa0c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
    79
yesToAllQuery
83f257a4fa0c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
    80
    YesToAllQuery isNil ifTrue:[
83f257a4fa0c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
    81
        YesToAllQuery := QuerySignal new.
83f257a4fa0c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
    82
    ].
83f257a4fa0c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
    83
    ^ YesToAllQuery
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
1084
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
    86
!SourceCodeManagerUtilities class methodsFor:'accessing'!
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
    87
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
    88
default
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
    89
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
    90
    Default isNil ifTrue:[Default := self new].
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
    91
    ^Default
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
    92
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
    93
    "Created: / 10-10-2011 / 11:28:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
    94
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
    95
1084
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
    96
lastModule
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
    97
    "return the value of the static variable 'LastModule' (automatically generated)"
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
    98
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
    99
    ^ LastModule
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   100
!
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   101
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   102
lastModule:something
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   103
    "set the value of the static variable 'LastModule' (automatically generated)"
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   104
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   105
    LastModule := something.
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   106
!
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   107
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   108
lastPackage
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   109
    "return the value of the static variable 'LastPackage' (automatically generated)"
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
    ^ LastPackage
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   112
!
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   113
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   114
lastPackage:something
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   115
    "set the value of the static variable 'LastPackage' (automatically generated)"
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   116
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   117
    LastPackage := something.
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   118
! !
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
   119
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   120
!SourceCodeManagerUtilities class methodsFor:'error handling'!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   121
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   122
doesNotUnderstand: aMessage
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   123
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   124
    (self default respondsTo: aMessage selector) ifTrue:[
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   125
        "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
   126
        self breakPoint: #jv.
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   127
        self breakPoint: #cg.
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   128
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   129
        ^aMessage sendTo: self default
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   130
    ] ifFalse:[
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   131
        ^super doesNotUnderstand: aMessage
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   132
    ]
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   133
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   134
    "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
   135
! !
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   136
2569
vrany
parents: 2556
diff changeset
   137
!SourceCodeManagerUtilities class methodsFor:'private-migration'!
vrany
parents: 2556
diff changeset
   138
vrany
parents: 2556
diff changeset
   139
compileForwarders
vrany
parents: 2556
diff changeset
   140
vrany
parents: 2556
diff changeset
   141
    "Utility method"
vrany
parents: 2556
diff changeset
   142
vrany
parents: 2556
diff changeset
   143
    "
vrany
parents: 2556
diff changeset
   144
        SourceCodeManagerUtilities compileForwarders.
vrany
parents: 2556
diff changeset
   145
    "
vrany
parents: 2556
diff changeset
   146
vrany
parents: 2556
diff changeset
   147
    self methodsDo:[:m|
vrany
parents: 2556
diff changeset
   148
        | sel |
vrany
parents: 2556
diff changeset
   149
        sel := m selector.
vrany
parents: 2556
diff changeset
   150
        ((self class includesSelector: sel) and: [(self class >> sel) source = m source]) ifTrue:[
vrany
parents: 2556
diff changeset
   151
            | source header |
vrany
parents: 2556
diff changeset
   152
vrany
parents: 2556
diff changeset
   153
            header := m source asStringCollection first.
vrany
parents: 2556
diff changeset
   154
            source := '%1
vrany
parents: 2556
diff changeset
   155
vrany
parents: 2556
diff changeset
   156
    <resource: #obsolete>
vrany
parents: 2556
diff changeset
   157
vrany
parents: 2556
diff changeset
   158
    self obsoleteMethodWarning: ''Please use instance protocol (SourceCodeManagerUtilities default doSomething)''.
vrany
parents: 2556
diff changeset
   159
vrany
parents: 2556
diff changeset
   160
    ^self default %1' bindWith: header with: header.
vrany
parents: 2556
diff changeset
   161
vrany
parents: 2556
diff changeset
   162
            self halt: 'Inspect source'.
vrany
parents: 2556
diff changeset
   163
            self class compile: source classified: m category.    
vrany
parents: 2556
diff changeset
   164
        ].
vrany
parents: 2556
diff changeset
   165
            
vrany
parents: 2556
diff changeset
   166
    ]
vrany
parents: 2556
diff changeset
   167
vrany
parents: 2556
diff changeset
   168
    "Created: / 11-10-2011 / 10:55:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
vrany
parents: 2556
diff changeset
   169
! !
vrany
parents: 2556
diff changeset
   170
1806
fdcaa790756a resources from libtool
Claus Gittinger <cg@exept.de>
parents: 1800
diff changeset
   171
!SourceCodeManagerUtilities class methodsFor:'resources'!
fdcaa790756a resources from libtool
Claus Gittinger <cg@exept.de>
parents: 1800
diff changeset
   172
fdcaa790756a resources from libtool
Claus Gittinger <cg@exept.de>
parents: 1800
diff changeset
   173
resourcePackage
fdcaa790756a resources from libtool
Claus Gittinger <cg@exept.de>
parents: 1800
diff changeset
   174
    ^ #'stx:libtool'
fdcaa790756a resources from libtool
Claus Gittinger <cg@exept.de>
parents: 1800
diff changeset
   175
! !
fdcaa790756a resources from libtool
Claus Gittinger <cg@exept.de>
parents: 1800
diff changeset
   176
873
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   177
!SourceCodeManagerUtilities class methodsFor:'utilities'!
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   178
1882
8b3a4c2a2c2a when creating a new container, set the package of all methods.
Claus Gittinger <cg@exept.de>
parents: 1879
diff changeset
   179
classIsNotYetInRepository:aClass withManager:mgr
2570
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
   180
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
   181
    <resource: #obsolete>
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
   182
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
   183
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
   184
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
   185
    ^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
   186
!
8b3a4c2a2c2a when creating a new container, set the package of all methods.
Claus Gittinger <cg@exept.de>
parents: 1879
diff changeset
   187
1704
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
   188
nameOfExtensionsContainer
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   189
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   190
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   191
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   192
    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
   193
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   194
    ^self default nameOfExtensionsContainer
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   195
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   196
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   197
setPackageOfAllMethodsIn:aClass to:aPackage
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   198
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   199
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   200
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   201
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   202
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   203
    ^self default setPackageOfAllMethodsIn:aClass to:aPackage
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   204
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   205
    "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
   206
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   207
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   208
setPackageOfAllMethodsInChangeSet:aChangeSet to:aPackage
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   209
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   210
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   211
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   212
    self 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
   213
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   214
    ^self default setPackageOfAllMethodsInChangeSet:aChangeSet to:aPackage
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   215
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   216
    "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
   217
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   218
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   219
sourceCodeManagerFor:aClass
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   220
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   221
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   222
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   223
    self 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
   224
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   225
    ^self default sourceCodeManagerFor:aClass
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   226
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   227
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   228
sourceCodeOfClass:aClass
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   229
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   230
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   231
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   232
    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
   233
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   234
    ^self default sourceCodeOfClass:aClass
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   235
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   236
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   237
versionString:a isLessThan:b
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   238
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   239
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   240
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   241
    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
   242
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   243
    ^self default versionString:a isLessThan:b
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   244
! !
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   245
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   246
!SourceCodeManagerUtilities class methodsFor:'utilities-cvs'!
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
changeSetForExtensionMethodsForPackage:packageToCheckOut askForRevision:askForRevision using:aSourceCodeManager
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   249
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   250
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   251
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   252
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   253
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   254
    ^self default changeSetForExtensionMethodsForPackage:packageToCheckOut askForRevision:askForRevision using:aSourceCodeManager
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   255
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   256
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   257
changeSetForExtensionMethodsForPackage:packageToCheckOut revision:revisionOrNil orAskForRevision:askForRevision using:aSourceCodeManager
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   258
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   259
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   260
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   261
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   262
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   263
    ^self default changeSetForExtensionMethodsForPackage:packageToCheckOut revision:revisionOrNil orAskForRevision:askForRevision using:aSourceCodeManager
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   264
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   265
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   266
checkForExistingModule:module directory:directory container:containerFileName using:mgr allowCreate:allowCreate
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   267
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   268
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   269
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   270
    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
   271
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   272
    ^self default checkForExistingModule:module directory:directory container:containerFileName using:mgr allowCreate:allowCreate
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   273
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   274
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   275
checkForExistingModule:module directory:directory using:mgr allowCreate:allowCreate
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   276
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   277
    <resource: #obsolete>
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
    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
   280
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   281
    ^self default checkForExistingModule:module directory:directory using:mgr allowCreate:allowCreate
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   282
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   283
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   284
checkForExistingModule:module using:mgr allowCreate:allowCreate
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   285
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   286
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   287
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   288
    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
   289
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   290
    ^self default checkForExistingModule:module using:mgr allowCreate:allowCreate
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   291
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   292
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   293
checkinClass:aClass
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   294
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   295
    <resource: #obsolete>
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
    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
   298
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   299
    ^self default checkinClass:aClass
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   300
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   301
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   302
checkinClass:aClass withInfo:aLogInfoOrNil
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   303
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   304
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   305
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   306
    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
   307
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   308
    ^self default checkinClass:aClass withInfo:aLogInfoOrNil
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
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   311
checkinClass:aClass withInfo:aLogInfoOrNil withCheck:doCheckClass
2569
vrany
parents: 2556
diff changeset
   312
vrany
parents: 2556
diff changeset
   313
    <resource: #obsolete>
vrany
parents: 2556
diff changeset
   314
vrany
parents: 2556
diff changeset
   315
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
vrany
parents: 2556
diff changeset
   316
vrany
parents: 2556
diff changeset
   317
    ^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
   318
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   319
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   320
checkinClasses:aCollectionOfClass
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   321
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   322
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   323
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   324
    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
   325
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   326
    ^self default checkinClasses:aCollectionOfClass
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
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   329
checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrNil
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   330
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   331
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   332
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   333
    self 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
   334
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   335
    ^self default checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrNil
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
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   338
checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrStringNil withCheck:doCheckClasses
2569
vrany
parents: 2556
diff changeset
   339
vrany
parents: 2556
diff changeset
   340
    <resource: #obsolete>
vrany
parents: 2556
diff changeset
   341
vrany
parents: 2556
diff changeset
   342
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
vrany
parents: 2556
diff changeset
   343
vrany
parents: 2556
diff changeset
   344
    ^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
   345
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   346
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   347
checkinExtensionMethods:aCollectionOfMethods forPackage:aPackageID withInfo:aLogInfoOrStringOrNil
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   348
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   349
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   350
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   351
    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
   352
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   353
    ^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
   354
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   355
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   356
checkoutClass:aClass askForMerge:askForMerge
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   357
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   358
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   359
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   360
    self 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
   361
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   362
    ^self default checkoutClass:aClass askForMerge:askForMerge
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
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   365
checkoutClass:aClass askForRevision:askForRevision askForMerge:askForMerge
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   366
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   367
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   368
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   369
    self 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
   370
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   371
    ^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
   372
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   373
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   374
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
   375
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   376
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   377
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   378
    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
   379
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   380
    ^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
   381
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   382
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   383
checkoutExtensionMethodsForPackage:packageToCheckOut askForRevision:askForRevision askForMerge:askForMerge using:aSourceCodeManager
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   384
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   385
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   386
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   387
    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
   388
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   389
    ^self default checkoutExtensionMethodsForPackage:packageToCheckOut askForRevision:askForRevision askForMerge:askForMerge using:aSourceCodeManager
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
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   392
compareClassWithRepository:aClass
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   393
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   394
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   395
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   396
    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
   397
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   398
    ^self default compareClassWithRepository:aClass
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
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   401
compareClassWithRepository:aClass askForRevision:askForRevision
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   402
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   403
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   404
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   405
    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
   406
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   407
    ^self default compareClassWithRepository:aClass askForRevision:askForRevision
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
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   410
compareProject:aProject withRepositoryVersionFrom:aDateOrNilForNewest
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   411
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   412
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   413
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   414
    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
   415
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   416
    ^self default compareProject:aProject withRepositoryVersionFrom:aDateOrNilForNewest
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   417
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   418
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   419
compareProjectWithRepository:aProject
2569
vrany
parents: 2556
diff changeset
   420
vrany
parents: 2556
diff changeset
   421
    <resource: #obsolete>
vrany
parents: 2556
diff changeset
   422
vrany
parents: 2556
diff changeset
   423
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
vrany
parents: 2556
diff changeset
   424
vrany
parents: 2556
diff changeset
   425
    ^self default compareProjectWithRepository:aProject
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   426
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   427
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   428
createSourceContainerForClass:aClass
2569
vrany
parents: 2556
diff changeset
   429
vrany
parents: 2556
diff changeset
   430
    <resource: #obsolete>
vrany
parents: 2556
diff changeset
   431
vrany
parents: 2556
diff changeset
   432
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
vrany
parents: 2556
diff changeset
   433
vrany
parents: 2556
diff changeset
   434
    ^self default createSourceContainerForClass:aClass
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   435
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   436
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   437
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
   438
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   439
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   440
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   441
    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
   442
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   443
    ^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
   444
!
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
diffSetOfProject:aProject againstRepositoryVersionFrom:aDateOrNilForNewest
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   447
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   448
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   449
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   450
    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
   451
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   452
    ^self default diffSetOfProject:aProject againstRepositoryVersionFrom:aDateOrNilForNewest
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   453
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   454
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   455
ensureCorrectVersionMethodsInClass:aClass using:aManager
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   456
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   457
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   458
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   459
    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
   460
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   461
    ^self default ensureCorrectVersionMethodsInClass:aClass using:aManager
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   462
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   463
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   464
getLogMessageForClassCheckinTakingDefaultsFromPreviousLogInfo:aLogInfoOrNil forClass:aClass valuesInto:aBlock
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   465
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   466
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   467
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   468
    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
   469
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   470
    ^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
   471
!
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
removeSourceContainerForClass:aClass
2569
vrany
parents: 2556
diff changeset
   474
vrany
parents: 2556
diff changeset
   475
    <resource: #obsolete>
vrany
parents: 2556
diff changeset
   476
vrany
parents: 2556
diff changeset
   477
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
vrany
parents: 2556
diff changeset
   478
vrany
parents: 2556
diff changeset
   479
    ^self default removeSourceContainerForClass:aClass
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   480
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   481
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   482
removeSourceContainerForClass:aClass confirm:doConfirm warn:doWarn
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   483
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   484
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   485
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   486
    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
   487
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   488
    ^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
   489
!
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
repositoryLogOf:aClass onto:aStream
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   492
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   493
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   494
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   495
    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
   496
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   497
    ^self default repositoryLogOf:aClass onto:aStream
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   498
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   499
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   500
repositoryLogOf:aClass short:shortOrNot onto:aStream
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
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   503
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   504
    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
   505
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   506
    ^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
   507
!
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
tagClass:aClass as:tag
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
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   512
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   513
    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
   514
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   515
    ^self default tagClass:aClass as:tag
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   516
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   517
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   518
tagClasses:aCollectionOfClasses as:tag
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
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   521
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   522
    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
   523
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   524
    ^self default tagClasses:aCollectionOfClasses as:tag
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   525
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   526
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   527
tagPath:aPath as:tag using:aManager
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
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   530
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   531
    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
   532
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   533
    ^self default tagPath:aPath as:tag using:aManager
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   534
! !
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
!SourceCodeManagerUtilities class methodsFor:'utilities-cvs-helpers'!
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
getMethodVersionsOfClass:aClass selector:selector numberOfRevisions:numberOfRevisionsOrNil
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   539
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   540
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   541
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   542
    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
   543
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   544
    ^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
   545
! !
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
!SourceCodeManagerUtilities class methodsFor:'utilities-cvs-user interaction'!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   548
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   549
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
   550
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   551
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   552
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   553
    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
   554
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   555
    ^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
   556
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   557
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   558
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
   559
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   560
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   561
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   562
    self 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
   563
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   564
    ^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
   565
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   566
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   567
askForExistingRevision:boxText title:title class:aClass
2570
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
   568
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
   569
    <resource: #obsolete>
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
   570
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
   571
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
   572
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
   573
    ^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
   574
!
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
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
   577
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   578
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   579
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   580
    self 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
   581
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   582
    ^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
   583
!
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
checkAndWarnAboutBadMessagesInClass:aClass checkAgainHolder:checkAgainHolder
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
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   588
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   589
    self 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
   590
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   591
    ^self default checkAndWarnAboutBadMessagesInClass:aClass checkAgainHolder:checkAgainHolder
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   592
!
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
getCheckinInfoFor:aClassNameOrPackageNameString initialAnswer:initialAnswerOrNil
2569
vrany
parents: 2556
diff changeset
   595
vrany
parents: 2556
diff changeset
   596
    <resource: #obsolete>
vrany
parents: 2556
diff changeset
   597
vrany
parents: 2556
diff changeset
   598
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
vrany
parents: 2556
diff changeset
   599
vrany
parents: 2556
diff changeset
   600
    ^self default getCheckinInfoFor:aClassNameOrPackageNameString initialAnswer:initialAnswerOrNil
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   601
!
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
getCheckinInfoFor:aClassNameOrPackageNameString initialAnswer:initialAnswerOrNil withQuickOption:withQuickOption
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
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   606
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   607
    self 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
   608
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   609
    ^self default getCheckinInfoFor:aClassNameOrPackageNameString initialAnswer:initialAnswerOrNil withQuickOption:withQuickOption
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   610
!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   611
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   612
goodInitialLogMessageForCheckinClassOfClass:aClass
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   613
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   614
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   615
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   616
    self 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
   617
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   618
    ^self default goodInitialLogMessageForCheckinClassOfClass:aClass
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   619
! !
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
!SourceCodeManagerUtilities class methodsFor:'utilities-encoding'!
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
guessEncodingOfFile:aFilename
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
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   626
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   627
    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
   628
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   629
    ^self default guessEncodingOfFile:aFilename
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   630
!
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
guessEncodingOfStream:aStream
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   633
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   634
    <resource: #obsolete>
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   635
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   636
    self obsoleteMethodWarning: 'Please use instance protocol (SourceCodeManagerUtilities default doSomething)'.
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   637
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   638
    ^self default guessEncodingOfStream:aStream
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   639
! !
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   640
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   641
!SourceCodeManagerUtilities methodsFor:'accessing'!
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
classResources
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   644
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   645
    ^self class classResources
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   646
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   647
    "Created: / 10-10-2011 / 11:42:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
2569
vrany
parents: 2556
diff changeset
   648
!
vrany
parents: 2556
diff changeset
   649
vrany
parents: 2556
diff changeset
   650
yesToAllNotification
vrany
parents: 2556
diff changeset
   651
vrany
parents: 2556
diff changeset
   652
    ^self class yesToAllNotification
vrany
parents: 2556
diff changeset
   653
vrany
parents: 2556
diff changeset
   654
    "Created: / 11-10-2011 / 12:01:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
vrany
parents: 2556
diff changeset
   655
!
vrany
parents: 2556
diff changeset
   656
vrany
parents: 2556
diff changeset
   657
yesToAllQuery
vrany
parents: 2556
diff changeset
   658
vrany
parents: 2556
diff changeset
   659
    ^self class yesToAllQuery
vrany
parents: 2556
diff changeset
   660
vrany
parents: 2556
diff changeset
   661
    "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
   662
! !
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   663
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   664
!SourceCodeManagerUtilities methodsFor:'error handling'!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   665
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   666
doesNotUnderstand: aMessage
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   667
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   668
    (self class respondsTo: aMessage selector) ifTrue:[
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   669
        "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
   670
        self breakPoint: #jv.
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   671
        self breakPoint: #cg.
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
        ^aMessage sendTo: self class
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   674
    ] ifFalse:[
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   675
        ^super doesNotUnderstand: aMessage
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   676
    ]
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
    "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
   679
! !
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   680
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   681
!SourceCodeManagerUtilities methodsFor:'initialization'!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   682
2597
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
   683
initialize
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
   684
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
   685
    resources := self classResources.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
   686
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
   687
    "Modified: / 13-10-2011 / 11:03:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
   688
!
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
   689
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   690
setManager: aSourceCodeManager
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   691
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   692
    manager := aSourceCodeManager
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   693
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   694
    "Created: / 10-10-2011 / 11:47:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   695
! !
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   696
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   697
!SourceCodeManagerUtilities methodsFor:'utilities'!
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   698
2569
vrany
parents: 2556
diff changeset
   699
classIsNotYetInRepository:aClass withManager:mgr
vrany
parents: 2556
diff changeset
   700
    |info|
vrany
parents: 2556
diff changeset
   701
vrany
parents: 2556
diff changeset
   702
    info := mgr sourceInfoOfClass:aClass.
vrany
parents: 2556
diff changeset
   703
vrany
parents: 2556
diff changeset
   704
    ^ (info isNil 
vrany
parents: 2556
diff changeset
   705
    or:[(info at:#fileName ifAbsent:nil) isNil
vrany
parents: 2556
diff changeset
   706
    or:[(info at:#module ifAbsent:nil) isNil
vrany
parents: 2556
diff changeset
   707
    or:[(info at:#directory ifAbsent:nil) isNil]]])
vrany
parents: 2556
diff changeset
   708
vrany
parents: 2556
diff changeset
   709
    "Created: / 25-10-2006 / 09:43:00 / cg"
vrany
parents: 2556
diff changeset
   710
!
vrany
parents: 2556
diff changeset
   711
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   712
nameOfExtensionsContainer
1704
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
   713
    ^ 'extensions.st'
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
   714
!
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
   715
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
   716
setPackageOfAllMethodsIn:aClass to:aPackage
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
   717
    "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
   718
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
   719
    |anyChange anyChangeHere|
893
09543b968f15 added askFor... utility.
Claus Gittinger <cg@exept.de>
parents: 886
diff changeset
   720
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
   721
    anyChange := false.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
   722
    aClass withAllPrivateClassesDo:[:eachClass |
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
   723
        anyChangeHere := false.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
   724
        eachClass instAndClassSelectorsAndMethodsDo:[:sel :mthd | 
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
   725
            mthd package ~= aPackage ifTrue:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
   726
                mthd setPackage:aPackage.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
   727
                anyChangeHere := true.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
   728
            ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
   729
        ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
   730
        anyChangeHere ifTrue:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
   731
            eachClass changed:#projectOrganization
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
   732
        ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
   733
        anyChangeHere ifTrue:[anyChange := true].
893
09543b968f15 added askFor... utility.
Claus Gittinger <cg@exept.de>
parents: 886
diff changeset
   734
    ].
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
   735
    anyChange ifTrue:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
   736
       Smalltalk changed:#projectOrganization
1185
e86907810d1f handle abortAll in checkIn
Claus Gittinger <cg@exept.de>
parents: 1160
diff changeset
   737
    ].
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
   738
    ^ anyChange
893
09543b968f15 added askFor... utility.
Claus Gittinger <cg@exept.de>
parents: 886
diff changeset
   739
!
09543b968f15 added askFor... utility.
Claus Gittinger <cg@exept.de>
parents: 886
diff changeset
   740
2193
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
   741
setPackageOfAllMethodsInChangeSet:aChangeSet to:aPackage
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
   742
    "make all methods belong to the classes project"
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
   743
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
   744
    aChangeSet do:[:eachChange |
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
   745
        eachChange isMethodCodeChange ifTrue:[
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
   746
            eachChange changeMethod package ~= aPackage ifTrue:[
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
   747
                Transcript showCR:'change package of ',eachChange changeMethod whoString.
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
   748
                eachChange changeMethod setPackage:aPackage.        
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
   749
            ]
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
   750
        ]
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
   751
    ].
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
   752
!
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
   753
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
   754
sourceCodeManagerFor:aClass
2343
1acdf9d65c7c changed: #sourceCodeManagerFor:
Claus Gittinger <cg@exept.de>
parents: 2326
diff changeset
   755
    |mgr assumption|
934
4f06b1db2ca1 better user interface when asking for a revision to compare.
Claus Gittinger <cg@exept.de>
parents: 933
diff changeset
   756
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   757
    manager notNil ifTrue:[^manager].
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   758
1782
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
   759
    mgr := aClass theNonMetaclass sourceCodeManager.
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
   760
    mgr isNil ifTrue:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
   761
        SourceCodeManager isNil ifTrue:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
   762
            (self warn:'SourceCodeManagement is disabled or not configured.\\Please setup in the Launcher.' withCRs) ifFalse:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
   763
                ^ nil
1012
92c4719178de faster search for halts etc.
Claus Gittinger <cg@exept.de>
parents: 1011
diff changeset
   764
            ].
973
b9004b37290a check for #halt and #error when checking in
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
   765
        ].
2343
1acdf9d65c7c changed: #sourceCodeManagerFor:
Claus Gittinger <cg@exept.de>
parents: 2326
diff changeset
   766
        assumption := AbstractSourceCodeManager defaultManager ? CVSSourceCodeManager.
1acdf9d65c7c changed: #sourceCodeManagerFor:
Claus Gittinger <cg@exept.de>
parents: 2326
diff changeset
   767
        assumption notNil ifTrue:[
1acdf9d65c7c changed: #sourceCodeManagerFor:
Claus Gittinger <cg@exept.de>
parents: 2326
diff changeset
   768
            (self confirm:('Class does not seem to provide a valid sourceCodeManager.\\Assume %1 ?' bindWith:assumption managerTypeName) withCRs) ifFalse:[
1acdf9d65c7c changed: #sourceCodeManagerFor:
Claus Gittinger <cg@exept.de>
parents: 2326
diff changeset
   769
                ^ nil
1acdf9d65c7c changed: #sourceCodeManagerFor:
Claus Gittinger <cg@exept.de>
parents: 2326
diff changeset
   770
            ].
1acdf9d65c7c changed: #sourceCodeManagerFor:
Claus Gittinger <cg@exept.de>
parents: 2326
diff changeset
   771
            mgr := assumption.
973
b9004b37290a check for #halt and #error when checking in
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
   772
        ].
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
   773
    ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
   774
    ^ mgr
1782
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
   775
2343
1acdf9d65c7c changed: #sourceCodeManagerFor:
Claus Gittinger <cg@exept.de>
parents: 2326
diff changeset
   776
    "Modified: / 19-04-2011 / 11:48:41 / cg"
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   777
    "Modified: / 10-10-2011 / 11:47:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1449
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
   778
!
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
   779
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
   780
sourceCodeOfClass:aClass
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
   781
    |stream src|
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
   782
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
   783
    stream := '' writeStream.
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
   784
    Method flushSourceStreamCache.
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
   785
    aClass fileOutOn:stream withTimeStamp:false.
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
   786
    src := stream contents asString.
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
   787
    stream close.
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
   788
    ^ src
2326
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   789
!
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   790
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   791
versionString:a isLessThan:b
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   792
    "compare two strings of the form: a.b.c..."
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   793
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   794
    |i1 i2 a1 b1 rest1 rest2|
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   795
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   796
    i1 := a indexOf:$. .
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   797
    i2 := b indexOf:$. .
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   798
    i1 == 0 ifTrue:[
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   799
        i1 := a size + 1.
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   800
    ].
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   801
    i2 == 0 ifTrue:[
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   802
        i2 := b size + 1.
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   803
    ].
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   804
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   805
    a1 := Integer readFrom:(a copyTo:i1-1).
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   806
    b1 := Integer readFrom:(b copyTo:i2-1).
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   807
    a1 < b1 ifTrue:[^ true].
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   808
    a1 > b1 ifTrue:[^ false].
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   809
    rest1 := (a copyFrom:i1+1).
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   810
    rest2 := (b copyFrom:i2+1).
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   811
    rest1 isEmpty ifTrue:[
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   812
        ^ rest2 notEmpty
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   813
    ].
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   814
    rest2 isEmpty ifTrue:[
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   815
        ^ false
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   816
    ].
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   817
    ^ self versionString:rest1 isLessThan:rest2
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   818
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   819
    "
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   820
     self assert:(self versionString:'12.34.66' isLessThan:'12.35.66').
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   821
     self assert:(self versionString:'12.34.66' isLessThan:'12.35.67').
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   822
     self assert:(self versionString:'11.34.66' isLessThan:'12.34.67').
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   823
     self assert:(self versionString:'11.35.66' isLessThan:'12.34.67').
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   824
     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
   825
     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
   826
     self assert:(self versionString:'13.35.66' isLessThan:'13.35.67').
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   827
     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
   828
     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
   829
     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
   830
     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
   831
     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
   832
    "
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   833
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
   834
    "Modified: / 17-02-2011 / 10:20:14 / cg"
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
   835
! !
1160
d56159f5a86f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1158
diff changeset
   836
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
   837
!SourceCodeManagerUtilities methodsFor:'utilities-cvs'!
973
b9004b37290a check for #halt and #error when checking in
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
   838
1841
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   839
changeSetForExtensionMethodsForPackage:packageToCheckOut askForRevision:askForRevision using:aSourceCodeManager
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   840
    "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
   841
     If askForRevision is false, check-out the newest version.
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   842
     Return a changeSet or nil (if any error occurred)"
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   843
2242
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
   844
    ^ self
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
   845
        changeSetForExtensionMethodsForPackage:packageToCheckOut 
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
   846
        revision:nil orAskForRevision:askForRevision 
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
   847
        using:aSourceCodeManager
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
   848
!
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
   849
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
   850
changeSetForExtensionMethodsForPackage:packageToCheckOut revision:revisionOrNil orAskForRevision:askForRevision using:aSourceCodeManager
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
   851
    "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
   852
     If askForRevision is false, check-out the newest version.
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
   853
     Return a changeSet or nil (if any error occurred)"
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
   854
1841
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   855
    |resources directory module file
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   856
     inChangeSet extensionMethods
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   857
     aStream sourceToLoad rev msg newestRev
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   858
     listHere listRep diffSet 
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   859
     changed onlyHere onlyInRep answer labels values singleChangeSelector
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   860
     changedClasses default |
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   861
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   862
    resources := self classResources.
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   863
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   864
    directory := packageToCheckOut asPackageId directory.
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   865
    module := packageToCheckOut asPackageId module.
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   866
    file := self nameOfExtensionsContainer.
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   867
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   868
    "/
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   869
    "/ ask for revision
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   870
    "/
2242
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
   871
    (rev := revisionOrNil) isNil ifTrue:[
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
   872
        newestRev := aSourceCodeManager newestRevisionInFile:file directory:directory module:module.
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
   873
        askForRevision ifFalse:[
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
   874
            rev := newestRev ? ''
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
   875
        ] ifTrue:[
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
   876
            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
   877
            newestRev notNil ifTrue:[
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
   878
                msg := msg , '\' , (resources string:'Newest in reporitory is %1.' with:newestRev)
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
   879
            ].
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
   880
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
   881
            rev := SourceCodeManagerUtilities
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
   882
                    askForExistingRevision:msg 
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
   883
                    title:'CheckOut from repository' 
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
   884
                    class:nil 
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
   885
                    manager:aSourceCodeManager 
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
   886
                    module:module package:directory fileName:file.
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
   887
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
   888
            rev isNil ifTrue:[
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
   889
                ^ nil   "/ canceled
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
   890
            ].
1841
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   891
        ].
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   892
    ].
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   893
    rev withoutSpaces isEmpty ifTrue:[
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   894
        rev := #newest.
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   895
        msg := 'extracting newest %1 (' , (newestRev ? '???') , ')'.
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   896
    ] ifFalse:[
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   897
        msg := 'extracting previous %1'.
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   898
    ].
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   899
    aStream := aSourceCodeManager  
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   900
        streamForClass:nil
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   901
        fileName:file 
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   902
        revision:rev 
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   903
        directory:directory 
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   904
        module:module
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   905
        cache:true.
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   906
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   907
    aStream isNil ifTrue:[
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   908
        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
   909
        ^ nil
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   910
    ].
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   911
    aStream class readErrorSignal handle:[:ex |
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   912
        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
   913
        aStream close.
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   914
        ^ nil
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   915
    ] do:[
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   916
        sourceToLoad := aStream contents asString.
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   917
    ].
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   918
    aStream close.
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   919
    ^ ChangeSet fromStream:(sourceToLoad readStream).
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   920
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   921
    "Created: / 09-10-2006 / 13:04:37 / cg"
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   922
!
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
   923
1704
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
   924
checkForExistingModule:module directory:directory container:containerFileName using:mgr allowCreate:allowCreate
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
   925
    |resources moduleName directoryName containerName|
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
   926
1377
0fd99dd003f6 classResources now understood by all classes
Claus Gittinger <cg@exept.de>
parents: 1375
diff changeset
   927
    resources := self classResources.
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
   928
    moduleName := module allBold.
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
   929
    directoryName := directory allBold.
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
   930
    containerName := containerFileName allBold.
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
   931
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
   932
    "/
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
   933
    "/ check for the container
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
   934
    "/
1787
db6157670930 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1782
diff changeset
   935
    (mgr checkForExistingContainer:containerFileName inModule:module directory:directory) ifFalse:[
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
   936
        allowCreate ifFalse:[
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
   937
            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
   938
                                   with:containerName with:moduleName with:directoryName) withCRs.
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
   939
            ^ false
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
   940
        ].
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
   941
        (Dialog 
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
   942
            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
   943
                                 with:containerName with:moduleName with:directoryName) withCRs
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
   944
            noLabel:'Cancel') 
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
   945
        ifFalse:[
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
   946
            ^ false.
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
   947
        ].
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
   948
        (mgr createContainerForText:'' inModule:module package:directory container:containerFileName) ifFalse:[
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
   949
            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
   950
                                 with:containerName with:moduleName with:directoryName).
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
   951
            ^ false.
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
   952
        ]
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
   953
    ].
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
   954
    ^ true.
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
   955
1787
db6157670930 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1782
diff changeset
   956
    "Modified: / 13-09-2006 / 18:24:57 / cg"
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
   957
!
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
   958
1704
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
   959
checkForExistingModule:module directory:directory using:mgr allowCreate:allowCreate
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
   960
    |resources moduleNameBold directoryNameBold|
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
   961
1377
0fd99dd003f6 classResources now understood by all classes
Claus Gittinger <cg@exept.de>
parents: 1375
diff changeset
   962
    resources := self classResources.
1704
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
   963
    moduleNameBold := module allBold.
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
   964
    directoryNameBold := directory allBold.
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
   965
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
   966
    "/
1704
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
   967
    "/ check for the directory
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
   968
    "/
1840
c993a1c045cc obsolete method calls
Claus Gittinger <cg@exept.de>
parents: 1835
diff changeset
   969
    (mgr checkForExistingModule:module directory:directory) ifFalse:[
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
   970
        allowCreate ifFalse:[
1704
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
   971
            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
   972
                                   with:directoryNameBold with:moduleNameBold) withCRs.
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
   973
            ^ false
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
   974
        ].
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
   975
        (Dialog 
1704
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
   976
            confirm:(resources string:'''%1'' is a new directory in module ''%2''.\\create it ?' 
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
   977
                                 with:directoryNameBold with:moduleNameBold) withCRs
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
   978
            noLabel:'Cancel') 
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
   979
        ifFalse:[
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
   980
            ^ false.
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
   981
        ].
1840
c993a1c045cc obsolete method calls
Claus Gittinger <cg@exept.de>
parents: 1835
diff changeset
   982
        (mgr createModule:module directory:directory) ifFalse:[
1704
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
   983
            self warn:(resources string:'Cannot create new directory: ''%1'' in module ''%2''' 
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
   984
                                   with:directoryNameBold with:moduleNameBold) withCRs.
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
   985
            ^ false.
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
   986
        ]
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
   987
    ].
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
   988
    ^ true.
1840
c993a1c045cc obsolete method calls
Claus Gittinger <cg@exept.de>
parents: 1835
diff changeset
   989
c993a1c045cc obsolete method calls
Claus Gittinger <cg@exept.de>
parents: 1835
diff changeset
   990
    "Modified: / 06-10-2006 / 17:08:08 / cg"
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
   991
!
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
   992
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
   993
checkForExistingModule:module using:mgr allowCreate:allowCreate
1483
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
   994
    |resources moduleName answer|
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
   995
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
   996
    (mgr checkForExistingModule:module) ifFalse:[
1377
0fd99dd003f6 classResources now understood by all classes
Claus Gittinger <cg@exept.de>
parents: 1375
diff changeset
   997
        resources := self classResources.
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
   998
        moduleName := module allBold.
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
   999
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1000
        allowCreate ifFalse:[
1423
d15575ef3dba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1414
diff changeset
  1001
            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
  1002
                                  with:moduleName) .
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1003
            ^ false
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1004
        ].
2325
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  1005
        AbortAllOperationWantedQuery query ifTrue:[
1483
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  1006
            answer := Dialog 
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  1007
                confirmWithCancel:(resources stringWithCRs:'''%1'' is a new module.\\create it ?' with:moduleName)
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  1008
                labels:(resources array:#('Cancel All' 'Cancel' 'Yes' )).
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  1009
            answer isNil ifTrue:[ AbortAllOperationRequest raise ].
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  1010
        ] ifFalse:[
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  1011
            answer := Dialog 
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  1012
                confirm:(resources stringWithCRs:'''%1'' is a new module.\\create it ?' with:moduleName) 
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  1013
                noLabel:'Cancel'
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  1014
        ].
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  1015
        answer ifFalse:[ ^ false].
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1016
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1017
        (mgr createModule:module) ifFalse:[
1423
d15575ef3dba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1414
diff changeset
  1018
            self warn:(resources stringWithCRs:'Cannot create new module: ''%1''' with:moduleName) .
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1019
            ^ false.
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1020
        ]
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1021
    ].
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1022
    ^ true.
2325
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  1023
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  1024
    "Modified: / 09-02-2011 / 13:54:01 / cg"
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1025
!
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1026
2597
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1027
checkinBuildSupportFilesForPackage:packageID 
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1028
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1029
    |anyFailure module directory mgr defClass |
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1030
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1031
    mgr := self sourceCodeManagerFor: packageID. 
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1032
    defClass := ProjectDefinition definitionClassForPackage: packageID.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1033
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1034
    defClass validateDescription.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1035
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1036
    anyFailure := false.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1037
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1038
    module := packageID asPackageId module.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1039
    directory := packageID asPackageId directory.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1040
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1041
    self activityNotification:(resources string:'checking in build-support files...').
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1042
    (mgr checkForExistingModule:module directory:directory) ifFalse:[
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1043
        mgr createModule:module directory:directory
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1044
    ].
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1045
        defClass forEachFileNameAndGeneratedContentsDo:[:fileName :fileContents |
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1046
            |realFileName realDirectory|
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1047
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1048
            "/ care for subdirectories
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1049
            (fileName includes:$/) ifTrue:[
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1050
                realDirectory := (directory asFilename construct:(fileName asFilename directoryName)) name.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1051
                realFileName := fileName asFilename baseName.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1052
            ] ifFalse:[
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1053
                realDirectory := directory.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1054
                realFileName := fileName.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1055
            ].
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1056
            realDirectory := realDirectory replaceAll:$\ with:$/.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1057
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1058
            self activityNotification:(resources string:'checking in %1...' with:realFileName).
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1059
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1060
            UserInformation
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1061
                handle:[:ex | Transcript showCR:ex description ]
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1062
                do:[
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1063
                    (mgr
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1064
                        checkForExistingContainer:realFileName inModule:module directory:realDirectory)
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1065
                    ifFalse:[
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1066
                        realDirectory ~= directory ifTrue:[
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1067
                            (mgr checkForExistingModule:module directory:realDirectory) ifFalse:[
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1068
                                mgr createModule:module directory:realDirectory
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1069
                            ].
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1070
                        ].
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1071
                        (mgr
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1072
                            createContainerForText:fileContents
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1073
                            inModule:module
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1074
                            package:realDirectory
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1075
                            container:realFileName)
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1076
                                ifFalse:[
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1077
                                    Dialog warn:(resources
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1078
                                                stringWithCRs:'Cannot create new container: ''%3'' (in %1:%2)'
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1079
                                                with:module
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1080
                                                with:realDirectory
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1081
                                                with:realFileName)
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1082
                                ].
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1083
                    ] ifTrue:[
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1084
                        (mgr
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1085
                            checkin:realFileName
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1086
                            text:fileContents
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1087
                            directory:realDirectory
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1088
                            module:module
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1089
                            logMessage:'automatically generated by browser'
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1090
                            force:false)
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1091
                                ifFalse:[
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1092
                                    Transcript showCR:'checkin of ' , realFileName , ' failed'.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1093
                                    anyFailure := true.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1094
                                ].
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1095
                    ].
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1096
                ].
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1097
        ].
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1098
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1099
        defClass instAndClassMethodsDo:[:m | m package:defClass package].
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1100
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1101
        self
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1102
            checkinClasses:(Array with:defClass)
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1103
            withInfo:'automatic checkIn'
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1104
            withCheck:false.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1105
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1106
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1107
    self activityNotification:nil.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1108
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1109
    anyFailure ifTrue:[
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1110
        self warn:'Checkin failed - see Transcript.'.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1111
        self activityNotification:'Checkin of build-support files failed - see Transcript.'.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1112
    ] ifFalse:[
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1113
        self activityNotification:'Build-support files checked into the repository.'.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1114
    ].
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1115
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1116
    "Created: / 09-08-2006 / 18:59:42 / fm"
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1117
    "Modified: / 16-08-2006 / 18:38:49 / User"
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1118
    "Created: / 06-09-2011 / 08:00:57 / cg"
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1119
    "Modified: / 12-10-2011 / 11:36:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1120
    "Created: / 13-10-2011 / 11:15:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1121
!
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1122
886
401f915dd118 checkin from browser
ps
parents: 882
diff changeset
  1123
checkinClass:aClass
401f915dd118 checkin from browser
ps
parents: 882
diff changeset
  1124
    "check a class into the source repository.
1704
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  1125
     Asks interactively for a log-message."
882
8af38187135c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1126
1704
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  1127
    ^ self checkinClass:aClass withInfo:nil
882
8af38187135c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1128
!
8af38187135c checkin from browser
Claus Gittinger <cg@exept.de>
parents: 881
diff changeset
  1129
1704
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  1130
checkinClass:aClass withInfo:aLogInfoOrNil
886
401f915dd118 checkin from browser
ps
parents: 882
diff changeset
  1131
    "check a class into the source repository.
1704
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  1132
     If the argument, aLogInfoOrNil isNil, ask interactively for a log-message."
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  1133
1704
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  1134
    ^ self checkinClass:aClass withInfo:aLogInfoOrNil withCheck:true
977
ac63f52bccfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 976
diff changeset
  1135
!
ac63f52bccfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 976
diff changeset
  1136
2383
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  1137
checkinClass:aClass withInfo:aLogInfoOrNil withCheck:doCheckClass
977
ac63f52bccfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 976
diff changeset
  1138
    "check a class into the source repository.
2383
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  1139
     If the argument, aLogInfoOrNil isNil, ask interactively for log-message.
1460
2e1c304e5b52 Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents: 1456
diff changeset
  1140
     If doCheckClass is true, the class is checked for send of halts etc."
977
ac63f52bccfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 976
diff changeset
  1141
2383
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  1142
    |logMessage checkinInfo mgr pri resources|
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  1143
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  1144
    aClass isLoaded ifFalse:[
2360
3982314184bb changed: #checkinClass:withInfo:withCheck:
Claus Gittinger <cg@exept.de>
parents: 2343
diff changeset
  1145
        self information:(resources string:'Cannot checkin unloaded classes (%1)' with:aClass name).
881
f5872252e5f9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 876
diff changeset
  1146
        ^ false.
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  1147
    ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  1148
1189
fdc5e747c184 refactored check for a valid sourceCodeManager into one place
Claus Gittinger <cg@exept.de>
parents: 1185
diff changeset
  1149
    mgr := self sourceCodeManagerFor:aClass.
954
3446cc28ec1f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 952
diff changeset
  1150
    mgr isNil ifTrue:[
1189
fdc5e747c184 refactored check for a valid sourceCodeManager into one place
Claus Gittinger <cg@exept.de>
parents: 1185
diff changeset
  1151
        ^ false
954
3446cc28ec1f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 952
diff changeset
  1152
    ].
3446cc28ec1f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 952
diff changeset
  1153
2383
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  1154
    self ensureCorrectVersionMethodsInClass:aClass using:mgr.
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  1155
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  1156
    (self 
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  1157
        getLogMessageForClassCheckinTakingDefaultsFromPreviousLogInfo:aLogInfoOrNil 
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  1158
        forClass:aClass
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  1159
        valuesInto:[:logMessageRet :checkinInfoRet |
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  1160
            logMessage := logMessageRet.
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  1161
            checkinInfo := checkinInfoRet.
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  1162
        ]
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  1163
    ) ifFalse:[^ false].
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  1164
1377
0fd99dd003f6 classResources now understood by all classes
Claus Gittinger <cg@exept.de>
parents: 1375
diff changeset
  1165
    resources := self classResources.
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  1166
1882
8b3a4c2a2c2a when creating a new container, set the package of all methods.
Claus Gittinger <cg@exept.de>
parents: 1879
diff changeset
  1167
    (self classIsNotYetInRepository:aClass withManager:mgr) ifTrue:[
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  1168
        (self createSourceContainerForClass:aClass) ifFalse:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  1169
"/            self warn:'did not create a container for ''' , aClass name , ''''.
881
f5872252e5f9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 876
diff changeset
  1170
            ^ false
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  1171
        ].
881
f5872252e5f9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 876
diff changeset
  1172
        ^ true.
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  1173
    ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  1174
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  1175
    self activityNotification:(resources string:'checking in %1' with:aClass name).
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  1176
    pri := Processor activePriority.
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  1177
    Processor activeProcess withPriority:pri-1 to:pri
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  1178
    do:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  1179
        |revision aborted freshCreated|
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  1180
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  1181
        freshCreated := false.
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  1182
        revision := aClass revision.
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  1183
        revision isNil ifTrue:[ 
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  1184
            "/ mhmh - check if it has a container.
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  1185
            (mgr checkForExistingContainerForClass:aClass) ifFalse:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  1186
                (self createSourceContainerForClass:aClass) ifFalse:[
1030
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  1187
                    self warn:'Did not create/change repository container for ''' , aClass name allBold , ''''.
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  1188
                    ^ false.
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  1189
                ].
1503
87c2f93ff941 care for files in the Attic
Claus Gittinger <cg@exept.de>
parents: 1501
diff changeset
  1190
                freshCreated := true.
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  1191
            ]
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  1192
        ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  1193
1426
609f0db77471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1424
diff changeset
  1194
        doCheckClass value ifTrue:[
977
ac63f52bccfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 976
diff changeset
  1195
            "/ check if the class contains halts, error-sends etc.
1426
609f0db77471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1424
diff changeset
  1196
            (self checkAndWarnAboutBadMessagesInClass:aClass checkAgainHolder:doCheckClass) ifFalse:[
977
ac63f52bccfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 976
diff changeset
  1197
                ^ false
ac63f52bccfa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 976
diff changeset
  1198
            ].
973
b9004b37290a check for #halt and #error when checking in
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  1199
        ].
b9004b37290a check for #halt and #error when checking in
Claus Gittinger <cg@exept.de>
parents: 958
diff changeset
  1200
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  1201
        freshCreated ifFalse:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  1202
            aborted := false.
1113
30540d5fc3b7 class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents: 1095
diff changeset
  1203
            AbortOperationRequest handle:[:ex |
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  1204
                aborted := true.
881
f5872252e5f9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 876
diff changeset
  1205
                ex return.
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  1206
            ] do:[
1828
e2eafc59fa91 handle checkin errors
Stefan Vogel <sv@exept.de>
parents: 1811
diff changeset
  1207
                |checkinState cause|
e2eafc59fa91 handle checkin errors
Stefan Vogel <sv@exept.de>
parents: 1811
diff changeset
  1208
                checkinState := false.
e2eafc59fa91 handle checkin errors
Stefan Vogel <sv@exept.de>
parents: 1811
diff changeset
  1209
                cause := ''.
e2eafc59fa91 handle checkin errors
Stefan Vogel <sv@exept.de>
parents: 1811
diff changeset
  1210
                [
e2eafc59fa91 handle checkin errors
Stefan Vogel <sv@exept.de>
parents: 1811
diff changeset
  1211
                    checkinState := mgr checkinClass:aClass logMessage:logMessage
2362
9c4eba6eac26 changed: #checkinClass:withInfo:withCheck:
Claus Gittinger <cg@exept.de>
parents: 2360
diff changeset
  1212
                ] on:SourceCodeManagerError do:[:ex| 
9c4eba6eac26 changed: #checkinClass:withInfo:withCheck:
Claus Gittinger <cg@exept.de>
parents: 2360
diff changeset
  1213
                    cause := ex description.
9c4eba6eac26 changed: #checkinClass:withInfo:withCheck:
Claus Gittinger <cg@exept.de>
parents: 2360
diff changeset
  1214
                    ex proceed.
9c4eba6eac26 changed: #checkinClass:withInfo:withCheck:
Claus Gittinger <cg@exept.de>
parents: 2360
diff changeset
  1215
                ].
1828
e2eafc59fa91 handle checkin errors
Stefan Vogel <sv@exept.de>
parents: 1811
diff changeset
  1216
e2eafc59fa91 handle checkin errors
Stefan Vogel <sv@exept.de>
parents: 1811
diff changeset
  1217
                checkinState ifFalse:[
e2eafc59fa91 handle checkin errors
Stefan Vogel <sv@exept.de>
parents: 1811
diff changeset
  1218
                    Transcript showCR:'checkin of ''' , aClass name , ''' failed - ', cause.
2360
3982314184bb changed: #checkinClass:withInfo:withCheck:
Claus Gittinger <cg@exept.de>
parents: 2343
diff changeset
  1219
                    self warn:(resources stringWithCRs:'Checkin of "%1" failed\\' with:aClass name allBold),cause.
881
f5872252e5f9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 876
diff changeset
  1220
                    ^ false.
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  1221
                ].
1725
b54eeae38942 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1711
diff changeset
  1222
                checkinInfo notNil ifTrue:[
b54eeae38942 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1711
diff changeset
  1223
                    checkinInfo isStable ifTrue:[
b54eeae38942 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1711
diff changeset
  1224
                        "set stable tag for class that has been checked in"
1726
e9fba6b66dd6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
  1225
                        self tagClass:aClass as:#stable.
1725
b54eeae38942 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1711
diff changeset
  1226
                    ].
b54eeae38942 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1711
diff changeset
  1227
                    checkinInfo tagIt ifTrue:[
b54eeae38942 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1711
diff changeset
  1228
                        "set an additional tag for class that has been checked in"
1728
495b738df5fa *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1727
diff changeset
  1229
                        self tagClass:aClass as:(checkinInfo tag).
1725
b54eeae38942 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1711
diff changeset
  1230
                    ].
1460
2e1c304e5b52 Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents: 1456
diff changeset
  1231
                ].
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  1232
            ].
1519
c0e28a7d3c73 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1514
diff changeset
  1233
            aborted ifTrue:[  |con|
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1234
                Transcript showCR:'Checkin of ''' , aClass name , ''' aborted'.
1519
c0e28a7d3c73 no longer move other extensions into my project when
Claus Gittinger <cg@exept.de>
parents: 1514
diff changeset
  1235
2325
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  1236
                AbortAllOperationWantedQuery query ifTrue:[
1032
24faa0f05f25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
  1237
                    (Dialog 
2360
3982314184bb changed: #checkinClass:withInfo:withCheck:
Claus Gittinger <cg@exept.de>
parents: 2343
diff changeset
  1238
                        confirm:(resources stringWithCRs:'Checkin of "%1" aborted.\\Cancel all ?' with:aClass name)
1032
24faa0f05f25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
  1239
                        default:false)
24faa0f05f25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
  1240
                    ifTrue:[
1460
2e1c304e5b52 Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents: 1456
diff changeset
  1241
                        AbortAllOperationRequest raise.
1032
24faa0f05f25 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1030
diff changeset
  1242
                    ]
1016
ab35c6af1614 yes-to-all option
Claus Gittinger <cg@exept.de>
parents: 1015
diff changeset
  1243
                ].
881
f5872252e5f9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 876
diff changeset
  1244
                ^ false.
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  1245
            ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  1246
        ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  1247
    ].
881
f5872252e5f9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 876
diff changeset
  1248
    ^ true
1113
30540d5fc3b7 class based exceptions - abortSignal;
Claus Gittinger <cg@exept.de>
parents: 1095
diff changeset
  1249
2362
9c4eba6eac26 changed: #checkinClass:withInfo:withCheck:
Claus Gittinger <cg@exept.de>
parents: 2360
diff changeset
  1250
    "Modified: / 06-05-2011 / 10:32:55 / cg"
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  1251
!
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  1252
920
ab68cf4c6ee6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 906
diff changeset
  1253
checkinClasses:aCollectionOfClass
886
401f915dd118 checkin from browser
ps
parents: 882
diff changeset
  1254
    "check a collection of classes into the source repository.
401f915dd118 checkin from browser
ps
parents: 882
diff changeset
  1255
     Asks interactively for log-message."
401f915dd118 checkin from browser
ps
parents: 882
diff changeset
  1256
1704
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  1257
    ^ self checkinClasses:aCollectionOfClass withInfo:nil
886
401f915dd118 checkin from browser
ps
parents: 882
diff changeset
  1258
!
401f915dd118 checkin from browser
ps
parents: 882
diff changeset
  1259
1704
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  1260
checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrNil
886
401f915dd118 checkin from browser
ps
parents: 882
diff changeset
  1261
    "check a bunch of classes into the source repository.
1704
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  1262
     If the argument, aLogInfoOrNil isNil, ask interactively for log-message."
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  1263
992
83f257a4fa0c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
  1264
    ^ self
1142
cba1ede48a4a allow check for halt/error to be turned off via userPrefs
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  1265
        checkinClasses:aCollectionOfClasses 
1704
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  1266
        withInfo:aLogInfoOrNil 
1142
cba1ede48a4a allow check for halt/error to be turned off via userPrefs
Claus Gittinger <cg@exept.de>
parents: 1137
diff changeset
  1267
        withCheck:(UserPreferences current at:#checkClassesWhenCheckingIn ifAbsent:true)
992
83f257a4fa0c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
  1268
!
83f257a4fa0c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 990
diff changeset
  1269
2569
vrany
parents: 2556
diff changeset
  1270
checkinClasses:aCollectionOfClasses withInfo:aLogInfoOrStringNil withCheck:doCheckClasses
vrany
parents: 2556
diff changeset
  1271
    "check a bunch of classes into the source repository.
vrany
parents: 2556
diff changeset
  1272
     If the argument, aLogInfoOrStringNil isNil, ask interactively for log-message."
vrany
parents: 2556
diff changeset
  1273
vrany
parents: 2556
diff changeset
  1274
    |classes allClasses checkinInfoOrString resources yesOrNoToAll unchangedClasses|
vrany
parents: 2556
diff changeset
  1275
vrany
parents: 2556
diff changeset
  1276
    "/ ignore private classes
vrany
parents: 2556
diff changeset
  1277
    classes := aCollectionOfClasses select:[:aClass | aClass owningClass isNil].
vrany
parents: 2556
diff changeset
  1278
    classes isEmpty ifTrue:[
vrany
parents: 2556
diff changeset
  1279
        self information:'Only private classes given - nothing checked in.'.
vrany
parents: 2556
diff changeset
  1280
        ^ self
vrany
parents: 2556
diff changeset
  1281
    ].
vrany
parents: 2556
diff changeset
  1282
    classes := classes select:[:aClass | aClass isLoaded].
vrany
parents: 2556
diff changeset
  1283
    classes isEmpty ifTrue:[
vrany
parents: 2556
diff changeset
  1284
        self information:'Only unloaded classes given - nothing checked in.'.
vrany
parents: 2556
diff changeset
  1285
        ^ self
vrany
parents: 2556
diff changeset
  1286
    ].
vrany
parents: 2556
diff changeset
  1287
vrany
parents: 2556
diff changeset
  1288
    classes size == 1 ifTrue:[
vrany
parents: 2556
diff changeset
  1289
        ^ self checkinClass:classes first withInfo:aLogInfoOrStringNil withCheck:doCheckClasses.
vrany
parents: 2556
diff changeset
  1290
    ].
vrany
parents: 2556
diff changeset
  1291
vrany
parents: 2556
diff changeset
  1292
    resources := self classResources.
vrany
parents: 2556
diff changeset
  1293
vrany
parents: 2556
diff changeset
  1294
    "ask once, for all classes"
vrany
parents: 2556
diff changeset
  1295
    aLogInfoOrStringNil isNil ifTrue:[
vrany
parents: 2556
diff changeset
  1296
        checkinInfoOrString := self 
vrany
parents: 2556
diff changeset
  1297
                        getCheckinInfoFor:(resources string:'%1 classes to checkin' with:aCollectionOfClasses size)
vrany
parents: 2556
diff changeset
  1298
                        initialAnswer:nil
vrany
parents: 2556
diff changeset
  1299
                        withQuickOption:true.
vrany
parents: 2556
diff changeset
  1300
        checkinInfoOrString isNil ifTrue:[^ self].
vrany
parents: 2556
diff changeset
  1301
    ] ifFalse:[
vrany
parents: 2556
diff changeset
  1302
        checkinInfoOrString := aLogInfoOrStringNil.
vrany
parents: 2556
diff changeset
  1303
    ].
vrany
parents: 2556
diff changeset
  1304
vrany
parents: 2556
diff changeset
  1305
    allClasses := classes.    
vrany
parents: 2556
diff changeset
  1306
    checkinInfoOrString quickCheckIn ifTrue:[
vrany
parents: 2556
diff changeset
  1307
        classes := classes select:[:aClass | aClass hasUnsavedChanges].
vrany
parents: 2556
diff changeset
  1308
        classes isEmpty ifTrue:[ Dialog information:'no changes to checkin (quickCheckIn)' ]
vrany
parents: 2556
diff changeset
  1309
    ].
vrany
parents: 2556
diff changeset
  1310
vrany
parents: 2556
diff changeset
  1311
    "abortAll is handled, and also asked for here!!"
vrany
parents: 2556
diff changeset
  1312
    AbortAllOperationRequest handleAndAnswerQueryIn:[
vrany
parents: 2556
diff changeset
  1313
        classes notEmpty ifTrue:[
vrany
parents: 2556
diff changeset
  1314
            self yesToAllNotification handle:[:ex |
vrany
parents: 2556
diff changeset
  1315
                yesOrNoToAll := ex parameter.
vrany
parents: 2556
diff changeset
  1316
                ex proceed
vrany
parents: 2556
diff changeset
  1317
            ] do:[
vrany
parents: 2556
diff changeset
  1318
                self yesToAllQuery handle:[:ex |
vrany
parents: 2556
diff changeset
  1319
                    ex proceedWith:yesOrNoToAll
vrany
parents: 2556
diff changeset
  1320
                ] do:[
vrany
parents: 2556
diff changeset
  1321
                    classes do:[:aClass |
vrany
parents: 2556
diff changeset
  1322
                        self activityNotification:(resources string:'checking in %1' with:aClass name).
vrany
parents: 2556
diff changeset
  1323
                        "/ ca does not want boxes to pop up all over ...
vrany
parents: 2556
diff changeset
  1324
                        UserInformation handle:[:ex |
vrany
parents: 2556
diff changeset
  1325
                            Transcript showCR:ex description.
vrany
parents: 2556
diff changeset
  1326
                            ex proceed.
vrany
parents: 2556
diff changeset
  1327
                        ] do:[
vrany
parents: 2556
diff changeset
  1328
                            AbortOperationRequest catch:[
vrany
parents: 2556
diff changeset
  1329
                                self 
vrany
parents: 2556
diff changeset
  1330
                                    checkinClass:aClass 
vrany
parents: 2556
diff changeset
  1331
                                    withInfo:checkinInfoOrString 
vrany
parents: 2556
diff changeset
  1332
                                    withCheck:doCheckClasses
vrany
parents: 2556
diff changeset
  1333
                            ]
vrany
parents: 2556
diff changeset
  1334
                        ].
vrany
parents: 2556
diff changeset
  1335
                    ].
vrany
parents: 2556
diff changeset
  1336
                ]
vrany
parents: 2556
diff changeset
  1337
            ].
vrany
parents: 2556
diff changeset
  1338
        ].
vrany
parents: 2556
diff changeset
  1339
vrany
parents: 2556
diff changeset
  1340
        (checkinInfoOrString isStable or:[checkinInfoOrString tagIt])
vrany
parents: 2556
diff changeset
  1341
        ifTrue:[
vrany
parents: 2556
diff changeset
  1342
            "/mhmh - but tag should be set on all (even unchanged ones)
vrany
parents: 2556
diff changeset
  1343
            "/ the other onces have already been tagged
vrany
parents: 2556
diff changeset
  1344
            unchangedClasses := allClasses select:[:eachClass | (classes includes:eachClass) not].
vrany
parents: 2556
diff changeset
  1345
vrany
parents: 2556
diff changeset
  1346
            "mhmh - could still have to tag them"
vrany
parents: 2556
diff changeset
  1347
            checkinInfoOrString isStable ifTrue:[
vrany
parents: 2556
diff changeset
  1348
                unchangedClasses do:[:eachClass |
vrany
parents: 2556
diff changeset
  1349
                    self tagClass:eachClass as:#stable.
vrany
parents: 2556
diff changeset
  1350
                ].
vrany
parents: 2556
diff changeset
  1351
            ].
vrany
parents: 2556
diff changeset
  1352
            checkinInfoOrString tagIt ifTrue:[
vrany
parents: 2556
diff changeset
  1353
                unchangedClasses do:[:eachClass |
vrany
parents: 2556
diff changeset
  1354
                    self tagClass:eachClass as:(checkinInfoOrString tag).
vrany
parents: 2556
diff changeset
  1355
                ].
vrany
parents: 2556
diff changeset
  1356
            ].
vrany
parents: 2556
diff changeset
  1357
        ].
vrany
parents: 2556
diff changeset
  1358
    ].
vrany
parents: 2556
diff changeset
  1359
vrany
parents: 2556
diff changeset
  1360
    "Modified: / 20-08-2011 / 14:00:13 / cg"
vrany
parents: 2556
diff changeset
  1361
!
vrany
parents: 2556
diff changeset
  1362
1704
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  1363
checkinExtensionMethods:aCollectionOfMethods forPackage:aPackageID withInfo:aLogInfoOrStringOrNil
922
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1364
    "checkin a projects extensions into the source repository.
1704
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  1365
     If the argument, aLogInfoOrStringOrNil isNil, ask interactively for log-message."
922
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1366
1704
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  1367
    |logMessage checkinInfo mgr pri resources module directory containerFileName s 
2233
59fc21dd040d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2209
diff changeset
  1368
     methodSource methodsSortedByName defClass|
922
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1369
1377
0fd99dd003f6 classResources now understood by all classes
Claus Gittinger <cg@exept.de>
parents: 1375
diff changeset
  1370
    resources := self classResources.
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  1371
2242
8ea64354212d added: #changeSetForExtensionMethodsForPackage:revision:orAskForRevision:using:
Claus Gittinger <cg@exept.de>
parents: 2237
diff changeset
  1372
    "/ the following is wrong - must ask the projectDefinition !!
2288
9abbb9ec4439 changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2286
diff changeset
  1373
    aPackageID asPackageId projectDefinitionClass notNil ifTrue:[
9abbb9ec4439 changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2286
diff changeset
  1374
        mgr := self sourceCodeManagerFor:aPackageID asPackageId projectDefinitionClass.
9abbb9ec4439 changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2286
diff changeset
  1375
    ] ifFalse:[
9abbb9ec4439 changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2286
diff changeset
  1376
        mgr := self sourceCodeManagerFor:aCollectionOfMethods first mclass.
9abbb9ec4439 changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2286
diff changeset
  1377
    ].
2200
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1378
    mgr isNil ifTrue:[ ^ false ].
1522
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  1379
1704
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  1380
    module := aPackageID asPackageId module.
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  1381
    directory := aPackageID asPackageId directory.
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  1382
    containerFileName := self nameOfExtensionsContainer.
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  1383
1704
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  1384
    aLogInfoOrStringOrNil isNil ifTrue:[
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  1385
        checkinInfo := self getCheckinInfoFor:containerFileName allBold initialAnswer:nil.
1460
2e1c304e5b52 Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents: 1456
diff changeset
  1386
        checkinInfo isNil ifTrue:[^ false].
2e1c304e5b52 Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents: 1456
diff changeset
  1387
        logMessage := checkinInfo logMessage.
922
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1388
    ] ifFalse:[
1704
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  1389
        aLogInfoOrStringOrNil isString ifTrue:[
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  1390
            logMessage := aLogInfoOrStringOrNil
1460
2e1c304e5b52 Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents: 1456
diff changeset
  1391
        ] ifFalse:[
1704
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  1392
            checkinInfo := aLogInfoOrStringOrNil.
1460
2e1c304e5b52 Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents: 1456
diff changeset
  1393
            logMessage := checkinInfo logMessage.
2e1c304e5b52 Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents: 1456
diff changeset
  1394
        ].
922
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1395
    ].
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1396
2200
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1397
    (mgr checkForExistingContainer:containerFileName inModule:module directory:directory) ifFalse:[
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1398
        (self checkForExistingModule:module using:mgr allowCreate:true) ifFalse:[^ false].
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1399
        LastModule := module.
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1400
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1401
        (self checkForExistingModule:module directory:directory using:mgr allowCreate:true) ifFalse:[^ false].
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1402
        LastPackage := directory.
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1403
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1404
        (self checkForExistingModule:module directory:directory container:containerFileName using:mgr allowCreate:true) ifFalse:[^ false].
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1405
    ].
922
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1406
1120
f039453a5562 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1113
diff changeset
  1407
    self activityNotification:(resources string:'Checking in %1' with:containerFileName).
922
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1408
    pri := Processor activePriority.
2200
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1409
    Processor activeProcess 
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1410
        withPriority:pri-1 to:pri
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1411
        do:[
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1412
            s := '' writeStream.
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1413
            
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1414
            s nextPutAll:'"{ Package: '''.
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1415
            s nextPutAll:aPackageID asString.
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1416
            s nextPutAll:''' }"'; nextPutChunkSeparator; cr; cr.
922
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1417
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1418
"/        s nextPutAll:(Smalltalk timeStamp).
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1419
"/        s nextPutChunkSeparator. 
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1420
"/        s cr; cr.
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1421
2200
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1422
            "/ sort them by name (to avoid conflict due to CVS merge)
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1423
            methodsSortedByName := aCollectionOfMethods asOrderedCollection.
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1424
            methodsSortedByName sort:[:a :b |
1015
89f96d45303e extension checkIn
Claus Gittinger <cg@exept.de>
parents: 1012
diff changeset
  1425
                                        |clsA clsB|
89f96d45303e extension checkIn
Claus Gittinger <cg@exept.de>
parents: 1012
diff changeset
  1426
89f96d45303e extension checkIn
Claus Gittinger <cg@exept.de>
parents: 1012
diff changeset
  1427
                                        clsA := a mclass name.
89f96d45303e extension checkIn
Claus Gittinger <cg@exept.de>
parents: 1012
diff changeset
  1428
                                        clsB := b mclass name.
89f96d45303e extension checkIn
Claus Gittinger <cg@exept.de>
parents: 1012
diff changeset
  1429
                                        clsA < clsB ifTrue:[
89f96d45303e extension checkIn
Claus Gittinger <cg@exept.de>
parents: 1012
diff changeset
  1430
                                            true
89f96d45303e extension checkIn
Claus Gittinger <cg@exept.de>
parents: 1012
diff changeset
  1431
                                        ] ifFalse:[
89f96d45303e extension checkIn
Claus Gittinger <cg@exept.de>
parents: 1012
diff changeset
  1432
                                            clsA > clsB ifTrue:[
89f96d45303e extension checkIn
Claus Gittinger <cg@exept.de>
parents: 1012
diff changeset
  1433
                                                false
89f96d45303e extension checkIn
Claus Gittinger <cg@exept.de>
parents: 1012
diff changeset
  1434
                                            ] ifFalse:[
89f96d45303e extension checkIn
Claus Gittinger <cg@exept.de>
parents: 1012
diff changeset
  1435
                                                a selector < b selector
89f96d45303e extension checkIn
Claus Gittinger <cg@exept.de>
parents: 1012
diff changeset
  1436
                                            ]
89f96d45303e extension checkIn
Claus Gittinger <cg@exept.de>
parents: 1012
diff changeset
  1437
                                        ]
2200
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1438
                                      ].
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1439
            methodsSortedByName do:[:aMethod |
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1440
                aMethod mclass fileOutMethod:aMethod on:s.
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1441
                s cr.
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1442
            ].
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1443
2233
59fc21dd040d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2209
diff changeset
  1444
            defClass := ProjectDefinition definitionClassForPackage:aPackageID.
59fc21dd040d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2209
diff changeset
  1445
            defClass notNil ifTrue:[
59fc21dd040d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2209
diff changeset
  1446
                "/ make sure, an extensionVersion_XXX method is included...
59fc21dd040d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2209
diff changeset
  1447
                "/ (notice: no need to support a secondary backward compatible non-manager related version method here)
59fc21dd040d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2209
diff changeset
  1448
                (methodsSortedByName contains:[:aMethod | aMethod selector == mgr nameOfVersionMethodForExtensions]) ifFalse:[
59fc21dd040d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2209
diff changeset
  1449
                    s nextPutLine:('!!%1 class methodsFor:''documentation''!!' bindWith:defClass name).
59fc21dd040d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2209
diff changeset
  1450
                    s cr.
59fc21dd040d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2209
diff changeset
  1451
                    s nextChunkPut:
59fc21dd040d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2209
diff changeset
  1452
                        (mgr versionMethodTemplateForSmalltalkFor:(mgr nameOfVersionMethodForExtensions)).
59fc21dd040d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2209
diff changeset
  1453
                    s space; nextPutChunkSeparator.
59fc21dd040d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2209
diff changeset
  1454
                ].
2200
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1455
            ].
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1456
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1457
            methodSource := s contents.
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1458
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1459
            UserInformation handle:[:ex |
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1460
                Transcript showCR:ex description.
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1461
                ex proceed.
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1462
            ] do:[
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1463
                Transcript showCR:('checking in ',containerFileName,' ...').
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1464
                (mgr 
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1465
                    checkin:containerFileName
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1466
                    text:methodSource
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1467
                    directory:directory 
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1468
                    module:module
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1469
                    logMessage:logMessage
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1470
                    force:false) 
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1471
                ifFalse:[
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1472
                    Transcript showCR:'Checkin of ''' , containerFileName , ''' failed'.
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1473
                    self warn:'Checkin of ''' , containerFileName allBold , ''' failed'.
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1474
                    ^ false.
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1475
                ].
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1476
                checkinInfo notNil ifTrue:[
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1477
                    |path|
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1478
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1479
                    path := (module, '/', directory, '/', containerFileName).
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1480
                    checkinInfo isStable ifTrue:[
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1481
                        "set stable tag for class that has been checked in"
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1482
                        self tagPath:path as:#stable using:mgr.    
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1483
                    ].
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1484
                    checkinInfo tagIt ifTrue:[
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1485
                        "set an additional tag for class that has been checked in"
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1486
                        self tagPath:path as:(checkinInfo tag) using:mgr.    
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1487
                    ].
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1488
                ].
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1489
                mgr postCheckInExtensionsForPackage:aPackageID    
b9e1551c5a0d changed: #checkinExtensionMethods:forPackage:withInfo:
Claus Gittinger <cg@exept.de>
parents: 2194
diff changeset
  1490
            ].
922
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1491
        ].
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1492
    ^ true
1090
8608e5b91fa7 condense changeSet after checking in an extensions container
Claus Gittinger <cg@exept.de>
parents: 1084
diff changeset
  1493
1782
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  1494
    "Modified: / 12-09-2006 / 14:14:49 / cg"
922
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1495
!
24cfcd3043a2 file based operations added (to check in extensions etc.)
Claus Gittinger <cg@exept.de>
parents: 920
diff changeset
  1496
2597
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1497
checkinPackage:packageToCheckIn classes:doClasses extensions:doExtensions buildSupport:doBuild askForMethodsInOtherPackages:askForMethodsInOtherPackages
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1498
    |mgr classes classesToCheckIn methodsToCheckIn
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1499
     methodsInOtherPackages looseMethods otherPackages
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1500
     msg classesInChangeSet checkinInfo originalCheckinInfo classesToTag|
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1501
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1502
    mgr := self sourceCodeManagerFor: packageToCheckIn.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1503
    classes := Smalltalk allClasses.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1504
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1505
    classesToCheckIn := IdentitySet new.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1506
    methodsToCheckIn := IdentitySet new.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1507
    methodsInOtherPackages := IdentitySet new.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1508
    looseMethods := IdentitySet new.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1509
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1510
    "/ classes ...
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1511
    classes do:[:aClass | |owner classPackage|
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1512
        (owner := aClass owningClass) notNil ifTrue:[
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1513
            classPackage := aClass topOwningClass package
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1514
        ] ifFalse:[
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1515
            classPackage := aClass package
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1516
        ].
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1517
        (classPackage = packageToCheckIn) ifTrue:[
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1518
            classesToCheckIn add:aClass.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1519
        ].
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1520
    ].
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1521
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1522
    "/ cg: O(n^2) algorithm
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1523
    "/  classesInChangeSet := classesToCheckIn select:[:cls | cls hasUnsavedChanges].
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1524
    "/ replaced by: O(n) algorithm
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1525
    classesInChangeSet := ChangeSet current selectForWhichIncludesChangeForClassOrMetaclassOrPrivateClassFrom:classesToCheckIn. 
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1526
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1527
    "/ individual methods ...
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1528
    classes do:[:aClass |
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1529
        aClass isMeta ifFalse:[
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1530
            "/ ... whose class is not in the chechIn-set
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1531
            (classesToCheckIn includes:aClass) ifFalse:[
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1532
                aClass instAndClassSelectorsAndMethodsDo:[:sel :mthd |
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1533
                    "/ methods in this project ...
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1534
                    (mthd package = packageToCheckIn) ifTrue:[
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1535
                        methodsToCheckIn add:mthd
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1536
                    ]
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1537
                ]
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1538
            ].
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1539
        ].
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1540
    ].
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1541
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1542
    doExtensions ifTrue:[
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1543
        methodsToCheckIn notEmpty ifTrue:[
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1544
            doClasses ifTrue:[
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1545
                msg := '%1 classes (%4 changed) '.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1546
            ] ifFalse:[
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1547
                msg := ''.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1548
            ].
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1549
            doExtensions ifTrue:[
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1550
                doClasses ifTrue:[
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1551
                    msg := msg , 'and '.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1552
                ].
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1553
                msg := msg , '%2 extensions '.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1554
            ].
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1555
            msg := msg , 'of project "%3"'.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1556
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1557
            checkinInfo := self
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1558
                        getCheckinInfoFor:(msg
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1559
                                                    bindWith:classesToCheckIn size
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1560
                                                    with:methodsToCheckIn size
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1561
                                                    with:packageToCheckIn allBold
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1562
                                                    with:classesInChangeSet size)
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1563
                        initialAnswer:nil
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1564
                        withQuickOption:(classesToCheckIn size > 0).
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1565
            checkinInfo isNil ifTrue:[
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1566
                ^ self.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1567
            ].
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1568
            (self
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1569
                checkinExtensionMethods:methodsToCheckIn
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1570
                forPackage:packageToCheckIn
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1571
                withInfo:checkinInfo)
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1572
            ifFalse:[
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1573
                Dialog warn:(resources string:'Could not check in extensions for project %1' with:packageToCheckIn).
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1574
                ^ self.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1575
            ]
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1576
        ] ifFalse:[
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1577
            "/ there may have been extension-methods previously - if so, remove them
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1578
            (mgr
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1579
                checkForExistingContainer:'extensions.st' inPackage:packageToCheckIn)
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1580
            ifTrue:[
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1581
"/ self halt.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1582
                (self
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1583
                    checkinExtensionMethods:#()
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1584
                    forPackage:packageToCheckIn
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1585
                    withInfo:'No extensions any more')
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1586
                ifFalse:[
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1587
                    Dialog warn:(resources string:'Could not check in extensions for project %1' with:packageToCheckIn).
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1588
                    ^ self.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1589
                ]
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1590
            ]
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1591
        ].
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1592
    ].
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1593
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1594
    checkinInfo isNil ifTrue:[
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1595
        checkinInfo := self
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1596
                    getCheckinInfoFor:('%1 classes (%4 changed) and %2 extensions for project "%3"'
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1597
                                                        bindWith:classesToCheckIn size
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1598
                                                        with:methodsToCheckIn size
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1599
                                                        with:packageToCheckIn allBold
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1600
                                                        with:classesInChangeSet size)
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1601
                    initialAnswer:nil
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1602
                    withQuickOption:(classesToCheckIn size > 0).
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1603
        checkinInfo isNil ifTrue:[
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1604
            ^ self.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1605
        ].
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1606
    ].
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1607
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1608
    checkinInfo quickCheckIn ifTrue:[
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1609
        (checkinInfo isStable or:[checkinInfo tagIt]) ifTrue:[
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1610
            classesToTag := classesToCheckIn.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1611
            originalCheckinInfo := checkinInfo.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1612
            checkinInfo := checkinInfo copy.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1613
            checkinInfo isStable:false.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1614
            checkinInfo tag:nil.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1615
        ].
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1616
        classesToCheckIn := classesInChangeSet.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1617
    ].
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1618
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1619
    "/ check if any of the classes contains methods for other packages ...
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1620
    classesToCheckIn do:[:eachClass |
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1621
        eachClass instAndClassMethodsDo:[:eachMethod |
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1622
            |mPgk|
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1623
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1624
            mPgk := eachMethod package.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1625
            (mPgk = packageToCheckIn) ifFalse:[
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1626
                mPgk == PackageId noProjectID ifTrue:[
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1627
                    looseMethods add:eachMethod
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1628
                ] ifFalse:[
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1629
                    methodsInOtherPackages add:eachMethod
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1630
                ]
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1631
            ]
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1632
        ].
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1633
    ].
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1634
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1635
    askForMethodsInOtherPackages ifTrue:[
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1636
        methodsInOtherPackages notEmpty ifTrue:[
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1637
            otherPackages := Set new.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1638
            methodsInOtherPackages do:[:eachMethod | otherPackages add:eachMethod package].
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1639
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1640
            methodsInOtherPackages size == 1 ifTrue:[
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1641
                msg := 'The ''%4'' method in ''%5'' is contained in the ''%2'' package.'.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1642
                msg := msg , '\\This method will remain in its package.'.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1643
            ] ifFalse:[
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1644
                otherPackages size == 1 ifTrue:[
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1645
                    msg := 'The %1 methods from the %2 package will remain in its package.'
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1646
                ] ifFalse:[
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1647
                    msg := 'The %1 methods from %3 other packages will remain in their packages.'
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1648
                ].
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1649
                msg := msg , '\\Hint: if these are meant to belong to this package,'.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1650
                msg := msg , '\move them first, then repeat the checkin operation.'.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1651
            ].
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1652
            msg := msg withCRs.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1653
            msg := msg bindWith:methodsInOtherPackages size
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1654
                           with:otherPackages first allBold
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1655
                           with:otherPackages size
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1656
                           with:methodsInOtherPackages first selector allBold
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1657
                           with:methodsInOtherPackages first mclass name allBold.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1658
            (Dialog confirm:msg noLabel:(resources string:'Cancel')) ifFalse:[^ self].
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1659
        ].
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1660
    ].
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1661
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1662
    doClasses ifTrue:[
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1663
        classesToCheckIn notEmpty ifTrue:[
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1664
            looseMethods notEmpty ifTrue:[
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1665
                looseMethods size == 1 ifTrue:[
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1666
                    msg := 'The ''%2'' method in ''%3'' is unassigned (loose).'.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1667
                    msg := msg , '\\If you proceed, this method will be moved to the ''%4'' package'.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1668
                    msg := msg , '\\Hint: if this is meant to be an extension of another package,'.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1669
                    msg := msg , '\cancel and move it to the appropriate package first.'.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1670
                ] ifFalse:[
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1671
                    msg := 'There are %1 unassigned (loose) methods in classes from this project.'.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1672
                    msg := msg , '\\If you proceed, those will be moved to the ''%4'' package ?'.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1673
                    msg := msg , '\\Hint: if these are meant to be extensions of another package,'.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1674
                    msg := msg , '\cancel and move them to the appropriate package first.'.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1675
                ].
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1676
                doClasses ifTrue:[
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1677
                    msg := msg , '\\If you answer with "No" here, you will be asked for each class individually.'.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1678
                ].
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1679
                msg := msg withCRs.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1680
                msg := msg bindWith:looseMethods size
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1681
                               with:(looseMethods isEmpty ifTrue:[''] ifFalse:[looseMethods first selector allBold])
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1682
                               with:(looseMethods isEmpty ifTrue:[''] ifFalse:[looseMethods first mclass name allBold])
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1683
                               with:packageToCheckIn allBold.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1684
                (Dialog confirm:msg noLabel:(resources string:'Cancel')) ifFalse:[^ self].
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1685
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1686
                looseMethods do:[:mthd |
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1687
                    mthd package:packageToCheckIn
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1688
                ].
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1689
            ].
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1690
            self checkinClasses:classesToCheckIn withInfo:checkinInfo.
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1691
        ].
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1692
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1693
        originalCheckinInfo notNil ifTrue:[
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1694
            originalCheckinInfo isStable ifTrue:[
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1695
                classesToTag do:[:eachClass |
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1696
                    self tagClass:eachClass as:#stable
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1697
                ].
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1698
            ].
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1699
            originalCheckinInfo tagIt ifTrue:[
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1700
                classesToTag do:[:eachClass |
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1701
                    self tagClass:eachClass as:(originalCheckinInfo tag)
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1702
                ].
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1703
            ].
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1704
        ].
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1705
    ].
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1706
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1707
    doBuild ifTrue:[
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1708
        self checkinBuildSupportFilesForPackage:packageToCheckIn
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1709
    ].
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1710
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1711
    "Modified: / 08-09-2011 / 04:42:38 / cg"
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1712
    "Created: / 13-10-2011 / 11:15:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1713
!
fcb5d74b32d2 More code moved from Tools::NewSystemBrowser to SourceCodeManagerUtilities
vrany
parents: 2596
diff changeset
  1714
986
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  1715
checkoutClass:aClass askForMerge:askForMerge
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  1716
    "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
  1717
1006
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1718
    self
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1719
        checkoutClass:aClass 
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1720
        askForRevision:true
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1721
        askForMerge:askForMerge
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1722
!
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1723
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1724
checkoutClass:aClass askForRevision:askForRevision askForMerge:askForMerge
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1725
    "check-out a class from the source repository.
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1726
     If askForRevision is false, check-out the newest version."
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1727
2013
0457926edfdb allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents: 2009
diff changeset
  1728
    self
0457926edfdb allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents: 2009
diff changeset
  1729
        checkoutClass:aClass askForRevision:askForRevision askForMerge:askForMerge 
0457926edfdb allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents: 2009
diff changeset
  1730
        askForConfirmation:true
0457926edfdb allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents: 2009
diff changeset
  1731
!
0457926edfdb allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents: 2009
diff changeset
  1732
0457926edfdb allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents: 2009
diff changeset
  1733
checkoutClass:aClass askForRevision:askForRevision askForMerge:askForMerge askForConfirmation:askForConfirmation
0457926edfdb allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents: 2009
diff changeset
  1734
    "check-out a class from the source repository.
0457926edfdb allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents: 2009
diff changeset
  1735
     If askForRevision is false, check-out the newest version."
0457926edfdb allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents: 2009
diff changeset
  1736
1084
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1737
    |mgr resources sourceInfo
1339
9a1e91c28cb3 checkOut dialog labels
Claus Gittinger <cg@exept.de>
parents: 1338
diff changeset
  1738
     currentClass inChangeSet
1055
f44b12442c58 version update after load from rep.
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  1739
     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
  1740
     nm msg rev2 newestRev
1030
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  1741
     containerModule containerPackage containerFile rslt
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  1742
     pkg listHere listRep diffSet 
1054
4ecc5aeca084 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1053
diff changeset
  1743
     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
  1744
     changedClasses default versionMethodsHere versionMethodsRep changedClassDefinitions
3ca8838014ee dont ask for changeSet-compression if the loaded
Claus Gittinger <cg@exept.de>
parents: 1877
diff changeset
  1745
     wasInChangeSetBefore|
986
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  1746
1189
fdc5e747c184 refactored check for a valid sourceCodeManager into one place
Claus Gittinger <cg@exept.de>
parents: 1185
diff changeset
  1747
    aClass isNil ifTrue:[self error:'nil class'].
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1748
1377
0fd99dd003f6 classResources now understood by all classes
Claus Gittinger <cg@exept.de>
parents: 1375
diff changeset
  1749
    resources := self classResources.
986
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  1750
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  1751
    currentClass := aClass theNonMetaclass.
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  1752
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  1753
    nm := currentClass name.
1189
fdc5e747c184 refactored check for a valid sourceCodeManager into one place
Claus Gittinger <cg@exept.de>
parents: 1185
diff changeset
  1754
    mgr := self sourceCodeManagerFor:currentClass.
986
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  1755
    mgr isNil ifTrue:[
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  1756
        ^ self
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  1757
    ].
1084
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1758
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1759
    sourceInfo := mgr sourceInfoOfClass:currentClass.
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1760
    sourceInfo notNil ifTrue:[
2209
e3a4510c45f2 Project noProjectID -> PackageId noProjectID
Claus Gittinger <cg@exept.de>
parents: 2200
diff changeset
  1761
        currentClass package ~= PackageId noProjectID ifTrue:[
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
  1762
            containerPackage := mgr directoryFromSourceInfo:sourceInfo.
1084
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1763
            containerModule := mgr moduleFromSourceInfo:sourceInfo.
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1764
        ].
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1765
        containerFile := mgr containerFromSourceInfo:sourceInfo.
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1766
    ].
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1767
989
bb70a0f30e98 care for autoloaded classes when checking out
Claus Gittinger <cg@exept.de>
parents: 987
diff changeset
  1768
    currentClass isLoaded ifTrue:[
bb70a0f30e98 care for autoloaded classes when checking out
Claus Gittinger <cg@exept.de>
parents: 987
diff changeset
  1769
        rev := currentClass binaryRevision.
bb70a0f30e98 care for autoloaded classes when checking out
Claus Gittinger <cg@exept.de>
parents: 987
diff changeset
  1770
        rev2 := currentClass revision.
bb70a0f30e98 care for autoloaded classes when checking out
Claus Gittinger <cg@exept.de>
parents: 987
diff changeset
  1771
        rev isNil ifTrue:[
bb70a0f30e98 care for autoloaded classes when checking out
Claus Gittinger <cg@exept.de>
parents: 987
diff changeset
  1772
            rev := rev2
bb70a0f30e98 care for autoloaded classes when checking out
Claus Gittinger <cg@exept.de>
parents: 987
diff changeset
  1773
        ].
bb70a0f30e98 care for autoloaded classes when checking out
Claus Gittinger <cg@exept.de>
parents: 987
diff changeset
  1774
        rev isNil ifTrue:[
1084
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1775
            pkg := currentClass package.
2209
e3a4510c45f2 Project noProjectID -> PackageId noProjectID
Claus Gittinger <cg@exept.de>
parents: 2200
diff changeset
  1776
            (pkg notNil and:[pkg ~= PackageId noProjectID]) ifTrue:[
1019
efc461bc89dc asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
  1777
                containerModule := pkg upTo:$:.
efc461bc89dc asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
  1778
                containerPackage := pkg copyFrom:(containerModule size + 2).
efc461bc89dc asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
  1779
            ].
efc461bc89dc asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
  1780
            containerModule size == 0 ifTrue:[
1084
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1781
                containerModule := (SourceCodeManagerUtilities lastModule ) ? Project current repositoryModule.
1019
efc461bc89dc asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
  1782
            ].
efc461bc89dc asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
  1783
            containerPackage size == 0 ifTrue:[
1084
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1784
                containerPackage := (SourceCodeManagerUtilities lastPackage ) ? Project current package.
1019
efc461bc89dc asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
  1785
            ].
1030
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  1786
            answer := self confirmWithCancel:(resources 
1035
092c701c91f3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
  1787
                                                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
  1788
                                                with:containerModule allBold 
1035
092c701c91f3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1033
diff changeset
  1789
                                                with:containerPackage allBold
1084
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1790
                                                with:currentClass name allBold) withCRs.
1030
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  1791
            answer isNil ifTrue:[^ self "cancelled"].
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  1792
            answer ifFalse:[
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  1793
                rslt := SourceCodeManagerUtilities
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  1794
                    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
  1795
                    title:'Container to load from' note:nil 
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  1796
                    initialModule:containerModule 
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  1797
                    initialPackage:containerPackage 
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  1798
                    initialFileName:(currentClass nameWithoutPrefix , '.st')
1030
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  1799
                    forNewContainer:false.
1084
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1800
1030
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  1801
                rslt isNil ifTrue:[
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  1802
                    "/ canel
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  1803
                    ^ self
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  1804
                ].
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  1805
                containerModule := "lastModule :=" rslt at:#module.
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  1806
                containerPackage := "lastPackage :=" rslt at:#package.
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  1807
                containerFile := rslt at:#fileName.
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  1808
            ].
1019
efc461bc89dc asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
  1809
efc461bc89dc asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
  1810
"/            rslt := SourceCodeManagerUtilities
efc461bc89dc asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
  1811
"/                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
  1812
"/                title:'Container to checkOut' note:nil 
efc461bc89dc asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
  1813
"/                initialModule:containerModule 
efc461bc89dc asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
  1814
"/                initialPackage:containerPackage
efc461bc89dc asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
  1815
"/                initialFileName:(currentClass name , '.st').
1030
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  1816
"/                forNewContainer:false.
1019
efc461bc89dc asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
  1817
"/            rslt isNil ifTrue:[^ self].
efc461bc89dc asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
  1818
            "/ 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
  1819
            "/ ^ self
989
bb70a0f30e98 care for autoloaded classes when checking out
Claus Gittinger <cg@exept.de>
parents: 987
diff changeset
  1820
        ].
986
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  1821
    ].
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  1822
1966
d2e8ac3b2c0b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1964
diff changeset
  1823
    containerFile isNil ifTrue:[
d2e8ac3b2c0b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1964
diff changeset
  1824
        containerFile := currentClass classFilename.
d2e8ac3b2c0b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1964
diff changeset
  1825
    ].
d2e8ac3b2c0b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1964
diff changeset
  1826
986
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  1827
    "/
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  1828
    "/ 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
  1829
    "/
1084
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1830
"/    newestRev := mgr newestRevisionOf:currentClass.
1978
91cb79a651aa *** empty log message ***
Michael Beyl <mb@exept.de>
parents: 1972
diff changeset
  1831
    containerModule isNil ifTrue:[
1982
305ae0785e65 nicer dialog
Claus Gittinger <cg@exept.de>
parents: 1978
diff changeset
  1832
        containerModule := Dialog request:(resources 
305ae0785e65 nicer dialog
Claus Gittinger <cg@exept.de>
parents: 1978
diff changeset
  1833
                                        stringWithCRs:'Missing Module Information for CheckOut of "%1".\\Module:'
305ae0785e65 nicer dialog
Claus Gittinger <cg@exept.de>
parents: 1978
diff changeset
  1834
                                        with:aClass name allBold).
1978
91cb79a651aa *** empty log message ***
Michael Beyl <mb@exept.de>
parents: 1972
diff changeset
  1835
        containerModule isEmptyOrNil ifTrue:[^ self].
91cb79a651aa *** empty log message ***
Michael Beyl <mb@exept.de>
parents: 1972
diff changeset
  1836
    ].
91cb79a651aa *** empty log message ***
Michael Beyl <mb@exept.de>
parents: 1972
diff changeset
  1837
    containerPackage isNil ifTrue:[
1982
305ae0785e65 nicer dialog
Claus Gittinger <cg@exept.de>
parents: 1978
diff changeset
  1838
        containerPackage := Dialog request:(resources 
305ae0785e65 nicer dialog
Claus Gittinger <cg@exept.de>
parents: 1978
diff changeset
  1839
                                        stringWithCRs:'Missing Package Information for CheckOut of "%1".\\Package:'
305ae0785e65 nicer dialog
Claus Gittinger <cg@exept.de>
parents: 1978
diff changeset
  1840
                                        with:aClass name allBold).
1978
91cb79a651aa *** empty log message ***
Michael Beyl <mb@exept.de>
parents: 1972
diff changeset
  1841
        containerPackage isEmptyOrNil ifTrue:[^ self].
91cb79a651aa *** empty log message ***
Michael Beyl <mb@exept.de>
parents: 1972
diff changeset
  1842
    ].
91cb79a651aa *** empty log message ***
Michael Beyl <mb@exept.de>
parents: 1972
diff changeset
  1843
1084
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1844
    newestRev := mgr newestRevisionInFile:containerFile directory:containerPackage module:containerModule.
1006
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1845
    askForRevision ifFalse:[
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1846
        rev := newestRev ? ''
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1847
    ] ifTrue:[
1019
efc461bc89dc asText allBold -> allBold
Claus Gittinger <cg@exept.de>
parents: 1017
diff changeset
  1848
        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
  1849
        rev notNil ifTrue:[
1006
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1850
            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
  1851
                                           with:nm allBold with:rev).
1006
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1852
            (rev2 notNil and:[rev2 ~= rev]) ifTrue:[
2539
abce5c41eef8 comment/format in: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2522
diff changeset
  1853
                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
  1854
            ]
986
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  1855
        ].
1006
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1856
        newestRev notNil ifTrue:[
2539
abce5c41eef8 comment/format in: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2522
diff changeset
  1857
            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
  1858
        ].
986
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  1859
1006
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1860
        rev := SourceCodeManagerUtilities
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1861
                    askForExistingRevision:msg 
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1862
                    title:'CheckOut from repository' 
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1863
                    class:currentClass.
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1864
        rev isNil ifTrue:[
1339
9a1e91c28cb3 checkOut dialog labels
Claus Gittinger <cg@exept.de>
parents: 1338
diff changeset
  1865
            ^ self   "/ canceled
987
fa4fc87b8540 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 986
diff changeset
  1866
        ].
1006
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1867
    ].
986
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  1868
1006
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1869
    rev withoutSpaces isEmpty ifTrue:[
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1870
        msg := 'extracting newest %1 (' , (newestRev ? '???') , ')'.
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1871
        "/ aStream := mgr getMostRecentSourceStreamForClassNamed:nm.
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1872
        aStream := mgr getSourceStreamFor:currentClass revision:newestRev.
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1873
        revString := '(newest: ' , (newestRev ? '???') , ')'.
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1874
    ] ifFalse:[
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1875
        msg := 'extracting previous %1'.
1084
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1876
"/        aStream := mgr getSourceStreamFor:currentClass revision:rev.
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1877
"/        revString := rev
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1878
        aStream := mgr  
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1879
            streamForClass:currentClass
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1880
            fileName:containerFile 
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1881
            revision:rev 
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1882
            directory:containerPackage 
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1883
            module:containerModule
2728a446d037 remember lastPackage/Module
Claus Gittinger <cg@exept.de>
parents: 1080
diff changeset
  1884
            cache:true.
1006
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1885
    ].
996
551841dd0105 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 992
diff changeset
  1886
1006
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1887
    aStream isNil ifTrue:[
1800
560e29381f52 ask for condense changeSet when loading the newest revision
Claus Gittinger <cg@exept.de>
parents: 1787
diff changeset
  1888
        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
  1889
        ^ self
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1890
    ].
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1891
    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
  1892
        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
  1893
        aStream close.
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1894
        ^ self
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1895
    ] do:[
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1896
        sourceToLoad := aStream contents asString.
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1897
    ].
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1898
    aStream close.
987
fa4fc87b8540 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 986
diff changeset
  1899
1919
8d30ac5be40f *** empty log message ***
boris
parents: 1913
diff changeset
  1900
    wasInChangeSetBefore := ChangeSet current includesChangeForClassOrMetaclass:currentClass.
1879
3ca8838014ee dont ask for changeSet-compression if the loaded
Claus Gittinger <cg@exept.de>
parents: 1877
diff changeset
  1901
1006
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1902
    currentClass isLoaded ifFalse:[
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1903
        rev = newestRev ifTrue:[
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1904
            currentClass autoload.
996
551841dd0105 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 992
diff changeset
  1905
        ] ifFalse:[
1006
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1906
            sourceToLoad readStream fileIn.
996
551841dd0105 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 992
diff changeset
  1907
        ].
1879
3ca8838014ee dont ask for changeSet-compression if the loaded
Claus Gittinger <cg@exept.de>
parents: 1877
diff changeset
  1908
        wasInChangeSetBefore ifFalse:[
3ca8838014ee dont ask for changeSet-compression if the loaded
Claus Gittinger <cg@exept.de>
parents: 1877
diff changeset
  1909
            ChangeSet current condenseChangesForClass:currentClass.
3ca8838014ee dont ask for changeSet-compression if the loaded
Claus Gittinger <cg@exept.de>
parents: 1877
diff changeset
  1910
        ].
1006
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1911
        ^ self.
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1912
    ].
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1913
2236
050566d67400 changed:
Claus Gittinger <cg@exept.de>
parents: 2233
diff changeset
  1914
    inChangeSet := aClass hasUnsavedChanges.
1800
560e29381f52 ask for condense changeSet when loading the newest revision
Claus Gittinger <cg@exept.de>
parents: 1787
diff changeset
  1915
1972
32853d3cb43a care for errors during fileOut ofr local source
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  1916
    Error handle:[:ex |
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1917
        (Dialog 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1918
            confirm:(resources 
2426
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1919
                        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
  1920
                        with:ex description 
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1921
                        with:currentClass name allBold) 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1922
            noLabel:'Cancel') 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1923
        ifFalse:[
1999
57cad7a53262 changed #checkOutClasse
Stefan Vogel <sv@exept.de>
parents: 1997
diff changeset
  1924
            AbortOperationRequest raise
1972
32853d3cb43a care for errors during fileOut ofr local source
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  1925
        ].
2426
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1926
        sourceToLoad readStream fileIn.
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1927
        ^ self.
1972
32853d3cb43a care for errors during fileOut ofr local source
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  1928
    ] do:[
2426
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1929
        self activityNotification:'generating current source...'.
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1930
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1931
        currentSource := self sourceCodeOfClass:currentClass.
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1932
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1933
        self activityNotification:'comparing...'.
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1934
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1935
        sourceToLoad = currentSource ifTrue:[
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1936
            "/ make all methods belong to the classes project
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1937
            self setPackageOfAllMethodsIn:aClass to:aClass package.
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1938
            inChangeSet ifTrue:[
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1939
                rev = newestRev ifTrue:[
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1940
                    (askForConfirmation not
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1941
                    or:[ wasInChangeSetBefore not
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1942
                    or:[ self confirm:(resources 
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1943
                                    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
  1944
                                    with:aClass name)]]) 
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1945
                    ifTrue:[
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1946
                        ChangeSet current condenseChangesForClass:aClass.
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1947
                    ].
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1948
                ].
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1949
            ].
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1950
            self activityNotification:'... nothing changed in repository'.
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1951
            ^ self.
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1952
        ].
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1953
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1954
        self activityNotification:'generating diffSet...'.
1972
32853d3cb43a care for errors during fileOut ofr local source
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  1955
        listHere := ChangeSet fromStream:(currentSource readStream).
32853d3cb43a care for errors during fileOut ofr local source
Claus Gittinger <cg@exept.de>
parents: 1971
diff changeset
  1956
    ].
2426
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1957
1006
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  1958
    listRep := ChangeSet fromStream:(sourceToLoad readStream).
1051
9f76e78c91d4 *** empty log message ***
frank
parents: 1050
diff changeset
  1959
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1960
    Error handle:[:ex |
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1961
        (Dialog 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1962
            confirm:(resources 
2426
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1963
                        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
  1964
                        with:ex description
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  1965
                    ) 
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1966
            noLabel:'Cancel') 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1967
        ifFalse:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1968
            ^ self
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1969
        ].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1970
        sourceToLoad readStream fileIn.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1971
        ^ self.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1972
    ] do:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1973
        versionMethodsHere := listHere select:[:change | (change isMethodChange 
2184
4bb6267612be changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
fm
parents: 2175
diff changeset
  1974
                                               and:[(AbstractSourceCodeManager isVersionMethodSelector:change selector)
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1975
                                               and:[change changeClass isMeta]])].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1976
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1977
        versionMethodsRep := listRep select:[:change | (change isMethodChange 
2184
4bb6267612be changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
fm
parents: 2175
diff changeset
  1978
                                               and:[(AbstractSourceCodeManager isVersionMethodSelector:change selector)
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1979
                                               and:[change changeClass isMeta]])].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1980
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1981
        "/ compare all but the version methods
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1982
        listHere := listHere select:[:change | (change isMethodChange 
2184
4bb6267612be changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
fm
parents: 2175
diff changeset
  1983
                                               and:[(AbstractSourceCodeManager isVersionMethodSelector:change selector)
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1984
                                               and:[change changeClass isMeta]]) not].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1985
        listRep := listRep select:[:change | (change isMethodChange 
2184
4bb6267612be changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
fm
parents: 2175
diff changeset
  1986
                                               and:[(AbstractSourceCodeManager isVersionMethodSelector:change selector)
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1987
                                               and:[change changeClass isMeta]]) not].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1988
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1989
        diffSet := listHere diffSetsAgainst:listRep.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1990
        changed := diffSet changed.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1991
        onlyHere := diffSet onlyInReceiver.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1992
        onlyHere := onlyHere select:[:eachDiff|  |methodsPackage|
2097
2cb761062819 take care of class definitions
Stefan Vogel <sv@exept.de>
parents: 2096
diff changeset
  1993
                eachDiff isClassDefinitionChange not and:[
2cb761062819 take care of class definitions
Stefan Vogel <sv@exept.de>
parents: 2096
diff changeset
  1994
                    methodsPackage := (eachDiff changeClass compiledMethodAt:eachDiff selector) package.
2cb761062819 take care of class definitions
Stefan Vogel <sv@exept.de>
parents: 2096
diff changeset
  1995
                    methodsPackage == containerPackage
2cb761062819 take care of class definitions
Stefan Vogel <sv@exept.de>
parents: 2096
diff changeset
  1996
                ]
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1997
            ].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1998
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  1999
        onlyInRep := diffSet onlyInArg.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2000
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2001
        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
  2002
        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
  2003
        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
  2004
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2005
        labels := #('Cancel' 'Merge' 'Load'). 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2006
        values := #(nil #merge #load). 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2007
        default := askForRevision 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2008
                        ifTrue:[3. "i.e. load"]
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2009
                        ifFalse:[2. "i.e. merge"].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2010
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2011
        msg := 'About to load ''%4''.\\'.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2012
        onlyInRep size > 0 ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2013
            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
  2014
        ].
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2015
        onlyHere size > 0 ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2016
            onlyInRep size > 0 ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2017
                msg := msg , 'And there '.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2018
            ] ifFalse:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2019
                msg := msg , 'There '.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2020
            ].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2021
            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
  2022
        ].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2023
        changed size > 0 ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2024
            changed size == 1 ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2025
                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
  2026
                singleChangeSelector := changed first first selector allBold
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2027
            ] ifFalse:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2028
                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
  2029
            ]
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2030
        ].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2031
        changedClassDefinitions size > 0 ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2032
            changedClassDefinitions size == 1 ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2033
                msg := msg , 'The class definition is different.\\'.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2034
            ] ifFalse:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2035
                msg := msg , '%5 class definitions are different.\\'.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2036
            ]
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2037
        ].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2038
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2039
        onlyHere isEmpty ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2040
            onlyInRep isEmpty ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2041
                (changed isEmpty and:[changedClassDefinitions isEmpty]) ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2042
                    versionMethodsRep size == 1 ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2043
    "/                    (self confirm:(resources string:'Versions are identical: %1\\Update the version-ID ?' with:aClass name) withCRs) ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2044
                            versionMethodsRep first apply.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2045
    "/                    ]
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2046
                    ].
2193
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
  2047
                    "/ make all those methods belong to the classes project
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
  2048
                    "/ no - that is wrong !! self setPackageOfAllMethodsIn:aClass to:aClass package.
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
  2049
                    self setPackageOfAllMethodsInChangeSet:listRep to:aClass package.
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2050
                    self activityNotification:'Only the version method has been changed in repository'.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2051
                    ^ self
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2052
                ].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2053
                inChangeSet ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2054
                    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
  2055
                ].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2056
                labels := #('Cancel' 'Load'). 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2057
                values := #(nil #load). 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2058
                default := askForRevision 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2059
                                ifTrue:[2. "i.e. load"]
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2060
                                ifFalse:[1. "i.e. cancel"].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2061
                default := 2. 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2062
            ] ifFalse:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2063
                changed isEmpty ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2064
                    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
  2065
                    labels := #('Cancel' 'Load'). 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2066
                    values := #(nil #load). 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2067
                    default := askForRevision 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2068
                                    ifTrue:[2. "i.e. load"]
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2069
                                    ifFalse:[1. "i.e. cancel"].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2070
                    default := 2. 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2071
                ] ifFalse:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2072
                    inChangeSet ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2073
                        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
  2074
                    ].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2075
                    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
  2076
                ].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2077
            ]
1006
2ac6dfb81b8d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1004
diff changeset
  2078
        ] ifFalse:[
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2079
            onlyInRep isEmpty ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2080
                inChangeSet ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2081
                    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
  2082
                    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
  2083
                ].
1121
7531e9dd8ba8 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1120
diff changeset
  2084
                labels := #('Cancel' 'Load'). 
987
fa4fc87b8540 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 986
diff changeset
  2085
                values := #(nil #load). 
1007
44c0229bcb43 better dialog message text and load/cancel default.
Claus Gittinger <cg@exept.de>
parents: 1006
diff changeset
  2086
                default := askForRevision 
44c0229bcb43 better dialog message text and load/cancel default.
Claus Gittinger <cg@exept.de>
parents: 1006
diff changeset
  2087
                                ifTrue:[2. "i.e. load"]
44c0229bcb43 better dialog message text and load/cancel default.
Claus Gittinger <cg@exept.de>
parents: 1006
diff changeset
  2088
                                ifFalse:[1. "i.e. cancel"].
1907
30ca5aea5a7a dialogs defaults
fm
parents: 1886
diff changeset
  2089
                default := 2. 
987
fa4fc87b8540 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 986
diff changeset
  2090
            ] ifFalse:[
1339
9a1e91c28cb3 checkOut dialog labels
Claus Gittinger <cg@exept.de>
parents: 1338
diff changeset
  2091
                inChangeSet ifTrue:[
9a1e91c28cb3 checkOut dialog labels
Claus Gittinger <cg@exept.de>
parents: 1338
diff changeset
  2092
                    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
  2093
                    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
  2094
                ]
1339
9a1e91c28cb3 checkOut dialog labels
Claus Gittinger <cg@exept.de>
parents: 1338
diff changeset
  2095
            ]
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2096
        ].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2097
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2098
        msg := msg bindWith:onlyInRep size printString 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2099
                   with:onlyHere size printString 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2100
                   with:changed size printString
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2101
                   with:aClass name allBold
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2102
                   with:changedClassDefinitions size printString
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2103
                   with:singleChangeSelector.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2104
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2105
        askForConfirmation ifFalse:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2106
            answer := #load           
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2107
        ] ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2108
            answer := (Dialog confirmWithCancel:msg withCRs
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2109
                   labels:(resources array:labels)
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2110
                   values:values 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2111
                   default:default).
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2112
            answer isNil ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2113
                self activityNotification:'...cancelled'.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2114
                ^ self
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2115
            ].
2013
0457926edfdb allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents: 2009
diff changeset
  2116
        ].
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2117
        self activityNotification:'updating...'.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2118
        changedClasses := IdentitySet new.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2119
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2120
    "/    Class withoutUpdatingChangesDo:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2121
        answer == #load ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2122
            "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
  2123
             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
  2124
            onlyHere do:[:eachChange |   
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2125
                 "remove this change (method not present in repository version)"
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2126
                 |cClass cSel|
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2127
                 eachChange isMethodChange ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2128
                     cClass := eachChange changeClass.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2129
                     cSel := eachChange selector.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2130
                     cClass basicRemoveSelector:cSel.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2131
                 ]
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2132
            ].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2133
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2134
            changedClassDefinitions do:[:eachChangeArr | 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2135
                |cHere eachChangedClass| 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2136
                cHere := eachChangeArr at:1.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2137
                eachChangedClass := cHere changeClass.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2138
                eachChangedClass notNil ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2139
                    changedClasses add:eachChangedClass.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2140
                    eachChangedClass := eachChangedClass theNonMetaclass.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2141
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2142
                    "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
  2143
                    changed do:[:eachChangeArr|
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2144
                        |eachChange eachClass|
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2145
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2146
                        eachChange := eachChangeArr first.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2147
                        eachChange isMethodChange ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2148
                            eachClass := eachChange changeClass.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2149
                            eachClass theNonMetaclass == eachChangedClass ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2150
                                eachClass basicRemoveSelector:eachChange selector.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2151
                            ].
1999
57cad7a53262 changed #checkOutClasse
Stefan Vogel <sv@exept.de>
parents: 1997
diff changeset
  2152
                        ].
57cad7a53262 changed #checkOutClasse
Stefan Vogel <sv@exept.de>
parents: 1997
diff changeset
  2153
                    ].
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2154
                ]
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2155
            ].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2156
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2157
           "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
  2158
           changedClassDefinitions do:[:eachChangeArr |    
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2159
                |cRep| 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2160
                cRep := eachChangeArr at:2.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2161
                cRep apply.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2162
            ].
1057
6903d4d5097d do not update the changesFile, when checkingOut
Claus Gittinger <cg@exept.de>
parents: 1056
diff changeset
  2163
        ].
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2164
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2165
        onlyInRep do:[:eachChange |
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2166
            |changeClass|
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2167
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2168
            "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
  2169
             eachChange apply.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2170
             eachChange isMethodChange ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2171
                 changeClass := eachChange changeClass.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2172
                 changeClass notNil ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2173
                     eachChange changeMethod setPackage:(changeClass package).
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2174
                     changedClasses add:changeClass.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2175
                 ]
2013
0457926edfdb allow checkout without popup confirmations
Michael Beyl <mb@exept.de>
parents: 2009
diff changeset
  2176
             ]
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2177
        ]
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2178
    .
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2179
        answer == #load ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2180
            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
  2181
                 |cHere cRep| 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2182
                 cHere := eachChangeArr at:1.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2183
                 cRep := eachChangeArr at:2.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2184
                 cRep apply.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2185
                 cRep isMethodChange ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2186
                     cRep changeMethod setPackage:(cRep changeClass package).
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2187
                     changedClasses add:cRep changeClass.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2188
                 ]
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2189
            ].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2190
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2191
            versionMethodsRep size >= 1 ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2192
                versionMethodsRep last apply.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2193
            ] ifFalse:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2194
                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
  2195
            ].
2193
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
  2196
            "/ make all those methods belong to the classes project
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
  2197
            "/ no - that is wrong !! self setPackageOfAllMethodsIn:aClass to:aClass package.
cdb523415d6b added: #setPackageOfAllMethodsInChangeSet:to:
fm
parents: 2189
diff changeset
  2198
            self setPackageOfAllMethodsInChangeSet:listRep to:aClass package.
1055
f44b12442c58 version update after load from rep.
Claus Gittinger <cg@exept.de>
parents: 1054
diff changeset
  2199
        ].
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2200
    "/    ].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2201
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2202
        answer == #load ifTrue:[
2236
050566d67400 changed:
Claus Gittinger <cg@exept.de>
parents: 2233
diff changeset
  2203
            inChangeSet := aClass hasUnsavedChanges.
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2204
            inChangeSet ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2205
                rev = newestRev ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2206
                    (wasInChangeSetBefore not
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2207
                     or:[ self confirm:(resources 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2208
                                    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
  2209
                                    with:aClass name)]) 
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2210
                    ifTrue:[
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2211
                        ChangeSet current condenseChangesForClass:aClass.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2212
                    ].
1800
560e29381f52 ask for condense changeSet when loading the newest revision
Claus Gittinger <cg@exept.de>
parents: 1787
diff changeset
  2213
                ].
560e29381f52 ask for condense changeSet when loading the newest revision
Claus Gittinger <cg@exept.de>
parents: 1787
diff changeset
  2214
            ].
560e29381f52 ask for condense changeSet when loading the newest revision
Claus Gittinger <cg@exept.de>
parents: 1787
diff changeset
  2215
        ].
2092
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2216
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2217
        changedClasses do:[:eachClass |
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2218
             eachClass changed:#projectOrganization.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2219
        ].
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2220
        Smalltalk changed:#projectOrganization.
cd9b53d5ca31 allow for fileIn, even if diffset generation failed
Claus Gittinger <cg@exept.de>
parents: 2064
diff changeset
  2221
        self activityNotification:'... done'.
1800
560e29381f52 ask for condense changeSet when loading the newest revision
Claus Gittinger <cg@exept.de>
parents: 1787
diff changeset
  2222
    ].
560e29381f52 ask for condense changeSet when loading the newest revision
Claus Gittinger <cg@exept.de>
parents: 1787
diff changeset
  2223
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
  2224
    "Modified: / 07-02-2001 / 18:18:32 / ps"
2426
d698fb5ebbd7 changed: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2397
diff changeset
  2225
    "Modified: / 07-07-2011 / 14:43:59 / cg"
2539
abce5c41eef8 comment/format in: #checkoutClass:askForRevision:askForMerge:askForConfirmation:
Claus Gittinger <cg@exept.de>
parents: 2522
diff changeset
  2226
    "Modified (format): / 29-09-2011 / 15:44:38 / cg"
986
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  2227
!
78d2a098bc81 support to checkout/merge a class from the repository
Claus Gittinger <cg@exept.de>
parents: 984
diff changeset
  2228
1522
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2229
checkoutExtensionMethodsForPackage:packageToCheckOut askForRevision:askForRevision askForMerge:askForMerge using:aSourceCodeManager
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2230
    "check-out a class from the source repository.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2231
     If askForRevision is false, check-out the newest version."
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2232
1841
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  2233
    |resources 
1704
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  2234
     inChangeSet extensionMethods
1841
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  2235
     rev msg
1704
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  2236
     listHere listRep diffSet 
1522
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2237
     changed onlyHere onlyInRep answer labels values singleChangeSelector
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2238
     changedClasses default |
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2239
1841
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  2240
    listRep := self changeSetForExtensionMethodsForPackage:packageToCheckOut askForRevision:askForRevision using:aSourceCodeManager.
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  2241
    listRep isNil ifTrue:[ ^self ].
1522
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2242
1841
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  2243
    resources := self classResources.
1522
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2244
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2245
    self activityNotification:'generating diffSet...'.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2246
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2247
    extensionMethods := OrderedCollection new.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2248
    Smalltalk allClassesDo:[:aClass | |owner classPackage|
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2249
        "/ individual methods ...
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2250
        aClass isMeta ifFalse:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2251
            (aClass package ~= packageToCheckOut) ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2252
                aClass instAndClassSelectorsAndMethodsDo:[:sel :mthd |
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2253
                    "/ methods in this project ...
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2254
                    (mthd package = packageToCheckOut) ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2255
                        "/ ... whose class is not in the ckechIn-set
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2256
                        extensionMethods add:mthd
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2257
                    ]
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2258
                ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2259
            ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2260
        ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2261
    ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2262
    listHere := ChangeSet forExistingMethods:extensionMethods.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2263
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2264
    inChangeSet := listRep contains:[:someChange |
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2265
                            |cClass cSel|
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2266
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2267
                            someChange isMethodChange ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2268
                                cClass := someChange changeClass.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2269
                                cSel := someChange selector.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2270
                                ChangeSet current includesChangeForClass:cClass selector:cSel
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2271
                            ]
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2272
                    ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2273
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2274
    diffSet := listHere diffSetsAgainst:listRep.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2275
    changed := diffSet changed.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2276
    onlyHere := diffSet onlyInReceiver.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2277
    onlyInRep := diffSet onlyInArg.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2278
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2279
    labels := #('Cancel' 'Merge' 'Load'). 
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2280
    values := #(nil #merge #load). 
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2281
    default := askForRevision 
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2282
                    ifTrue:[3. "i.e. load"]
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2283
                    ifFalse:[2. "i.e. merge"].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2284
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2285
    msg := 'About to load extensions for ''%5''.\\'.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2286
    onlyInRep size > 0 ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2287
        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
  2288
    ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2289
    onlyHere size > 0 ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2290
        onlyInRep size > 0 ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2291
            msg := msg , 'And there '.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2292
        ] ifFalse:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2293
            msg := msg , 'There '.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2294
        ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2295
        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
  2296
    ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2297
    changed size > 0 ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2298
        changed size == 1 ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2299
            msg := msg , 'The ''%5''-method is different (present in both).\\'.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2300
            singleChangeSelector := changed first first selector allBold
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2301
        ] ifFalse:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2302
            msg := msg , '%3 methods are different (present in both).\\'.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2303
        ]
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2304
    ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2305
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2306
    onlyHere isEmpty ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2307
        onlyInRep isEmpty ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2308
            (changed isEmpty) ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2309
                listRep do:[:eachChange |
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2310
                    eachChange changeMethod setPackage:packageToCheckOut.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2311
                ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2312
                ^ self
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2313
            ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2314
            inChangeSet ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2315
                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
  2316
            ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2317
            labels := #('Cancel' 'Load'). 
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2318
            values := #(nil #load). 
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2319
            default := askForRevision 
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2320
                            ifTrue:[2. "i.e. load"]
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2321
                            ifFalse:[1. "i.e. cancel"].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2322
        ] ifFalse:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2323
            changed isEmpty ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2324
                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
  2325
                labels := #('Cancel' 'Load'). 
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2326
                values := #(nil #load). 
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2327
                default := askForRevision 
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2328
                                ifTrue:[2. "i.e. load"]
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2329
                                ifFalse:[1. "i.e. cancel"].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2330
            ] ifFalse:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2331
                inChangeSet ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2332
                    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
  2333
                ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2334
                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
  2335
            ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2336
        ]
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2337
    ] ifFalse:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2338
        onlyInRep isEmpty ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2339
            inChangeSet ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2340
                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
  2341
                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
  2342
            ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2343
            labels := #('Cancel' 'Load'). 
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2344
            values := #(nil #load). 
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2345
            default := askForRevision 
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2346
                            ifTrue:[2. "i.e. load"]
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2347
                            ifFalse:[1. "i.e. cancel"].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2348
        ] ifFalse:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2349
            inChangeSet ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2350
                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
  2351
                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
  2352
            ]
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2353
        ]
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2354
    ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2355
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2356
    msg := msg bindWith:onlyInRep size printString 
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2357
               with:onlyHere size printString 
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2358
               with:changed size printString
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2359
               with:singleChangeSelector
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2360
               with:packageToCheckOut allBold.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2361
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2362
    answer := (Dialog confirmWithCancel:msg withCRs
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2363
           labels:(resources array:labels)
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2364
           values:values 
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2365
           default:default).
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2366
    answer isNil ifTrue:[^ self].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2367
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2368
    self activityNotification:'updating...'.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2369
    changedClasses := IdentitySet new.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2370
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2371
"/    Class withoutUpdatingChangesDo:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2372
        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
  2373
                                     Class withoutUpdatingChangeSetDo:[ eachChange apply ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2374
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2375
                                     eachChange changeMethod setPackage:packageToCheckOut.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2376
                                     changedClasses add:eachChange changeClass.   
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2377
                     ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2378
        answer == #load ifTrue:[
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2379
            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
  2380
                                         |cClass cSel|
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2381
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2382
                                         cClass := eachChange changeClass.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2383
                                         cSel := eachChange selector.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2384
                                         Class withoutUpdatingChangeSetDo:[ cClass removeSelector:cSel ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2385
                        ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2386
            changed do:[:eachChangeArr | "apply this change (go to rep-version)"
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2387
                                         |cHere cRep| 
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2388
                                         cHere := eachChangeArr at:1.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2389
                                         cRep := eachChangeArr at:2.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2390
                                         Class withoutUpdatingChangeSetDo:[ cRep apply ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2391
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2392
                                         cRep changeMethod setPackage:packageToCheckOut.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2393
                                         changedClasses add:cRep changeClass.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2394
                       ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2395
        ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2396
"/    ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2397
    changedClasses do:[:eachClass |
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2398
         eachClass changed:#projectOrganization.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2399
    ].
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2400
    Smalltalk changed:#projectOrganization.
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2401
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2402
    "Modified: / 07-02-2001 / 18:18:32 / ps"
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2403
    "Created: / 10-08-2006 / 18:57:30 / cg"
1841
00e5a67d1d9e refactored & created changeSetForExtensions-utility
Claus Gittinger <cg@exept.de>
parents: 1840
diff changeset
  2404
    "Modified: / 09-10-2006 / 13:06:43 / cg"
1522
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2405
!
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  2406
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2407
compareClassWithRepository:aClass
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2408
    "open a diff-textView comparing the current (in-image) version
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2409
     against its orgiginal version found in the repository."
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2410
1449
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2411
    self compareClassWithRepository:aClass askForRevision:true
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2412
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2413
    "
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2414
      self compareClassWithRepository:Array
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2415
    "
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2416
!
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2417
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2418
compareClassWithRepository:aClass askForRevision:askForRevision
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2419
    "open a diff-textView comparing the current (in-image) version
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2420
     against its orgiginal version found in the repository."
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2421
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2422
    |classToCompare resources brwsr
1194
d60b2ed25f45 Remove unused method vars.
Stefan Vogel <sv@exept.de>
parents: 1193
diff changeset
  2423
     aStream comparedSource currentSource rev revString thisRevString mgr
1483
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  2424
     nm msg revisionInClass newestRev versionsAreTheSame|
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2425
1377
0fd99dd003f6 classResources now understood by all classes
Claus Gittinger <cg@exept.de>
parents: 1375
diff changeset
  2426
    resources := self classResources.
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2427
1449
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2428
    classToCompare := aClass theNonMetaclass.
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2429
1449
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2430
    nm := classToCompare name.
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2431
    mgr := self sourceCodeManagerFor:classToCompare.
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2432
    mgr isNil ifTrue:[
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2433
        ^ self
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2434
    ].
2397
e01669725571 changed: #compareClassWithRepository:askForRevision:
Claus Gittinger <cg@exept.de>
parents: 2383
diff changeset
  2435
e01669725571 changed: #compareClassWithRepository:askForRevision:
Claus Gittinger <cg@exept.de>
parents: 2383
diff changeset
  2436
    rev := classToCompare revisionInfoOfManager:mgr.
e01669725571 changed: #compareClassWithRepository:askForRevision:
Claus Gittinger <cg@exept.de>
parents: 2383
diff changeset
  2437
"/    rev := classToCompare binaryRevision.
1483
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  2438
    revisionInClass := classToCompare revision.
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2439
    rev isNil ifTrue:[
1483
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  2440
        rev := revisionInClass
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2441
    ].
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2442
    rev isNil ifTrue:[
1483
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  2443
        (Dialog confirm:'Class seems to be not yet in the repository (or classes revision info is corrupted)\\Proceed ?' withCRs)
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  2444
        ifFalse:[
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  2445
            ^ self
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  2446
        ]
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2447
    ].
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2448
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2449
    "/
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2450
    "/ class in repository - ask for revision
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2451
    "/
1449
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2452
    newestRev := mgr newestRevisionOf:classToCompare.
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2453
    askForRevision ifTrue:[
1466
82e4152d5e9e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1462
diff changeset
  2454
        msg := resources string:'Compare to revision: (empty for newest)'.
1449
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2455
        rev notNil ifTrue:[
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2456
            msg := msg , '\\' , (resources string:'Current %1 is based upon rev %2.'
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2457
                                           with:nm allBold with:rev).
1483
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  2458
            (revisionInClass notNil and:[revisionInClass ~= rev]) ifTrue:[
1449
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2459
                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
  2460
                                               with:revisionInClass)
1449
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2461
            ]
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2462
        ].
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2463
        newestRev notNil ifTrue:[
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2464
            msg := msg , '\' , (resources string:'Newest in reporitory is %1.'
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2465
                                           with:newestRev)
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2466
        ].
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2467
1449
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2468
        rev := SourceCodeManagerUtilities
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2469
                    askForExistingRevision:msg 
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2470
                    title:'Compare with repository' 
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2471
                    class:classToCompare.
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2472
    ] ifFalse:[
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2473
        rev := newestRev.
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2474
    ].
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2475
1449
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2476
    rev notNil ifTrue:[
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2477
        rev withoutSpaces isEmpty ifTrue:[
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2478
            msg := 'extracting newest %1 (' , (newestRev ? '???') , ')'.
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2479
            "/ aStream := mgr getMostRecentSourceStreamForClassNamed:nm.
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2480
            aStream := mgr getSourceStreamFor:classToCompare revision:newestRev.
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2481
            revString := '(newest: ' , (newestRev ? '???') , ')'.
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2482
        ] ifFalse:[
1449
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2483
            msg := 'extracting previous %1'.
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2484
            aStream := mgr getSourceStreamFor:classToCompare revision:rev.
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2485
            revString := rev
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2486
        ].
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2487
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2488
        aStream isNil ifTrue:[
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2489
            self warn:'could not extract source from repository'.
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2490
            ^ self
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2491
        ].
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2492
        aStream class readErrorSignal handle:[:ex |
1245
1c6076979aa7 #errorSignal -> #description
Stefan Vogel <sv@exept.de>
parents: 1210
diff changeset
  2493
            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
  2494
            aStream close.
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2495
            ^ self
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2496
        ] do:[
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2497
            comparedSource := aStream contents asString.
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2498
        ].
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2499
        aStream close.
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2500
1449
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2501
        self activityNotification:'generating current source...'.
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2502
1449
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2503
        currentSource := self sourceCodeOfClass:classToCompare.
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2504
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2505
        self activityNotification:'comparing...'.
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2506
1449
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2507
        versionsAreTheSame := false.
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2508
        comparedSource = currentSource ifTrue:[
1449
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2509
            versionsAreTheSame := true.
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2510
        ] ifFalse:[
1483
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  2511
            thisRevString := revisionInClass ? 'no revision'.
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2512
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2513
            revString = '(newest)' ifTrue:[
1449
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2514
                (rev := mgr newestRevisionOf:classToCompare) notNil ifTrue:[
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2515
                    revString := '(newest is ' , rev , ')'
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2516
                ]
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2517
            ].
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2518
1449
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2519
            self activityNotification:'comparing...'.
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2520
1449
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2521
            brwsr := (UserPreferences versionDiffViewerClass)
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2522
                  openOnClass:classToCompare
1877
fdd260c2e11a compare package
Claus Gittinger <cg@exept.de>
parents: 1875
diff changeset
  2523
                  labelA:('Repository: ' , revString)
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2524
                  sourceA:comparedSource
1877
fdd260c2e11a compare package
Claus Gittinger <cg@exept.de>
parents: 1875
diff changeset
  2525
                  labelB:('Current: (based on: ' , thisRevString , ')')
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2526
                  sourceB:currentSource
1877
fdd260c2e11a compare package
Claus Gittinger <cg@exept.de>
parents: 1875
diff changeset
  2527
                  title:('Comparing ' , classToCompare name)
1449
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2528
                  ifSame:[versionsAreTheSame := true].
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2529
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2530
            versionsAreTheSame ifFalse:[
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2531
                brwsr classChangeSet 
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2532
                    classBeingCompared:classToCompare;
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2533
                    versionA:rev;
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2534
                    versionB:rev , 'mod'.
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2535
            ].
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2536
        ].
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2537
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2538
        versionsAreTheSame ifTrue:[
2236
050566d67400 changed:
Claus Gittinger <cg@exept.de>
parents: 2233
diff changeset
  2539
            (classToCompare hasUnsavedChanges) ifTrue:[
1449
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2540
                (self confirm:(resources 
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2541
                                stringWithCRs:'Versions of %1 are identical.\\Remove entries from changeSet ?'
1864
0a1a62489122 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1841
diff changeset
  2542
                                with:classToCompare name allBold)) ifTrue:[
1449
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2543
                    ChangeSet current condenseChangesForClass:classToCompare.
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2544
                ].
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2545
            ] ifFalse:[
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2546
                self information:'Versions are identical.'.
cfb2e98b9259 refactored (code duplication)
Claus Gittinger <cg@exept.de>
parents: 1433
diff changeset
  2547
                ChangeSet current unrememberChangedClasses.
1483
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  2548
            ].
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  2549
            revisionInClass isNil ifTrue:[
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  2550
                (Dialog confirm:'Update (Fix) the classes Revision Info ?' withCRs)
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  2551
                ifTrue:[
1497
061be9164dac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1483
diff changeset
  2552
                    |newString root|
1483
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  2553
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  2554
                    newString := mgr updatedRevisionStringOf:aClass forRevision:rev with:aClass revisionString.
1497
061be9164dac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1483
diff changeset
  2555
                    newString isNil ifTrue:[
061be9164dac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1483
diff changeset
  2556
                        root := mgr getCVSROOTForModule:(aClass package upTo:$:).
061be9164dac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1483
diff changeset
  2557
                        root := mgr repositoryTopDirectoryFromCVSRoot:root.
1500
70a48e2f5921 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1497
diff changeset
  2558
                        newString := '$', 'Header: ',(root copyReplaceAll: $: with:$/ ),'/'
1911
d4088b5ba0ac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1907
diff changeset
  2559
                                     ,(Smalltalk fileNameForClass:aClass),'.st,v ',rev,' '
2006
11622f51f754 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2003
diff changeset
  2560
                                     ,(Date today printStringFormat:'%y-%m-%d'),' '
11622f51f754 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2003
diff changeset
  2561
                                     ,(Time now printStringFormat:'%h:%m:%s'),' '
11622f51f754 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2003
diff changeset
  2562
                                     ,'+0000 '
1497
061be9164dac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1483
diff changeset
  2563
                                     ,(OperatingSystem getLoginName),' Exp $'.
061be9164dac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1483
diff changeset
  2564
                    ].
2175
50349cb87bf4 changed:
fm
parents: 2161
diff changeset
  2565
                    CVSSourceCodeManager updateVersionMethodOf:aClass for:newString.
1483
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  2566
                ]
d449fe6f503f cancel all
Claus Gittinger <cg@exept.de>
parents: 1466
diff changeset
  2567
            ].
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2568
        ].
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2569
    ].
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2570
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2571
    "
997
c55b39b6c7a0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 996
diff changeset
  2572
      self compareClassWithRepository:Array
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2573
    "
1497
061be9164dac *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1483
diff changeset
  2574
2397
e01669725571 changed: #compareClassWithRepository:askForRevision:
Claus Gittinger <cg@exept.de>
parents: 2383
diff changeset
  2575
    "Modified: / 01-07-2011 / 13:04:28 / cg"
957
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2576
!
54dade11e57f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 954
diff changeset
  2577
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2578
compareProject:aProject withRepositoryVersionFrom:aDateOrNilForNewest
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2579
    |diffSet|
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2580
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2581
    diffSet := self diffSetOfProject:aProject againstRepositoryVersionFrom:aDateOrNilForNewest.
1875
f00eb53229ae first attempt with compare-project functionality
Claus Gittinger <cg@exept.de>
parents: 1864
diff changeset
  2582
    VersionDiffBrowser 
f00eb53229ae first attempt with compare-project functionality
Claus Gittinger <cg@exept.de>
parents: 1864
diff changeset
  2583
        openOnDiffSet:diffSet 
f00eb53229ae first attempt with compare-project functionality
Claus Gittinger <cg@exept.de>
parents: 1864
diff changeset
  2584
        labelA:'Repository' 
f00eb53229ae first attempt with compare-project functionality
Claus Gittinger <cg@exept.de>
parents: 1864
diff changeset
  2585
        labelB:'Image' 
2522
d32ade066c3f changed: #compareProject:withRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2487
diff changeset
  2586
        title:('Differences of %1' bindWith:aProject)
d32ade066c3f changed: #compareProject:withRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2487
diff changeset
  2587
        ignoreExtensions:false.
d32ade066c3f changed: #compareProject:withRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2487
diff changeset
  2588
d32ade066c3f changed: #compareProject:withRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2487
diff changeset
  2589
    "Modified: / 12-09-2011 / 11:56:01 / cg"
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2590
!
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2591
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2592
compareProjectWithRepository:aProject
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2593
    ^ self compareProject:aProject withRepositoryVersionFrom:nil
1875
f00eb53229ae first attempt with compare-project functionality
Claus Gittinger <cg@exept.de>
parents: 1864
diff changeset
  2594
!
f00eb53229ae first attempt with compare-project functionality
Claus Gittinger <cg@exept.de>
parents: 1864
diff changeset
  2595
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2596
createSourceContainerForClass:aClass
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2597
    "let user specify the source-repository values for aClass"
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2598
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2599
    |resources|
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2600
1377
0fd99dd003f6 classResources now understood by all classes
Claus Gittinger <cg@exept.de>
parents: 1375
diff changeset
  2601
    resources := self classResources.
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2602
    ^ self 
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2603
        defineSourceContainerForClass:aClass 
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2604
        title:(resources string:'Repository information for %1' with:aClass name)
1030
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  2605
        text:(resources string:'Create new repository container for ''%1''' with:aClass name allBold)
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2606
        createDirectories:true
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2607
        createContainer:true.
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2608
!
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2609
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2610
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
  2611
    "let user specify the source-repository values for aClass"
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2612
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  2613
    | className
2063
502166975e05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  2614
     "oldModule oldPackage" oldFileName
1533
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  2615
     module directory fileName nameSpace nameSpacePrefix
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  2616
     info project nm mgr creatingNew msg 
952
c75976ac7b7f when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2617
     answer doCheckinWithoutAsking forceCheckIn resources rslt note
c75976ac7b7f when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2618
     requiredPackage|
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2619
1377
0fd99dd003f6 classResources now understood by all classes
Claus Gittinger <cg@exept.de>
parents: 1375
diff changeset
  2620
    resources := self classResources.
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2621
    aClass isLoaded ifFalse:[
1076
4adaffbd7ab0 upper-case
Claus Gittinger <cg@exept.de>
parents: 1070
diff changeset
  2622
        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
  2623
        ^ false.
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2624
    ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2625
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2626
    className := aClass name.
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2627
1533
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  2628
    aClass isProjectDefinition ifTrue:[
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  2629
        "/ no way - their package is already known and fix.
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  2630
        module := aClass module.
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  2631
        directory := aClass moduleDirectory.
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  2632
    ] ifFalse:[
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  2633
        "/
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  2634
        "/ defaults, if nothing at all is known
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  2635
        "/
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  2636
        (module := LastModule) isNil ifTrue:[
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  2637
            module := (OperatingSystem getLoginName).
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  2638
        ].
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  2639
        (directory := LastPackage) isNil ifTrue:[
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  2640
            directory := 'private'.
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  2641
        ].
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2642
    ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2643
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2644
    "/
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2645
    "/ 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
  2646
    "/
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2647
    (Project notNil and:[(project := Project current) notNil]) ifTrue:[
1533
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  2648
        directory isNil ifTrue:[
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2649
            (nm := project repositoryDirectory) isNil ifTrue:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2650
                nm := project name
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2651
            ].
1533
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  2652
            directory := nm.
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2653
        ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2654
        module isNil ifTrue:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2655
            (nm := project repositoryModule) notNil ifTrue:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2656
                module := nm
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2657
            ]
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
    ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2660
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2661
    "/
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2662
    "/ 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
  2663
    "/ if so, take that as a default.
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2664
    "/
1189
fdc5e747c184 refactored check for a valid sourceCodeManager into one place
Claus Gittinger <cg@exept.de>
parents: 1185
diff changeset
  2665
    mgr := self sourceCodeManagerFor:aClass.
fdc5e747c184 refactored check for a valid sourceCodeManager into one place
Claus Gittinger <cg@exept.de>
parents: 1185
diff changeset
  2666
    mgr isNil ifTrue:[
fdc5e747c184 refactored check for a valid sourceCodeManager into one place
Claus Gittinger <cg@exept.de>
parents: 1185
diff changeset
  2667
        ^  false
fdc5e747c184 refactored check for a valid sourceCodeManager into one place
Claus Gittinger <cg@exept.de>
parents: 1185
diff changeset
  2668
    ].
fdc5e747c184 refactored check for a valid sourceCodeManager into one place
Claus Gittinger <cg@exept.de>
parents: 1185
diff changeset
  2669
1368
20cde03a3cd6 defineSource - fixed package & module extraction
martin
parents: 1347
diff changeset
  2670
1189
fdc5e747c184 refactored check for a valid sourceCodeManager into one place
Claus Gittinger <cg@exept.de>
parents: 1185
diff changeset
  2671
    info := mgr sourceInfoOfClass:aClass.
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2672
    info notNil ifTrue:[
1368
20cde03a3cd6 defineSource - fixed package & module extraction
martin
parents: 1347
diff changeset
  2673
        true "module ~= LastModule" ifTrue:[
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2674
            (info includesKey:#module) ifTrue:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2675
                module := (info at:#module).
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2676
            ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2677
        ].
1401
102c0c12b66b default package changed
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  2678
"/        true "package ~= LastPackage" ifTrue:[
102c0c12b66b default package changed
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  2679
"/            (info includesKey:#directory) ifTrue:[
102c0c12b66b default package changed
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  2680
"/                package := (info at:#directory).
102c0c12b66b default package changed
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  2681
"/            ].
102c0c12b66b default package changed
Claus Gittinger <cg@exept.de>
parents: 1391
diff changeset
  2682
"/        ].
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2683
        fileName := mgr containerFromSourceInfo:info.
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2684
        (nameSpace := aClass nameSpace) ~~ Smalltalk ifTrue:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2685
            nameSpacePrefix := nameSpace name , '::'.
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2686
            (fileName startsWith:nameSpacePrefix) ifTrue:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2687
                fileName := fileName copyFrom:(nameSpacePrefix size + 1).
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2688
            ]
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2689
        ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2690
"/        (info includesKey:#fileName) ifTrue:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2691
"/            fileName := (info at:#fileName).
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2692
"/        ] ifFalse:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2693
"/            (info includesKey:#expectedFileName) ifTrue:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2694
"/                fileName := (info at:#expectedFileName).
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2695
"/            ] ifFalse:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2696
"/                (info includesKey:#classFileNameBase) ifTrue:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2697
"/                    fileName := (info at:#classFileNameBase) , '.st'.
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2698
"/                ]
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2699
"/            ]
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2700
"/        ]
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2701
    ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2702
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2703
    fileName isNil ifTrue:[
1338
bad5961fbff1 fileNameForClass:
Claus Gittinger <cg@exept.de>
parents: 1323
diff changeset
  2704
        fileName := (Smalltalk fileNameForClass:aClass) , '.st'.
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2705
    ].
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
    OperatingSystem isMSDOSlike ifTrue:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2708
        module replaceAll:$\ with:$/.
1533
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  2709
        directory replaceAll:$\ with:$/.
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2710
    ].
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
    "/ 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
  2714
    "/
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2715
    doCheckinWithoutAsking := false.
1831
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  2716
"/false ifTrue:[
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  2717
"/    (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
  2718
"/        answer := Dialog confirmWithCancel:(resources 
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  2719
"/                            string:'About to change the source container.
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  2720
"/
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  2721
"/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
  2722
"/
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  2723
"/    %2 / %3 / %4
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  2724
"/
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  2725
"/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
  2726
"/                            with:className
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  2727
"/                            with:module
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  2728
"/                            with:directory
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  2729
"/                            with:fileName)
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  2730
"/                labels:(resources array:#('Cancel' 'Check in' 'Change')).
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  2731
"/        answer isNil ifTrue:[AbortSignal raise].
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  2732
"/        answer ifTrue:[
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  2733
"/            doCheckinWithoutAsking := false.
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  2734
"/            oldModule := module.
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  2735
"/            oldPackage := directory.
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  2736
"/            oldFileName := fileName
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  2737
"/        ] ifFalse:[
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  2738
"/            doCheckinWithoutAsking := true.
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  2739
"/            creatingNew := false.
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  2740
"/        ].
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  2741
"/    ].
cda120c93659 do not ask for changed source-container based on the default
sr
parents: 1828
diff changeset
  2742
"/].
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2743
    doCheckinWithoutAsking ifFalse:[
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
        "/ open a dialog for this
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2746
        "/
1787
db6157670930 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1782
diff changeset
  2747
        (mgr checkForExistingContainer:fileName inModule:module directory:directory) ifFalse:[
893
09543b968f15 added askFor... utility.
Claus Gittinger <cg@exept.de>
parents: 886
diff changeset
  2748
            note := 'Notice: class seems to have no container yet.'.
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2749
            creatingNew := true.
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2750
        ] ifTrue:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2751
            creatingNew := false.
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2752
        ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2753
893
09543b968f15 added askFor... utility.
Claus Gittinger <cg@exept.de>
parents: 886
diff changeset
  2754
        rslt := self 
09543b968f15 added askFor... utility.
Claus Gittinger <cg@exept.de>
parents: 886
diff changeset
  2755
                askForContainer:boxText title:title note:note
1533
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  2756
                initialModule:module initialPackage:directory initialFileName:fileName
1030
7a798aa0735e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1026
diff changeset
  2757
                forNewContainer:true.        
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2758
893
09543b968f15 added askFor... utility.
Claus Gittinger <cg@exept.de>
parents: 886
diff changeset
  2759
        rslt isNil ifTrue:[
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2760
            ^ false
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2761
        ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2762
893
09543b968f15 added askFor... utility.
Claus Gittinger <cg@exept.de>
parents: 886
diff changeset
  2763
        module := rslt at:#module.
1533
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  2764
        directory := rslt at:#package.
893
09543b968f15 added askFor... utility.
Claus Gittinger <cg@exept.de>
parents: 886
diff changeset
  2765
        fileName := rslt at:#fileName.
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2766
    ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2767
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2768
    (fileName endsWith:',v') ifTrue:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2769
        fileName := fileName copyWithoutLast:2
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2770
    ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2771
    (fileName endsWith:'.st') ifFalse:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2772
        fileName := fileName , '.st'
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
952
c75976ac7b7f when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2775
    "/ 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
  2776
    "/ check for this ...
c75976ac7b7f when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2777
1533
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  2778
    requiredPackage := ((module ? '') , ':' , (directory ? '')) asSymbol.
952
c75976ac7b7f when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2779
    requiredPackage ~= aClass package ifTrue:[
c75976ac7b7f when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2780
"/        doCheckinWithoutAsking ifFalse:[
c75976ac7b7f when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2781
"/            (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
  2782
"/            ifFalse:[
c75976ac7b7f when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2783
"/                ^ false
c75976ac7b7f when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2784
"/            ]
c75976ac7b7f when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2785
"/        ].
1077
6b1bcfd27521 renamed: #allSelectorsAndMethodsDo: into: #instAndClassSelectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 1076
diff changeset
  2786
        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
  2787
        aClass package:requiredPackage.
c75976ac7b7f when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2788
    ].
c75976ac7b7f when checking in initially, change packageID of class
Claus Gittinger <cg@exept.de>
parents: 937
diff changeset
  2789
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2790
    info := aClass revisionInfo.
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2791
    info notNil ifTrue:[
2063
502166975e05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  2792
        (info repositoryPathName isNil) ifTrue:[
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2793
            info := nil
2063
502166975e05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  2794
        ].
502166975e05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  2795
"/        (info includesKey:#repositoryPathName) ifFalse:[
502166975e05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  2796
"/            info := nil
502166975e05 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2050
diff changeset
  2797
"/        ]
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2798
    ].
2175
50349cb87bf4 changed:
fm
parents: 2161
diff changeset
  2799
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2800
    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
  2801
        true "doCheckinWithoutAsking" ifFalse:[
979
2374556f8a09 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 977
diff changeset
  2802
            answer := Dialog 
2374556f8a09 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 977
diff changeset
  2803
                 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
  2804
                 labels:(resources array:#( 'Cancel' 'No' 'Yes')).
979
2374556f8a09 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 977
diff changeset
  2805
            answer isNil ifTrue:[^ false].
2374556f8a09 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 977
diff changeset
  2806
        ] ifTrue:[
2374556f8a09 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 977
diff changeset
  2807
            answer := true.
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2808
        ].
979
2374556f8a09 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 977
diff changeset
  2809
        answer ifTrue:[
2175
50349cb87bf4 changed:
fm
parents: 2161
diff changeset
  2810
            CVSSourceCodeManager 
50349cb87bf4 changed:
fm
parents: 2161
diff changeset
  2811
                        updateVersionMethodOf:aClass 
50349cb87bf4 changed:
fm
parents: 2161
diff changeset
  2812
                        for:(mgr initialRevisionStringFor:aClass 
979
2374556f8a09 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 977
diff changeset
  2813
                                               inModule:module 
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
  2814
                                               directory:directory 
979
2374556f8a09 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 977
diff changeset
  2815
                                               container:fileName).
2374556f8a09 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 977
diff changeset
  2816
        ].
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2817
    ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2818
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  2819
    (self checkForExistingModule:module using:mgr allowCreate:(createDirs or:[creatingNew]))
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  2820
    ifFalse:[^ false].
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2821
    LastModule := module.
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2822
1704
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  2823
    (self checkForExistingModule:module directory:directory using:mgr allowCreate:(createDirs or:[creatingNew]))
1158
453b58c2a059 refactored slightly
Claus Gittinger <cg@exept.de>
parents: 1157
diff changeset
  2824
    ifFalse:[^ false].
1533
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  2825
    LastPackage := directory.
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2826
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2827
    "/
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2828
    "/ check for the container itself
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2829
    "/
1787
db6157670930 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1782
diff changeset
  2830
    (mgr checkForExistingContainer:fileName inModule:module directory:directory) ifTrue:[
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2831
        creatingNew ifTrue:[
1533
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  2832
            self warn:(resources string:'Container for %1 already exists in %2/%3.' with:fileName with:module with:directory) withCRs.
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2833
        ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2834
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2835
"/            (oldModule notNil
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2836
"/            and:[(oldModule ~= module)
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2837
"/                 or:[oldPackage ~= package
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2838
"/                 or:[oldFileName ~= fileName]]])
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2839
"/            ifFalse:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2840
"/                self warn:(resources string:'no change').
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2841
"/                ^ false.
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2842
"/            ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2843
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2844
        doCheckinWithoutAsking ifFalse:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2845
            (Dialog 
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2846
                confirm:(resources string:'check %1 into the existing container
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2847
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2848
    %2 / %3 / %4  ?'
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2849
                                with:className
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2850
                                with:module 
1533
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  2851
                                with:directory 
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2852
                                with:fileName) withCRs
1076
4adaffbd7ab0 upper-case
Claus Gittinger <cg@exept.de>
parents: 1070
diff changeset
  2853
                noLabel:'Cancel') 
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2854
            ifFalse:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2855
                ^ false.
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2856
            ].  
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2857
        ].  
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2858
2175
50349cb87bf4 changed:
fm
parents: 2161
diff changeset
  2859
        CVSSourceCodeManager 
50349cb87bf4 changed:
fm
parents: 2161
diff changeset
  2860
                        updateVersionMethodOf:aClass 
50349cb87bf4 changed:
fm
parents: 2161
diff changeset
  2861
                        for:('$' , 'Header' , '$'). "/ concatenated to avoid RCS-expansion
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2862
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2863
        oldFileName notNil ifTrue:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2864
            msg := ('forced checkin / source container change from ' , oldFileName).
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2865
        ] ifFalse:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2866
            msg := 'defined source container'
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2867
        ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2868
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2869
        (forceCheckIn := doCheckinWithoutAsking) ifFalse:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2870
            (mgr
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2871
                checkinClass:aClass 
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2872
                fileName:fileName 
1533
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  2873
                directory:directory 
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2874
                module:module 
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2875
                logMessage:msg)
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2876
            ifFalse:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2877
                doCheckinWithoutAsking ifFalse:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2878
                    (Dialog 
1076
4adaffbd7ab0 upper-case
Claus Gittinger <cg@exept.de>
parents: 1070
diff changeset
  2879
                        confirm:'No easy merge seems possible; force checkin (no merge) ?'
4adaffbd7ab0 upper-case
Claus Gittinger <cg@exept.de>
parents: 1070
diff changeset
  2880
                        noLabel:'Cancel') 
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2881
                    ifFalse:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2882
                        ^ false.
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2883
                    ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2884
                ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2885
                forceCheckIn := true.
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2886
            ]
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2887
        ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2888
        forceCheckIn ifTrue:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2889
            (mgr
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2890
                checkinClass:aClass 
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2891
                fileName:fileName 
1533
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  2892
                directory:directory 
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2893
                module:module 
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2894
                logMessage:msg
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2895
                force:true)
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2896
            ifFalse:[
1076
4adaffbd7ab0 upper-case
Claus Gittinger <cg@exept.de>
parents: 1070
diff changeset
  2897
                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
  2898
                ^ false.
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2899
            ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2900
        ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2901
        ^ true
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2902
    ] ifFalse:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2903
        (createContainer or:[creatingNew]) ifFalse:[
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2904
            (Dialog
1076
4adaffbd7ab0 upper-case
Claus Gittinger <cg@exept.de>
parents: 1070
diff changeset
  2905
                 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
  2906
                                      with:fileName with:module with:directory) withCRs
1076
4adaffbd7ab0 upper-case
Claus Gittinger <cg@exept.de>
parents: 1070
diff changeset
  2907
                 noLabel:'Cancel') ifFalse:[
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2908
                ^ false
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2909
            ]
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2910
        ]
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2911
    ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2912
1882
8b3a4c2a2c2a when creating a new container, set the package of all methods.
Claus Gittinger <cg@exept.de>
parents: 1879
diff changeset
  2913
    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
  2914
    aClass package:requiredPackage.
1913
d87c1ed5bf1f oops - halt
Claus Gittinger <cg@exept.de>
parents: 1911
diff changeset
  2915
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2916
    (mgr
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2917
            createContainerFor:aClass
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2918
            inModule:module
1533
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  2919
            package:directory
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2920
            container:fileName) ifFalse:[
1076
4adaffbd7ab0 upper-case
Claus Gittinger <cg@exept.de>
parents: 1070
diff changeset
  2921
        self warn:(resources string:'Failed to create container.').
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2922
        ^ false.
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2923
    ].
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2924
    ^ true
1533
6897306a3cda *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1522
diff changeset
  2925
1913
d87c1ed5bf1f oops - halt
Claus Gittinger <cg@exept.de>
parents: 1911
diff changeset
  2926
    "Modified: / 21-11-2006 / 17:35:02 / cg"
876
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2927
!
461b86272f48 more functionality moved to SCMUtility
Claus Gittinger <cg@exept.de>
parents: 875
diff changeset
  2928
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2929
diffSetOfProject:aProject againstRepositoryVersionFrom:aDateOrNilForNewest
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2930
    |classesInImage filesInImage module directory perProjectInfo 
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2931
     classesNotInRepository filesNotInImage classesDeletedInRepository
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2932
     classesModifiedInImage classesNotReallyModified classesReallyModified classesModifiedInRepository 
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2933
     classesAddedInImage extensionMethods extensionsInImage extensionsInRepository extensionDiffs
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2934
     box doCleanup resources diffSet def autoloadedFilesNotInImage 
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2935
     autoloadedClassesInImage autoloadedFilesInImage|
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2936
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2937
    resources := self classResources.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2938
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2939
    module := aProject asPackageId module.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2940
    directory := aProject asPackageId directory.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2941
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2942
    perProjectInfo := SourceCodeManager revisionsInModule:module directory:directory fromDate:aDateOrNilForNewest.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2943
    perProjectInfo := perProjectInfo ? #().
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2944
    perProjectInfo := perProjectInfo select:[:info | info key asFilename hasSuffix:'st'].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2945
    perProjectInfo := Dictionary withAssociations:perProjectInfo.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2946
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2947
    classesInImage := Smalltalk allClassesInPackage:aProject.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2948
    autoloadedClassesInImage := classesInImage reject:[:cls | cls isLoaded].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2949
    classesInImage := classesInImage select:[:cls | cls isLoaded].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2950
    classesInImage := classesInImage reject:[:cls | cls isPrivate].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2951
    filesInImage := (classesInImage collect:[:cls | cls classBaseFilename]) asSet.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2952
    autoloadedFilesInImage := (autoloadedClassesInImage collect:[:cls | cls classBaseFilename]) asSet.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2953
    "/ any differences ?
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2954
    classesNotInRepository := classesInImage reject:[:cls | (perProjectInfo includesKey:cls classBaseFilename)].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2955
    classesDeletedInRepository := classesInImage select:[:cls | (perProjectInfo at:cls classBaseFilename ifAbsent:nil) == #deleted].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2956
    perProjectInfo := perProjectInfo reject:[:v | v == #deleted].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2957
    filesNotInImage := perProjectInfo keys reject:[:file | (filesInImage includes:file)].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2958
    filesNotInImage := filesNotInImage reject:[:file | (autoloadedFilesInImage includes:file)].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2959
    filesNotInImage remove:'extensions.st' ifAbsent:[].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2960
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2961
    "/ if comparing against the newest, only look for chaged stuff
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2962
    classesModifiedInImage := classesInImage select:[:cls | ChangeSet current includesChangeForClassOrMetaclass:cls].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2963
    classesModifiedInImage := classesModifiedInImage \ classesNotInRepository.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2964
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2965
    classesModifiedInRepository := classesInImage select:[:cls | |v|
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2966
                                                    v := (perProjectInfo at:cls classBaseFilename ifAbsent:nil).
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2967
                                                    v notNil and:[ cls isLoaded and:[ v > cls revision ]]].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2968
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2969
    "/ stupid: as we do not have any revision information for extensions (sigh);
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2970
    "/ 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
  2971
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2972
    extensionMethods := Smalltalk allExtensionsForPackage:aProject.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2973
    extensionsInImage := ChangeSet forExistingMethods:extensionMethods.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2974
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2975
    [
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2976
        |s extensionsRevision|
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2977
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2978
        extensionsRevision := perProjectInfo at:'extensions.st' ifAbsent:#newest.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2979
        s := SourceCodeManager
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2980
                streamForClass:nil fileName:'extensions.st' revision:extensionsRevision 
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2981
                directory:directory module:module cache:true.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2982
        s isNil ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2983
            extensionsInRepository := ChangeSet new.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2984
        ] ifFalse:[
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2985
            extensionsInRepository := ChangeSet fromStream:s.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2986
            s close.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2987
        ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2988
    ] value.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2989
    extensionDiffs := extensionsInRepository diffSetsAgainst:extensionsInImage.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2990
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2991
    diffSet := extensionDiffs copy.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2992
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2993
    aDateOrNilForNewest isNil ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2994
        "/ we could do the same as above for each class.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2995
        "/ however - as we do have change-info and revision info, we can avoid checking out
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2996
        "/ for all classes which are not changed and which have the same version info.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2997
        classesModifiedInImage notEmpty ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2998
            classesReallyModified :=
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  2999
                classesModifiedInImage select:[:eachChangedClass |
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3000
                    |currentVersion repositoryVersion s stFile diffs|
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3001
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3002
                    stFile := eachChangedClass classBaseFilename.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3003
                    s := SourceCodeManager
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3004
                        streamForClass:nil fileName:stFile revision:#newest 
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3005
                        directory:directory module:module cache:true.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3006
                    repositoryVersion := ChangeSet fromStream:s.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3007
                    s close.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3008
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3009
                    currentVersion := ChangeSet forExistingClass:eachChangedClass.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3010
                    diffs := repositoryVersion diffSetsAgainst:currentVersion .
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3011
                    diffSet addDiffSet:diffs.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3012
                    diffs notEmpty
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3013
                ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3014
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3015
            classesNotReallyModified := classesModifiedInImage \ classesReallyModified.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3016
        ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3017
    ] ifFalse:[
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3018
        classesReallyModified :=
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3019
            classesInImage select:[:eachClass |
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3020
                |currentVersion repositoryVersion s stFile stRevision diffs|
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3021
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3022
                stFile := eachClass classBaseFilename.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3023
                stRevision := perProjectInfo at:stFile ifAbsent:#newest.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3024
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3025
                s := SourceCodeManager
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3026
                        streamForClass:nil fileName:stFile revision:stRevision 
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3027
                        directory:directory module:module cache:true.
2295
505293d1cfbd changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2294
diff changeset
  3028
                s isNil ifTrue:[
505293d1cfbd changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2294
diff changeset
  3029
                    repositoryVersion := ChangeSet new.
505293d1cfbd changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2294
diff changeset
  3030
                ] ifFalse:[
505293d1cfbd changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2294
diff changeset
  3031
                    repositoryVersion := ChangeSet fromStream:s.
505293d1cfbd changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2294
diff changeset
  3032
                    s close.
505293d1cfbd changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2294
diff changeset
  3033
                ].
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3034
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3035
                currentVersion := ChangeSet forExistingClass:eachClass.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3036
                diffs := repositoryVersion diffSetsAgainst:currentVersion .
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3037
                diffSet addDiffSet:diffs.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3038
                diffs notEmpty
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3039
            ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3040
    ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3041
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3042
    filesNotInImage notEmpty ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3043
        "/ first, check if these are autoloaded classes which have NOT been installed
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3044
        "/ (for example, due to a --quick argument during startup)
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3045
        autoloadedFilesNotInImage := OrderedCollection new.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3046
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3047
        def := ProjectDefinition definitionClassForPackage:aProject createIfAbsent:false projectType:nil.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3048
        def notNil ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3049
            def classNamesAndAttributesDo:[:eachClassname :eachAttributes | 
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3050
                |cls eachFileName isAutoload|
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3051
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3052
                cls := Smalltalk classNamed:eachClassname.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3053
                cls isNil ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3054
                    isAutoload := eachAttributes includes:#autoload.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3055
                    isAutoload ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3056
                        eachFileName := Smalltalk fileNameForClass:eachClassname.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3057
                        autoloadedFilesNotInImage add:(eachFileName , '.st')
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3058
                    ]
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3059
                ]
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3060
            ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3061
        ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3062
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3063
        (filesNotInImage \ autoloadedFilesNotInImage) do:[:eachSTFile |
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3064
            |s chgSet classDefinitions|
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3065
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3066
            s := SourceCodeManager
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3067
                streamForClass:nil fileName:eachSTFile revision:#newest directory:directory module:module cache:true.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3068
            chgSet := ChangeSet fromStream:s.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3069
            s close.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3070
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3071
            diffSet onlyInReceiver addAll:chgSet
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3072
        ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3073
    ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3074
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3075
    classesModifiedInRepository notEmpty ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3076
        classesModifiedInRepository do:[:eachClass|
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3077
            |s diffs repositoryVersion currentVersion|
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3078
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3079
            s := SourceCodeManager
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3080
                streamForClass:eachClass fileName:nil revision:#newest directory:directory module:module cache:true.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3081
            repositoryVersion := ChangeSet fromStream:s.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3082
            s close.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3083
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3084
            currentVersion := ChangeSet forExistingClass:eachClass.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3085
            diffs := repositoryVersion diffSetsAgainst:currentVersion .
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3086
            diffSet addDiffSet:diffs.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3087
        ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3088
    ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3089
    classesDeletedInRepository notEmpty ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3090
"/ self halt.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3091
    ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3092
    classesNotInRepository notEmpty ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3093
        "/ if there are no changeSet entries for those classes, they seem to be
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3094
        "/ no longer in the repository (possibly moved ?)
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3095
        "/ 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
  3096
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3097
        classesAddedInImage := classesNotInRepository \ classesDeletedInRepository.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3098
        classesAddedInImage do:[:eachAddedClass |
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3099
            |currentVersion|
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3100
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3101
            currentVersion := ChangeSet forExistingClass:eachAddedClass.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3102
            diffSet onlyInArg addAll:currentVersion.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3103
        ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3104
    ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3105
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3106
    diffSet isEmpty ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3107
        "/ Dialog information:(resources string:'%1 is up-to-date.' with:eachProject allBold).
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3108
        Transcript showCR:('%1 is up-to-date.' bindWith:aProject allBold).
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3109
        (ChangeSet current includesChangeForPackage:aProject) ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3110
            (Dialog confirm:('%1 is up-to-date.\\Cleanup ChangeSet ?' bindWith:aProject allBold) withCRs) ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3111
                ChangeSet current condenseChangesForPackage:aProject.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3112
            ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3113
        ].
2286
ad425b1c40ab changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2284
diff changeset
  3114
        ^ diffSet.
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3115
    ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3116
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3117
    "/ 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
  3118
    "/ give user a chance to cleanup the changeSet here.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3119
    aDateOrNilForNewest isNil ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3120
        classesNotReallyModified notEmptyOrNil ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3121
            doCleanup := false.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3122
            box := Dialog
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3123
                forRequestText:(resources 
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3124
                                    stringWithCRs:'The following classes from %1 are equal to the repository version.\\Remove entries from the changeSet ?'
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3125
                                    with:aProject allBold) 
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3126
                editViewClass:ListView
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3127
                lines:10 columns:20 
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3128
                initialAnswer:nil model:nil
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3129
                setupWith:
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3130
                   [:v :d | 
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3131
                            |removeButton|
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3132
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3133
                            v list:classesNotReallyModified.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3134
                            removeButton := Button label:(resources string:'Cleanup ChangeSet').
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3135
                            removeButton action:[ doCleanup := true. box okPressed. ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3136
                            d addButton:removeButton after:(d okButton).
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3137
                            d okButton label:(resources string:'Continue').
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3138
                            d okButton isReturnButton:false.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3139
                            removeButton isReturnButton:true.
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3140
                   ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3141
            box open.
2286
ad425b1c40ab changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2284
diff changeset
  3142
            box accepted ifTrue:[
ad425b1c40ab changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2284
diff changeset
  3143
                doCleanup ifTrue:[
ad425b1c40ab changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2284
diff changeset
  3144
                    classesNotReallyModified do:[:class |
ad425b1c40ab changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2284
diff changeset
  3145
                        ChangeSet current condenseChangesForClass:class.
ad425b1c40ab changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2284
diff changeset
  3146
                    ]
ad425b1c40ab changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2284
diff changeset
  3147
                ].
ad425b1c40ab changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2284
diff changeset
  3148
            ]
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3149
        ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3150
    ].
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3151
    ^ diffSet
2286
ad425b1c40ab changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2284
diff changeset
  3152
2295
505293d1cfbd changed: #diffSetOfProject:againstRepositoryVersionFrom:
Claus Gittinger <cg@exept.de>
parents: 2294
diff changeset
  3153
    "Modified: / 01-11-2010 / 21:02:52 / cg"
2189
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3154
!
Claus Gittinger <cg@exept.de>
parents: 2184
diff changeset
  3155
2383
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3156
ensureCorrectVersionMethodsInClass:aClass using:aManager
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3157
    |theMetaclass src newSrc versionMethodName oldVersionMethodName|
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3158
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3159
    theMetaclass := aClass theMetaclass.
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3160
    versionMethodName := aManager nameOfVersionMethodInClasses.
2442
7ecd9a4248bb changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents: 2426
diff changeset
  3161
    oldVersionMethodName := aClass nameOfOldVersionMethod.
2383
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3162
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3163
    (theMetaclass includesSelector:versionMethodName) ifTrue:[
2442
7ecd9a4248bb changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents: 2426
diff changeset
  3164
"/        (theMetaclass includesSelector:oldVersionMethodName) ifTrue:[
7ecd9a4248bb changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents: 2426
diff changeset
  3165
"/            theMetaclass removeSelector:oldVersionMethodName.   
7ecd9a4248bb changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents: 2426
diff changeset
  3166
"/        ].
2383
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3167
        "/ ensure that my version method is parsable (contains $'s)
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3168
        src := (theMetaclass compiledMethodAt:versionMethodName) source.
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3169
        src notNil ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3170
            newSrc := aManager ensureDollarsInVersionMethod:src.
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3171
            newSrc ~= src ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3172
                theMetaclass compile:newSrc.
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3173
            ]
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3174
        ].
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3175
    ] ifFalse:[
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3176
        (theMetaclass includesSelector:oldVersionMethodName) ifTrue:[
2487
c8f4417b9edc changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents: 2484
diff changeset
  3177
            "/ but make sure, it is a version method for this sourcecodemanager...
c8f4417b9edc changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents: 2484
diff changeset
  3178
            (theMetaclass methodDictionary keys count:[:sel | sel startsWith:'version']) size == 1 ifTrue:[
c8f4417b9edc changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents: 2484
diff changeset
  3179
                src := (theMetaclass compiledMethodAt:oldVersionMethodName) source.
c8f4417b9edc changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents: 2484
diff changeset
  3180
                (src startsWith:oldVersionMethodName) ifTrue:[
c8f4417b9edc changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents: 2484
diff changeset
  3181
                    newSrc := versionMethodName 
c8f4417b9edc changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents: 2484
diff changeset
  3182
                              , (src copyFrom:(oldVersionMethodName size + 1))
c8f4417b9edc changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents: 2484
diff changeset
  3183
                ].
c8f4417b9edc changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents: 2484
diff changeset
  3184
                theMetaclass compile:newSrc.
c8f4417b9edc changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents: 2484
diff changeset
  3185
            ]
2383
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3186
        ].
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3187
    ].
2442
7ecd9a4248bb changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents: 2426
diff changeset
  3188
2487
c8f4417b9edc changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents: 2484
diff changeset
  3189
    "Modified: / 20-08-2011 / 14:40:27 / cg"
2383
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3190
!
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3191
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3192
getLogMessageForClassCheckinTakingDefaultsFromPreviousLogInfo:aLogInfoOrNil forClass:aClass valuesInto:aBlock
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3193
    "returns 2 values"
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3194
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3195
    |initialLogMessage checkinInfo logMessage|
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3196
    
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3197
    "/ heuristics for a useful initial log message...
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3198
    aLogInfoOrNil isNil ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3199
        initialLogMessage := (self goodInitialLogMessageForCheckinClassOfClass:aClass) ? ''.
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3200
        "/ initial checkin ?
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3201
        (aClass package isNil or:[aClass revision isNil]) ifTrue:[ 
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3202
            initialLogMessage := 'initial checkin\\' withCRs , initialLogMessage
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3203
        ].
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3204
        checkinInfo := self 
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3205
                        getCheckinInfoFor:aClass name 
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3206
                        initialAnswer:initialLogMessage.
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3207
        checkinInfo isNil ifTrue:[^ false].
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3208
        logMessage := checkinInfo logMessage.
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3209
    ] ifFalse:[
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3210
        aLogInfoOrNil isString ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3211
            "soon obsolete..."    
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3212
            logMessage := aLogInfoOrNil
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3213
        ] ifFalse:[ 
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3214
            checkinInfo := aLogInfoOrNil.
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3215
            logMessage := checkinInfo logMessage.
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3216
        ].
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3217
    ].
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3218
    logMessage notNil ifTrue:[  
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3219
        logMessage := logMessage asSingleByteStringReplaceInvalidWith:$?
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3220
    ].
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3221
    aBlock value:logMessage value:checkinInfo.
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3222
    ^ true
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3223
!
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3224
976
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3225
removeSourceContainerForClass:aClass
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3226
    "show container & let user confirm twice."
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
    ^ self removeSourceContainerForClass:aClass confirm:true warn:true
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3229
!
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3230
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3231
removeSourceContainerForClass:aClass confirm:doConfirm warn:doWarn
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3232
    "show container & optionally let user confirm twice."
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3233
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
  3234
    |module directory fileName info mgr resources|
976
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3235
1377
0fd99dd003f6 classResources now understood by all classes
Claus Gittinger <cg@exept.de>
parents: 1375
diff changeset
  3236
    resources := self classResources.
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
    aClass isLoaded ifFalse:[
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3239
        doWarn ifTrue:[
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3240
            self warn:(resources string:'Please load the class first.').
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3241
        ].
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3242
        ^ false.
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3243
    ].
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3244
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
    "/ 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
  3247
    "/ if so, take that as a default.
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3248
    "/
1782
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3249
    mgr := self sourceCodeManagerFor:aClass.
976
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3250
    mgr isNil ifTrue:[
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3251
        ^ false
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3252
    ].
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3253
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3254
    info := mgr sourceInfoOfClass:aClass.
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3255
    info notNil ifTrue:[
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3256
        (info includesKey:#module) ifTrue:[
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3257
            module := (info at:#module).
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3258
        ].
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3259
        (info includesKey:#directory) ifTrue:[
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
  3260
            directory := (info at:#directory).
976
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3261
        ].
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3262
        fileName := mgr containerFromSourceInfo:info.
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3263
    ].
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3264
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3265
    module isNil ifTrue:[
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3266
        doWarn ifTrue:[
1423
d15575ef3dba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1414
diff changeset
  3267
            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
  3268
        ].
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3269
        ^ false.
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3270
    ].
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
  3271
    directory isNil ifTrue:[
976
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3272
        doWarn ifTrue:[
1423
d15575ef3dba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1414
diff changeset
  3273
            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
  3274
        ].
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3275
        ^ false.
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3276
    ].
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3277
    fileName isNil ifTrue:[
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3278
        doWarn ifTrue:[
1423
d15575ef3dba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1414
diff changeset
  3279
            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
  3280
        ].
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3281
        ^ false.
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3282
    ].
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3283
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3284
    OperatingSystem isMSDOSlike ifTrue:[
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
  3285
        "cvs expects unix-filenames"
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
  3286
        module := module copy replaceAll:$\ with:$/.
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
  3287
        directory := directory copy replaceAll:$\ with:$/.
976
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3288
    ].
1787
db6157670930 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1782
diff changeset
  3289
    (mgr checkForExistingContainer:fileName inModule:module directory:directory) ifFalse:[
976
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3290
        doWarn ifTrue:[
1423
d15575ef3dba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1414
diff changeset
  3291
            self warn:(resources stringWithCRs:'Class has no source container.') .
976
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3292
        ].
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3293
        ^ false.
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3294
    ].
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3295
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3296
    doConfirm ifTrue:[
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3297
        (Dialog
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3298
            choose:(resources 
1423
d15575ef3dba *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1414
diff changeset
  3299
                        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
  3300
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3301
container:    %2 / %3 / %4
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3302
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3303
Really remove ?' 
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3304
                        with:aClass name 
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3305
                        with:module 
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
  3306
                        with:directory 
976
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3307
                        with:fileName) 
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3308
            labels:(Array 
1129
89049988e8d3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1122
diff changeset
  3309
                        with:(resources string:'No') 
89049988e8d3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1122
diff changeset
  3310
                        with:(resources string:'Remove'))
976
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3311
            values:#(false true)
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3312
            default:false) ifFalse:[
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3313
            ^ false.
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3314
        ].
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3315
    ].
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3316
1921
ab2e300fbc9c oops - removeContainer for class got corrupted
Claus Gittinger <cg@exept.de>
parents: 1919
diff changeset
  3317
    (mgr removeContainer:fileName
ab2e300fbc9c oops - removeContainer for class got corrupted
Claus Gittinger <cg@exept.de>
parents: 1919
diff changeset
  3318
                inModule:module
ab2e300fbc9c oops - removeContainer for class got corrupted
Claus Gittinger <cg@exept.de>
parents: 1919
diff changeset
  3319
               directory:directory) ifFalse:[
976
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3320
        doWarn ifTrue:[
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3321
            self warn:(resources string:'failed to remove container.').
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3322
        ].
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3323
        ^ true.
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3324
    ].
cedcdc7e405c utitity to remove a container
Claus Gittinger <cg@exept.de>
parents: 973
diff changeset
  3325
    ^ false
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
  3326
1921
ab2e300fbc9c oops - removeContainer for class got corrupted
Claus Gittinger <cg@exept.de>
parents: 1919
diff changeset
  3327
    "Modified: / 05-12-2006 / 18:40:16 / cg"
1000
3687dbf412db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 998
diff changeset
  3328
!
3687dbf412db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 998
diff changeset
  3329
1026
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3330
repositoryLogOf:aClass onto:aStream
2050
037e794f5857 +option to show a short revision log
Claus Gittinger <cg@exept.de>
parents: 2042
diff changeset
  3331
    self repositoryLogOf:aClass short:false onto:aStream
037e794f5857 +option to show a short revision log
Claus Gittinger <cg@exept.de>
parents: 2042
diff changeset
  3332
!
037e794f5857 +option to show a short revision log
Claus Gittinger <cg@exept.de>
parents: 2042
diff changeset
  3333
037e794f5857 +option to show a short revision log
Claus Gittinger <cg@exept.de>
parents: 2042
diff changeset
  3334
repositoryLogOf:aClass short:shortOrNot onto:aStream
1026
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3335
    |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
  3336
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3337
    info := aClass revisionInfo.
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3338
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3339
    rv := aClass binaryRevision.
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3340
    rv notNil ifTrue:[
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3341
        aStream nextPutLine:'**** Loaded classes binary information ****'; cr.
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3342
        aStream nextPutLine:'  Binary based upon : ' , rv.
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3343
        aStream cr.
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3344
    ].
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3345
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3346
    info notNil ifTrue:[
2041
fb85bf748dbb *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2013
diff changeset
  3347
        (info revision notNil) ifFalse:[
1026
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3348
            aStream nextPutLine:'WARNING:'; cr.
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3349
            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
  3350
            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
  3351
            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
  3352
            aStream cr.
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3353
        ].
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3354
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3355
        aStream nextPutLine:'**** Classes source information ****'; cr.
2042
e2311b66ad94 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2041
diff changeset
  3356
        s := info repositoryPathName.
1026
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3357
        s notNil ifTrue:[
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3358
            aStream nextPutLine:'  Source repository : ' , s
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3359
        ].
2042
e2311b66ad94 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2041
diff changeset
  3360
        aStream nextPutLine:'  Filename ........ : ' , (info fileName ? '?').
e2311b66ad94 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2041
diff changeset
  3361
        aStream nextPutLine:'  Revision ........ : ' , (info revision ? '?').
e2311b66ad94 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2041
diff changeset
  3362
        aStream nextPutLine:'  Checkin date .... : ' , (info date  ? '?') , ' ' , 
e2311b66ad94 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2041
diff changeset
  3363
                                                       (info time ? '?'), ' ', 
e2311b66ad94 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2041
diff changeset
  3364
                                                       (info timezone ? '').
e2311b66ad94 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2041
diff changeset
  3365
        aStream nextPutLine:'  Checkin user .... : ' , (info user ? '?').
1026
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3366
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3367
        (info2 := aClass packageSourceCodeInfo) notNil ifTrue:[
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3368
            aStream nextPutLine:'  Repository: ..... : ' , (info2 at:#module ifAbsent:'?').
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3369
            aStream nextPutLine:'  Directory: ...... : ' , (info2 at:#directory ifAbsent:'?').
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3370
        ].
2042
e2311b66ad94 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2041
diff changeset
  3371
        aStream nextPutLine:'  Container ....... : ' , (info repositoryPathName ? '?').
1026
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3372
        aStream cr.
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3373
1782
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3374
        mgr := self sourceCodeManagerFor:aClass.
1026
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3375
        mgr notNil ifTrue:[
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3376
            aStream nextPutLine:'**** Repository information ****'; cr.
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3377
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3378
            module := info2 at:#module ifAbsent:nil.
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3379
            module notNil ifTrue:[
2596
64c21e28c067 changed: #repositoryLogOf:short:onto:
vrany
parents: 2570
diff changeset
  3380
                aStream nextPutLine:('  Repository URL ......: ' , 
64c21e28c067 changed: #repositoryLogOf:short:onto:
vrany
parents: 2570
diff changeset
  3381
                                    ((mgr repositoryNameForPackage:aClass package) ifNil:[mgr repositoryName , ' (default)'])).
1026
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3382
            ].
2050
037e794f5857 +option to show a short revision log
Claus Gittinger <cg@exept.de>
parents: 2042
diff changeset
  3383
            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
  3384
        ]
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3385
    ] ifFalse:[
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3386
        aStream nextPutLine:'No revision info found'.
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3387
        aClass isLoaded ifFalse:[
1835
1aa531a386bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1831
diff changeset
  3388
            aStream cr; nextPutAll:'This is an autoloaded class - you may see more after it is loaded.'
1026
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3389
        ] ifTrue:[
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3390
            fn := aClass classFilename.
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3391
            aClass wasAutoloaded ifTrue:[
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3392
                msg := 'This class was autoloaded.'.
1514
35b125098412 *** empty log message ***
fm
parents: 1503
diff changeset
  3393
                msg := msg , ' (from ''' , fn , ''')'.
1026
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3394
            ] ifFalse:[
1514
35b125098412 *** empty log message ***
fm
parents: 1503
diff changeset
  3395
                msg := 'This class was loaded from ''' , fn , '''.'
1026
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3396
            ].
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3397
            msg notNil ifTrue:[
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3398
                aStream cr; nextPutAll:msg.
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3399
            ]
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3400
        ]
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3401
    ]
1782
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3402
1835
1aa531a386bd *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1831
diff changeset
  3403
    "Modified: / 06-10-2006 / 13:25:22 / cg"
2596
64c21e28c067 changed: #repositoryLogOf:short:onto:
vrany
parents: 2570
diff changeset
  3404
    "Modified: / 12-10-2011 / 18:06:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1726
e9fba6b66dd6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
  3405
!
e9fba6b66dd6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
  3406
e9fba6b66dd6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
  3407
tagClass:aClass as:tag
e9fba6b66dd6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
  3408
    |mgr|
e9fba6b66dd6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
  3409
e9fba6b66dd6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
  3410
    mgr := self sourceCodeManagerFor:aClass.
1782
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3411
    mgr
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3412
        setSymbolicName:tag 
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3413
        revision:nil 
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3414
        overWrite:true 
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3415
        class:aClass.
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3416
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3417
    "Modified: / 12-09-2006 / 13:03:59 / cg"
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3418
!
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3419
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3420
tagClasses:aCollectionOfClasses as:tag
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3421
    |classesPerManager|
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3422
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3423
    classesPerManager := Dictionary new.
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3424
    aCollectionOfClasses 
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3425
        do:[:eachClass | 
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3426
            |manager|
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3427
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3428
            manager := self sourceCodeManagerFor:eachClass.
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3429
            (classesPerManager at:manager ifAbsentPut:[Set new]) add:eachClass
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3430
        ].
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3431
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3432
    classesPerManager keysAndValuesDo:[:manager :classesPerManager|
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3433
        manager
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3434
            setSymbolicName:tag 
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3435
            revision:nil 
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3436
            overWrite:true 
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3437
            classes:classesPerManager.
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3438
    ].
1726
e9fba6b66dd6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
  3439
    ^ true
1782
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3440
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3441
    "Created: / 12-09-2006 / 13:04:29 / cg"
1726
e9fba6b66dd6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
  3442
!
e9fba6b66dd6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
  3443
2602
a8fcee161334 added: #tagPackage:as:
vrany
parents: 2597
diff changeset
  3444
tagPackage: package as:tag
a8fcee161334 added: #tagPackage:as:
vrany
parents: 2597
diff changeset
  3445
a8fcee161334 added: #tagPackage:as:
vrany
parents: 2597
diff changeset
  3446
    self tagClasses:(Smalltalk allClassesInPackage:package) as:tag.
a8fcee161334 added: #tagPackage:as:
vrany
parents: 2597
diff changeset
  3447
a8fcee161334 added: #tagPackage:as:
vrany
parents: 2597
diff changeset
  3448
    "Created: / 12-09-2006 / 13:04:29 / cg"
a8fcee161334 added: #tagPackage:as:
vrany
parents: 2597
diff changeset
  3449
    "Created: / 15-10-2011 / 22:47:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
a8fcee161334 added: #tagPackage:as:
vrany
parents: 2597
diff changeset
  3450
!
a8fcee161334 added: #tagPackage:as:
vrany
parents: 2597
diff changeset
  3451
1726
e9fba6b66dd6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
  3452
tagPath:aPath as:tag using:aManager
1782
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3453
    aManager 
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3454
        setSymbolicName:tag 
1726
e9fba6b66dd6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
  3455
        revision:nil 
e9fba6b66dd6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
  3456
        overWrite:true 
e9fba6b66dd6 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1725
diff changeset
  3457
        path:aPath.
1782
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3458
41b0e8111aea tagIt bulk operation
Claus Gittinger <cg@exept.de>
parents: 1728
diff changeset
  3459
    "Modified: / 12-09-2006 / 12:04:44 / cg"
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3460
! !
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3461
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
  3462
!SourceCodeManagerUtilities methodsFor:'utilities-cvs-helpers'!
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3463
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3464
getMethodVersionsOfClass:aClass selector:selector numberOfRevisions:numberOfRevisionsOrNil
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3465
    "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
  3466
     Return a dictionary associating revision with a changeList entries for that method.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3467
     Unfinished - need a GUI for that."
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3468
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3469
    |mgr theClass revisionLog revisions items s entriesPerRevision previousVersion|
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3470
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3471
    theClass := aClass theNonMetaclass.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3472
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3473
    mgr := self sourceCodeManagerFor:theClass.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3474
    mgr isNil ifTrue:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3475
        self error:'no sourceCodeManager'.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3476
    ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3477
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3478
    revisionLog := mgr
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3479
                        revisionLogOf:theClass
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3480
                        numberOfRevisions:numberOfRevisionsOrNil.
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
    revisions := revisionLog at:#revisions.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3483
    items := revisions collect:[:each | |rev date who|
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3484
                                    rev := each at:#revision.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3485
                                    date := each at:#date.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3486
                                    who := each at:#author.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3487
                                    rev allBold , ' [' , date , ' by ' , who , ']'
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3488
                               ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3489
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3490
    revisions := revisions collect:[:each | each at:#revision].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3491
    revisions addFirst:#current.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3492
    entriesPerRevision := Dictionary new.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3493
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3494
    previousVersion := nil.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3495
    revisions reverseDo:[:eachRevision |
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3496
        |srcStream entries thisVersion|
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3497
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3498
        eachRevision == #current ifTrue:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3499
            s := '' writeStream.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3500
            theClass fileOutOn:s withTimeStamp:false.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3501
            srcStream := s contents readStream.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3502
        ] ifFalse:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3503
            self activityNotification:('checking out revision ' , eachRevision , '...').
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3504
            srcStream := mgr getSourceStreamFor:theClass revision:eachRevision.
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
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3507
        entries := ChangeSet fromStream:srcStream.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3508
        srcStream close.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3509
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3510
        "/ remove all definitions       
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3511
        entries := entries select:[:each | each isMethodChange].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3512
        "/ remove all methods which are for other selectors      
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3513
        entries := entries select:[:each | each selector == selector].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3514
        "/ remove all methods which are for private subclasses      
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3515
        entries := entries select:[:each | each className = aClass name].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3516
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3517
        entries size == 1 ifTrue:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3518
            "/ the method is there
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3519
            thisVersion := entries first.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3520
            (previousVersion notNil and:[previousVersion sameAs:thisVersion]) ifTrue:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3521
                "/ no change
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3522
            ] ifFalse:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3523
                entriesPerRevision at:eachRevision put:thisVersion.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3524
            ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3525
        ] ifFalse:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3526
            "/ the method is not there
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3527
        ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3528
        previousVersion := thisVersion.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3529
    ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3530
    self error:'unfinished code'.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3531
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3532
    "
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3533
     self getMethodVersionsOfClass:MenuPanel selector:#'helpTextForItem:' numberOfRevisions:20
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3534
     self getMethodVersionsOfClass:NewLauncher class selector:#'menu' numberOfRevisions:20
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3535
    "
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3536
! !
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3537
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
  3538
!SourceCodeManagerUtilities methodsFor:'utilities-cvs-user interaction'!
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3539
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3540
askForContainer:boxText title:title note:notice initialModule:initialModule initialPackage:initialPackage initialFileName:initialFileName
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3541
    "open a dialog asking for a source container;
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3542
     return a dictionary containing module, package and filename,
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3543
     or nil if canceled."
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
    ^ self
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3546
        askForContainer:boxText title:title note:notice 
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3547
        initialModule:initialModule initialPackage:initialPackage initialFileName:initialFileName 
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3548
        forNewContainer:true
1026
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3549
!
1f193eb5f877 common code (in Browser, NewBrowser) for revisionLogOf
Claus Gittinger <cg@exept.de>
parents: 1022
diff changeset
  3550
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3551
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
  3552
    "open a dialog asking for a source container;
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3553
     return a dictionary containing module, package and filename,
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3554
     or nil if canceled."
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3555
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3556
    |box y component resources answer
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3557
     moduleHolder packageHolder fileNameHolder
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3558
     module package fileName 
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3559
     knownContainers knownPackages packageUpdater
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3560
     packageBoxComponent fileNameBoxComponent fileNameUpdater|
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3561
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3562
    knownContainers := Set new.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3563
    Smalltalk allClassesDo:[:cls | |pckg|
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3564
        pckg := cls package.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3565
        pckg size > 0 ifTrue:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3566
            knownContainers add:(pckg upTo:$:)
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
    ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3569
    knownContainers := knownContainers asOrderedCollection.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3570
    knownContainers := knownContainers select:[:module | module isBlank not].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3571
    knownContainers sort.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3572
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3573
    packageUpdater := [
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3574
        |theModulePrefix|
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3575
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3576
        theModulePrefix := moduleHolder value , ':'.
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
        Cursor wait showWhile:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3579
            knownPackages := Set new.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3580
            Smalltalk allClassesDo:[:cls | |pckg idx|
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3581
                pckg := cls package.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3582
                pckg size > 0 ifTrue:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3583
                    (pckg startsWith:theModulePrefix) ifTrue:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3584
                        idx := pckg indexOf:$:.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3585
                        knownPackages add:(pckg copyFrom:idx + 1)
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
                ]
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3588
            ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3589
            knownPackages := knownPackages asOrderedCollection.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3590
            knownPackages := knownPackages select:[:package | package isBlank not].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3591
            knownPackages sort.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3592
            packageBoxComponent list:knownPackages.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3593
        ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3594
    ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3595
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3596
    fileNameUpdater := [
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3597
        |module package files|
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3598
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3599
        Cursor read showWhile:[
2209
e3a4510c45f2 Project noProjectID -> PackageId noProjectID
Claus Gittinger <cg@exept.de>
parents: 2200
diff changeset
  3600
            module := moduleHolder value ? (PackageId noProjectID).
e3a4510c45f2 Project noProjectID -> PackageId noProjectID
Claus Gittinger <cg@exept.de>
parents: 2200
diff changeset
  3601
            package := packageHolder value ? (PackageId noProjectID).
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3602
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
  3603
            files := SourceCodeManager getExistingContainersInModule:module directory:package.
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3604
            files := files asOrderedCollection.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3605
            files := files select:[:eachFile | eachFile asFilename hasSuffix:'st'].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3606
            files sort.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3607
            fileNameBoxComponent list:files.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3608
        ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3609
    ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3610
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3611
    moduleHolder := initialModule asValue.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3612
    packageHolder := initialPackage asValue.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3613
    fileNameHolder := initialFileName asValue.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3614
1377
0fd99dd003f6 classResources now understood by all classes
Claus Gittinger <cg@exept.de>
parents: 1375
diff changeset
  3615
    resources := self classResources.
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3616
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3617
    "/
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3618
    "/ open a dialog for this
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3619
    "/
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3620
    box := DialogBox new.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3621
    box label:title.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3622
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3623
    component := box addTextLabel:boxText withCRs.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3624
    component adjust:#left; borderWidth:0.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3625
    box addVerticalSpace.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3626
    box addVerticalSpace.
1000
3687dbf412db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 998
diff changeset
  3627
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3628
    y := box yPosition.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3629
    component := box addTextLabel:(resources string:'Module:').
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3630
    component width:0.4; adjust:#right.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3631
    box yPosition:y.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3632
    component := box addComboBoxOn:moduleHolder tabable:true.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3633
    component list:knownContainers.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3634
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3635
"/    component := box addInputFieldOn:moduleHolder tabable:true.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3636
    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
  3637
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3638
    box addVerticalSpace.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3639
    y := box yPosition.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3640
    component := box addTextLabel:(resources string:'Package:').
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3641
    component width:0.4; adjust:#right.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3642
    box yPosition:y.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3643
    packageBoxComponent := component := box addComboBoxOn:packageHolder tabable:true.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3644
"/    component := box addInputFieldOn:packageHolder tabable:true.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3645
    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
  3646
    packageUpdater value.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3647
    moduleHolder onChangeEvaluate:packageUpdater.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3648
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3649
    box addVerticalSpace.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3650
    y := box yPosition.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3651
    component := box addTextLabel:(resources string:'Filename:').
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3652
    component width:0.4; adjust:#right.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3653
    box yPosition:y.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3654
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3655
    forNewContainer ifTrue:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3656
        component := box addInputFieldOn:fileNameHolder tabable:true.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3657
        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
  3658
    ] ifFalse:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3659
        fileNameBoxComponent := component := box addComboBoxOn:fileNameHolder tabable:true.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3660
        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
  3661
        fileNameUpdater value.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3662
        packageHolder onChangeEvaluate:fileNameUpdater.
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
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3665
    box addVerticalSpace.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3666
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3667
    notice notNil ifTrue:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3668
        component := box addTextLabel:notice.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3669
        component adjust:#left; borderWidth:0.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3670
    ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3671
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3672
    box addVerticalSpace.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3673
    box addAbortAndOkButtons.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3674
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3675
    (YesToAllNotification notNil and:[YesToAllNotification isHandled]) ifTrue:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3676
        component := Button label:'Yes to all'.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3677
        component action:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3678
                            YesToAllNotification queryWith:true.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3679
                            box doAccept.
2253
7d7b0d2d1fe7 changed: #askForContainer:title:note:initialModule:initialPackage:initialFileName:forNewContainer:
Claus Gittinger <cg@exept.de>
parents: 2242
diff changeset
  3680
                            box okPressed.
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3681
                         ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3682
        (DialogBox defaultOKButtonAtLeft) ifTrue:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3683
            box addButton:component after:nil.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3684
        ] ifFalse:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3685
            box addButton:component before:nil.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3686
        ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3687
    ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3688
    (AbortAllSignal isHandled) ifTrue:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3689
        component := Button label:'Cancel all'.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3690
        component action:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3691
                            box hide.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3692
                            AbortAllSignal raiseSignal.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3693
                         ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3694
        (DialogBox defaultOKButtonAtLeft) ifTrue:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3695
            box addButton:component before:nil.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3696
        ] ifFalse:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3697
            box addButton:component after:nil.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3698
        ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3699
    ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3700
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3701
    (YesToAllQuery notNil and:[YesToAllQuery isHandled]) ifTrue:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3702
        answer := YesToAllQuery query.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3703
    ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3704
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3705
    answer isNil ifTrue:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3706
        box showAtPointer.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3707
        answer := box accepted
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3708
    ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3709
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3710
    box destroy.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3711
    answer ifFalse:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3712
        ^ nil
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3713
    ].
1000
3687dbf412db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 998
diff changeset
  3714
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3715
    module := moduleHolder value withoutSpaces.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3716
    package := packageHolder value withoutSpaces.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3717
    fileName := fileNameHolder value withoutSpaces.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3718
    ^ Dictionary new
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3719
        at:#module put:module;
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3720
        at:#package put:package;
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3721
        at:#fileName put:fileName;
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3722
        yourself
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3723
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3724
    "
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3725
     self 
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3726
        askForContainer:'enter container' title:'container' note:'some note'
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3727
        initialModule:'foo' initialPackage:'bar' initialFileName:'baz'        
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3728
    "
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
  3729
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
  3730
    "Modified: / 23-08-2006 / 14:13:04 / cg"
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3731
!
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3732
2570
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3733
askForExistingRevision:boxText title:title class:aClass
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3734
    "open a dialog asking for a containers revision;
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3735
     return a revision number, or nil if canceled."
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3736
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3737
    |mgr sourceInfo module package fileName|
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3738
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3739
    mgr := self sourceCodeManagerFor:aClass.
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3740
    sourceInfo := mgr sourceInfoOfClass:aClass.
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3741
    sourceInfo isNil ifTrue:[^ nil].
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3742
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3743
    package := mgr directoryFromSourceInfo:sourceInfo.
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3744
    module := mgr moduleFromSourceInfo:sourceInfo.  
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3745
    fileName := mgr containerFromSourceInfo:sourceInfo.
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3746
    ^ self
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3747
        askForExistingRevision:boxText 
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3748
        title:title 
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3749
        class:aClass 
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3750
        manager:mgr 
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3751
        module:module package:package 
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3752
        fileName:fileName
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3753
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3754
    "
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3755
     SourceCodeManagerUtilities
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3756
        askForRevisionToCompare:'enter revision'
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3757
        title:'revision'
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3758
        class:Array
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3759
    "
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3760
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3761
    "Modified: / 12-09-2006 / 14:17:04 / cg"
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3762
!
7f1a5b6ce066 added: #askForExistingRevision:title:class:
vrany
parents: 2569
diff changeset
  3763
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
  3764
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
  3765
    "open a dialog asking for a containers revision;
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3766
     return a revision number, or nil if canceled."
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3767
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3768
    |partialLog revisions items newestRev
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3769
     box y component resources 
2325
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3770
     revisionHolder symbolicNames stableRevision releasedRevision
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3771
     tagHolder tagList lockChange|
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3772
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3773
    resources := self classResources.
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3774
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3775
    partialLog := aSourceCodeManager
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3776
        revisionLogOf:clsOrNil
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3777
        numberOfRevisions:20
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3778
        fileName:fileName
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
  3779
        directory:directory 
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3780
        module:module.
1522
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  3781
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3782
    partialLog notNil ifTrue:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3783
        newestRev := partialLog at:#newestRevision.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3784
        revisions := partialLog at:#revisions.
1456
673e4fc61c36 Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents: 1449
diff changeset
  3785
        symbolicNames := partialLog at:#symbolicNames ifAbsent:[].
673e4fc61c36 Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents: 1449
diff changeset
  3786
        symbolicNames notNil ifTrue:[
673e4fc61c36 Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents: 1449
diff changeset
  3787
            stableRevision := symbolicNames at:'stable' ifAbsent:[].
673e4fc61c36 Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents: 1449
diff changeset
  3788
            releasedRevision := symbolicNames at:'released' ifAbsent:[].
2326
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
  3789
            tagList := ((symbolicNames associations sort:[:a :b | self versionString:(a value) isLessThan:(b value)])
2325
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3790
                         collect:[:assoc | assoc key]) reverse.
1456
673e4fc61c36 Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents: 1449
diff changeset
  3791
        ].
673e4fc61c36 Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents: 1449
diff changeset
  3792
            
673e4fc61c36 Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents: 1449
diff changeset
  3793
        items := revisions collect:[:each | |rev date who flag|
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3794
                                        rev := each at:#revision.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3795
                                        date := each at:#date.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3796
                                        who := each at:#author.
1456
673e4fc61c36 Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents: 1449
diff changeset
  3797
                                        rev = stableRevision ifTrue:[
673e4fc61c36 Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents: 1449
diff changeset
  3798
                                            flag := ' Stable' allBold.
673e4fc61c36 Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents: 1449
diff changeset
  3799
                                        ] ifFalse:[rev = releasedRevision ifTrue:[
673e4fc61c36 Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents: 1449
diff changeset
  3800
                                            flag := ' Released' allBold.
673e4fc61c36 Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents: 1449
diff changeset
  3801
                                        ] ifFalse:[
673e4fc61c36 Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents: 1449
diff changeset
  3802
                                            flag := ' '
673e4fc61c36 Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents: 1449
diff changeset
  3803
                                        ]].
673e4fc61c36 Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents: 1449
diff changeset
  3804
                                        rev allBold , flag, ' [' , date , ' by ' , who , ']'
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3805
                                   ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3806
        revisions := revisions collect:[:each | each at:#revision].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3807
    ] ifFalse:[
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
  3808
        newestRev := aSourceCodeManager newestRevisionInFile:fileName directory:directory module:module.
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3809
        revisions := items := nil.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3810
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3811
        newestRev isNil ifTrue:[
1787
db6157670930 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1782
diff changeset
  3812
            (aSourceCodeManager checkForExistingContainer:fileName inModule:module directory:directory)
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3813
            ifFalse:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3814
                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
  3815
This could be due to:
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3816
    - invalid/wrong CVS-Root setting
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3817
    - missing CVS access rights
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3818
        (no access / not logged in)
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3819
    - changed CVSRoot after compilation
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3820
        (i.e. wrong CVS-path in classes version method)
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3821
'.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3822
                ^ nil
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3823
            ]
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3824
        ]
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3825
    ].
2325
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3826
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3827
    lockChange := false.
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3828
    revisionHolder := newestRev asValue.
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3829
    revisionHolder onChangeEvaluate:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3830
        "/ cut off everything after revision
2325
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3831
        |s first words tag|
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3832
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3833
        s := revisionHolder value.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3834
        words := s asCollectionOfWords.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3835
        words size > 0 ifTrue:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3836
            first := words first string.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3837
            first ~= s ifTrue:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3838
                revisionHolder value:first
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3839
            ]
2325
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3840
        ].
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3841
        lockChange ifFalse:[
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3842
            tagHolder value:''
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3843
        ].
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3844
    ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3845
2325
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3846
    tagHolder := '' asValue.
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3847
    tagHolder 
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3848
        onChangeEvaluate:[
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3849
            |tag rev|
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3850
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3851
            (tag := tagHolder value) notEmptyOrNil ifTrue:[
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3852
                rev := symbolicNames at:tag.
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3853
                rev ~= revisionHolder value ifTrue:[
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3854
                    lockChange := true.
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3855
                    revisionHolder value:rev.
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3856
                    lockChange := false.
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3857
                ].
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3858
            ]
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3859
        ].
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3860
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3861
    "/
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3862
    "/ open a dialog for this
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 := DialogBox new.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3865
    box label:title.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3866
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3867
    component := box addTextLabel:boxText withCRs.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3868
    component adjust:#left; borderWidth:0.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3869
    box addVerticalSpace.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3870
    box addVerticalSpace.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3871
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3872
    y := box yPosition.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3873
    component := box addTextLabel:(resources string:'Revision:').
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3874
    component width:0.4; adjust:#right.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3875
    box yPosition:y.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3876
    component := box addComboBoxOn:revisionHolder tabable:true.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3877
    component list:items.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3878
    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
  3879
2325
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3880
    y := box yPosition.
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3881
    component := box addTextLabel:(resources string:'or Tag:').
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3882
    component width:0.4; adjust:#right.
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3883
    box yPosition:y.
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3884
    component := box addComboListOn:tagHolder tabable:true.
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3885
    component list:tagList.
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3886
    component width:0.6; left:0.4.
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3887
    tagList isNil ifTrue:[
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3888
        component disable
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3889
    ].
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3890
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3891
    box addVerticalSpace.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3892
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3893
    box addAbortAndOkButtons.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3894
2325
a15e7231c04f changed:
Claus Gittinger <cg@exept.de>
parents: 2313
diff changeset
  3895
    AbortAllOperationWantedQuery query ifTrue:[
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3896
        (box addAbortButtonLabelled:'Cancel all') action:[AbortAllSignal raise].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3897
    ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3898
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3899
    box showAtPointer.
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
    box accepted ifFalse:[
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3902
        box destroy.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3903
        ^ nil
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3904
    ].
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3905
    box destroy.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3906
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3907
    ^ revisionHolder value withoutSpaces.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3908
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3909
    "
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3910
     SourceCodeManagerUtilities
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3911
        askForRevisionToCompare:'enter revision'
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3912
        title:'revision'
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3913
        class:nil
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3914
        manager:SourceCodeManager 
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3915
        module:'stx'
1666
40429b90ebb6 renamed *package* to *directory* to avoid confusion.
Claus Gittinger <cg@exept.de>
parents: 1533
diff changeset
  3916
        directory:'libbasic'
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3917
        fileName:'Array.st'
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3918
    "
1522
9f457901c268 checkout extensions added
Claus Gittinger <cg@exept.de>
parents: 1519
diff changeset
  3919
2326
c0b55d3a8f08 added: #versionString:isLessThan:
Claus Gittinger <cg@exept.de>
parents: 2325
diff changeset
  3920
    "Modified: / 17-02-2011 / 09:54:54 / cg"
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3921
!
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3922
1426
609f0db77471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1424
diff changeset
  3923
checkAndWarnAboutBadMessagesInClass:aClass checkAgainHolder:checkAgainHolder
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3924
    "check if a class contains message-sends to:
2237
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  3925
        #halt , #halt:
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3926
        #error
2237
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  3927
        #todo , #todo:
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  3928
        (and maybe more in the future)
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  3929
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  3930
     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
  3931
1994
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3932
    |badStuff whatIsBad msg answer labels values defaultAnswer dontShowAgain
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3933
     methodsWithBadStuff resources|
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3934
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3935
    resources := Dialog classResources.
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3936
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3937
    badStuff := #(
2237
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  3938
        ( 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
  3939
        ( 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
  3940
        ( 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
  3941
        ( todo         'send of #todo - unfinished code present?' )
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  3942
        ( todo:        'send of #todo:- unfinished code present?' )
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3943
    ).
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3944
1994
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3945
    methodsWithBadStuff := Set new.
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3946
    whatIsBad := Set new.
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3947
    aClass theNonMetaclass instAndClassSelectorsAndMethodsDo:[:sel :mthd |
2237
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  3948
        |setOfLiterals setOfSentMessages|
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  3949
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  3950
        mthd package = aClass package ifTrue:[
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  3951
            setOfLiterals := mthd literals.  "/ try without parsing first.
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  3952
            (badStuff contains:[:eachEntry | setOfLiterals includes:eachEntry first]) ifTrue:[
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  3953
                setOfSentMessages := mthd messagesSent.
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  3954
                badStuff do:[:eachEntry | 
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  3955
                    (setOfSentMessages includes:eachEntry first) ifTrue:[
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  3956
                        whatIsBad add:eachEntry second.
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  3957
                        methodsWithBadStuff add:mthd.
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  3958
                    ]
96105b41c6a6 changed: #checkAndWarnAboutBadMessagesInClass:checkAgainHolder:
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
  3959
                ].
1000
3687dbf412db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 998
diff changeset
  3960
            ].
3687dbf412db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 998
diff changeset
  3961
        ].
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  3962
    ].
1994
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3963
    whatIsBad isEmpty ifTrue:[^ true].
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3964
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3965
    (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
  3966
        answer := YesToAllQuery query.
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3967
        answer notNil ifTrue:[ ^ answer ].
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3968
    ].
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3969
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3970
    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
  3971
    msg := msg , '\\'.
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3972
    whatIsBad do:[:each |
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3973
        msg := msg , '   ' , each , '\'
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3974
    ].
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3975
    msg := msg , '\'.
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3976
    methodsWithBadStuff size == 1 ifTrue:[
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3977
        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
  3978
                        with:methodsWithBadStuff anElement whoString allBold).
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3979
    ] ifFalse:[
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3980
        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
  3981
                        with:methodsWithBadStuff anElement whoString allBold 
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3982
                        with:methodsWithBadStuff size-1).
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3983
    ].
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3984
    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
  3985
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3986
    (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
  3987
        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
  3988
        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
  3989
        defaultAnswer := #yesToAll.
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3990
    ] ifFalse:[
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3991
        labels := #('No' 'No, Browse' 'Yes').
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3992
        values := #(false #noBrowse true).
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3993
        defaultAnswer := true.
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  3994
    ].
1426
609f0db77471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1424
diff changeset
  3995
1456
673e4fc61c36 Tell about stable and released revisions
Stefan Vogel <sv@exept.de>
parents: 1449
diff changeset
  3996
"/        AbortAllOperationRequest isHandled ifTrue:[
1426
609f0db77471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1424
diff changeset
  3997
"/            labels := #('Cancel All') , labels.
609f0db77471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1424
diff changeset
  3998
"/            values := #(#cancelAll) , values.
609f0db77471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1424
diff changeset
  3999
"/        ].
609f0db77471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1424
diff changeset
  4000
1994
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  4001
    DialogBox aboutToOpenBoxNotificationSignal handle:[:ex |
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  4002
        |box|
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  4003
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  4004
        checkAgainHolder isValueModel ifTrue:[
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  4005
            dontShowAgain := checkAgainHolder value not asValue.
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  4006
            box := ex parameter.
2129
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4007
            box addCheckBox:(resources string:'Do not show this Dialog again (reenable in Launcher).')
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4008
                on:dontShowAgain.
1426
609f0db77471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1424
diff changeset
  4009
        ].
1994
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  4010
        ex proceed.
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  4011
    ] do:[
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  4012
        answer := OptionBox 
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  4013
                      request:msg withCRs
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  4014
                      label:(resources string:'Really CheckIn ?')
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  4015
                      image:(InfoBox iconBitmap)
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  4016
                      buttonLabels:(resources array:labels)
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  4017
                      values:values
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  4018
                      default:defaultAnswer
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  4019
                      onCancel:nil.
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  4020
    ].
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  4021
    answer isNil ifTrue:[
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  4022
        AbortSignal raise.
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  4023
    ].
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  4024
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  4025
    dontShowAgain notNil ifTrue:[
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  4026
        checkAgainHolder value:dontShowAgain value not 
1000
3687dbf412db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 998
diff changeset
  4027
    ].
1994
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  4028
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  4029
    answer == #noBrowse ifTrue:[
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  4030
        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
  4031
        self yesToAllNotification queryWith:false.
1994
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  4032
        ^ false
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  4033
    ].
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  4034
    answer == #cancelAll ifTrue:[
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  4035
        AbortAllSignal raise.
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  4036
    ].
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  4037
    answer == #yesToAll ifTrue:[
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  4038
        YesToAllNotification queryWith:true.
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  4039
        ^ true
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  4040
    ].
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  4041
    answer == #noToAll ifTrue:[
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  4042
        YesToAllNotification queryWith:false.
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  4043
        ^ false
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  4044
    ].
eccaf18ff7a1 which method is bad - offer chance to browse them.
Claus Gittinger <cg@exept.de>
parents: 1988
diff changeset
  4045
    ^ answer
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4046
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4047
    "
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4048
     self checkAndWarnAboutBadMessagesInClass:(SourceCodeManagerUtilities)  
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4049
    "
1460
2e1c304e5b52 Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents: 1456
diff changeset
  4050
!
2e1c304e5b52 Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents: 1456
diff changeset
  4051
2129
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4052
getCheckinInfoFor:aClassNameOrPackageNameString initialAnswer:initialAnswerOrNil
2283
2de925716786 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  4053
    "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
  4054
     and other info (mark as stable, for example).
2de925716786 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  4055
     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
  4056
1704
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4057
    ^ self
2129
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4058
        getCheckinInfoFor:aClassNameOrPackageNameString 
1704
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4059
        initialAnswer:initialAnswerOrNil
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4060
        withQuickOption:false
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4061
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4062
    "
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4063
     SourceCodeManagerUtilities getCheckinInfoFor:'hello' initialAnswer:'bla'
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4064
    "
1460
2e1c304e5b52 Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents: 1456
diff changeset
  4065
2283
2de925716786 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  4066
    "Modified: / 06-07-2010 / 11:22:15 / cg"
1704
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4067
!
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4068
2129
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4069
getCheckinInfoFor:aClassNameOrPackageNameString initialAnswer:initialAnswerOrNil withQuickOption:withQuickOption
2283
2de925716786 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  4070
    "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
  4071
     and other info (mark as stable, for example).
2106
35b6c567ff7e comment
Claus Gittinger <cg@exept.de>
parents: 2097
diff changeset
  4072
     Return the info-object (actually: the dialog) or nil if aborted."
35b6c567ff7e comment
Claus Gittinger <cg@exept.de>
parents: 2097
diff changeset
  4073
35b6c567ff7e comment
Claus Gittinger <cg@exept.de>
parents: 2097
diff changeset
  4074
    |logMsg infoDialog|
35b6c567ff7e comment
Claus Gittinger <cg@exept.de>
parents: 2097
diff changeset
  4075
35b6c567ff7e comment
Claus Gittinger <cg@exept.de>
parents: 2097
diff changeset
  4076
    infoDialog := Tools::CheckinInfoDialog 
2129
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4077
                getCheckinInfoFor:aClassNameOrPackageNameString 
1704
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4078
                initialAnswer:(initialAnswerOrNil ? LastSourceLogMessage)
c048825b966f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1671
diff changeset
  4079
                withQuickOption:withQuickOption.
2106
35b6c567ff7e comment
Claus Gittinger <cg@exept.de>
parents: 2097
diff changeset
  4080
    infoDialog notNil ifTrue:[
35b6c567ff7e comment
Claus Gittinger <cg@exept.de>
parents: 2097
diff changeset
  4081
        logMsg := infoDialog logMessage.
2284
624993d61344 comment
Claus Gittinger <cg@exept.de>
parents: 2283
diff changeset
  4082
        logMsg notEmptyOrNil ifTrue:[
1460
2e1c304e5b52 Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents: 1456
diff changeset
  4083
            LastSourceLogMessage := logMsg
2e1c304e5b52 Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents: 1456
diff changeset
  4084
        ].
2e1c304e5b52 Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents: 1456
diff changeset
  4085
    ].
2106
35b6c567ff7e comment
Claus Gittinger <cg@exept.de>
parents: 2097
diff changeset
  4086
    ^ infoDialog
1460
2e1c304e5b52 Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents: 1456
diff changeset
  4087
2e1c304e5b52 Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents: 1456
diff changeset
  4088
    "
2e1c304e5b52 Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents: 1456
diff changeset
  4089
     SourceCodeManagerUtilities getCheckinInfoFor:'hello' initialAnswer:'bla'
2e1c304e5b52 Setting/deleting symbolic names
Stefan Vogel <sv@exept.de>
parents: 1456
diff changeset
  4090
    "
1501
6bb154127b0f CheckInDialog class moved
Claus Gittinger <cg@exept.de>
parents: 1500
diff changeset
  4091
2283
2de925716786 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2254
diff changeset
  4092
    "Modified: / 06-07-2010 / 11:21:28 / cg"
2129
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4093
!
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4094
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4095
goodInitialLogMessageForCheckinClassOfClass:aClass
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4096
    "figure out, if there were any non-comment changes. 
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4097
     Provide a reasonable initial log message (I am tired of typing in 'comment only')"
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4098
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4099
    |selectorsInChangeSet newSelectors modifiedSelectors
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4100
     classChanges changesForThisClass definitionChangesForThisClass methodChangesForThisClass 
2194
c45cd185ee80 changed: #goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
  4101
     allMethodChangesForThisClass modifiedMethodsForThisClass newMethodsForThisClass removedMethodsForThisClass
2129
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4102
     initialLogStream printSelectors selectorsWithCommentOrFormattingChangeOnly
2194
c45cd185ee80 changed: #goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
  4103
     selectorsWithVariableChangeOnly 
c45cd185ee80 changed: #goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
  4104
     removedSelectors categoryChanges categoryChangeSelectors|
2129
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4105
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4106
    "/ a helper function
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4107
    printSelectors := 
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4108
        [:what :selectors |
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4109
            initialLogStream 
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4110
                nextPutAll:(what,':').
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4111
            selectors size < 5 ifTrue:[
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4112
                selectors size == 1 ifTrue:[
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4113
                    initialLogStream 
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4114
                        print: ' #';
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4115
                        print: (selectors first);
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4116
                        cr.
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4117
                ] ifFalse:[
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4118
                    initialLogStream cr.
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4119
                    selectors asSortedCollection do:[:sel | initialLogStream tab; nextPutAll:'#'; nextPutLine:sel].
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4120
                ]
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4121
            ] ifFalse:[
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4122
                initialLogStream 
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4123
                    print: (selectors size);
2142
d09c9d1b8c46 changed: #goodInitialLogMessageForCheckinClassOfClass:
sr
parents: 2137
diff changeset
  4124
                    print: ' methods';
2129
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4125
                    cr.
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4126
            ].
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4127
        ].
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4128
2312
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4129
    classChanges := ChangeSet current select:[:aChange | aChange isClassChange].
2129
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4130
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4131
    changesForThisClass := classChanges 
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4132
                                select:[:aChange | aChange className = aClass theNonMetaclass name
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4133
                                                   or:[aChange className = aClass theMetaclass name] ].
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4134
2312
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4135
    definitionChangesForThisClass := changesForThisClass select:[:aChange | aChange isMethodChange not].
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
    
2194
c45cd185ee80 changed: #goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
  4151
    removedMethodsForThisClass := allMethodChangesForThisClass 
c45cd185ee80 changed: #goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
  4152
                                select:[:aChange | aChange isMethodRemoveChange].
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.
2313
3dbafc3a51a4 changed:
Claus Gittinger <cg@exept.de>
parents: 2312
diff changeset
  4156
    "/ definition?
2312
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4157
    "/ suppress definition-message if initial checkin
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4158
    (aClass package isNil or:[aClass revision isNil]) ifFalse:[ 
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4159
        definitionChangesForThisClass notEmpty ifTrue:[
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4160
            initialLogStream 
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4161
                print:'class definition'; cr.
2129
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4162
        ].
2312
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4163
    ].
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4164
2313
3dbafc3a51a4 changed:
Claus Gittinger <cg@exept.de>
parents: 2312
diff changeset
  4165
    "/ added selectors?
2312
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4166
    newSelectors notEmpty ifTrue:[
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4167
        printSelectors value:'added' value:newSelectors.
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4168
    ].
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4169
    modifiedSelectors removeAllFoundIn:newSelectors.
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4170
    categoryChangeSelectors removeAllFoundIn:newSelectors.
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4171
2313
3dbafc3a51a4 changed:
Claus Gittinger <cg@exept.de>
parents: 2312
diff changeset
  4172
    "/ removed selectors?
3dbafc3a51a4 changed:
Claus Gittinger <cg@exept.de>
parents: 2312
diff changeset
  4173
    removedSelectors notEmpty ifTrue:[
3dbafc3a51a4 changed:
Claus Gittinger <cg@exept.de>
parents: 2312
diff changeset
  4174
        printSelectors value:'removed' value:removedSelectors.
3dbafc3a51a4 changed:
Claus Gittinger <cg@exept.de>
parents: 2312
diff changeset
  4175
    ].
3dbafc3a51a4 changed:
Claus Gittinger <cg@exept.de>
parents: 2312
diff changeset
  4176
    modifiedSelectors removeAllFoundIn:removedSelectors.
3dbafc3a51a4 changed:
Claus Gittinger <cg@exept.de>
parents: 2312
diff changeset
  4177
    categoryChangeSelectors removeAllFoundIn:removedSelectors.
3dbafc3a51a4 changed:
Claus Gittinger <cg@exept.de>
parents: 2312
diff changeset
  4178
3dbafc3a51a4 changed:
Claus Gittinger <cg@exept.de>
parents: 2312
diff changeset
  4179
    "/ modifications?
2312
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4180
    modifiedSelectors notEmpty ifTrue:[
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4181
        selectorsWithCommentOrFormattingChangeOnly := Set new.
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4182
        selectorsWithVariableChangeOnly := Set new.
2313
3dbafc3a51a4 changed:
Claus Gittinger <cg@exept.de>
parents: 2312
diff changeset
  4183
3dbafc3a51a4 changed:
Claus Gittinger <cg@exept.de>
parents: 2312
diff changeset
  4184
        "/ cehck for format/comment change
2312
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4185
        RBParser notNil ifTrue:[
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4186
            modifiedSelectors do:[:eachSelector |
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4187
                |oldest newest oldMethod newMethod oldTree newTree variableMapping|
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4188
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4189
                (newSelectors includes:eachSelector) ifFalse:[
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4190
                    oldest := allMethodChangesForThisClass detect:[:change | change changeSelector = eachSelector].
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4191
                    newest := allMethodChangesForThisClass detectLast:[:change | change changeSelector = eachSelector].
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4192
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4193
                    oldest := oldest previousVersion notNil ifTrue:[oldest previousVersion] ifFalse:[oldest].
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4194
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4195
                    oldTree := RBParser parseMethod:oldest source onError:[:aString :pos | nil].
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4196
                    newTree := RBParser parseMethod:newest source onError:[:aString :pos | nil].
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4197
                    (oldTree notNil and:[newTree notNil]) ifTrue:[
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4198
                        variableMapping := Dictionary new.
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4199
                        (oldTree equalTo:newTree withMapping: variableMapping) ifTrue:[
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4200
                            (variableMapping at:'self' ifAbsent:nil) = 'self' ifTrue:[
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4201
                                ((variableMapping associations count:[:assoc | assoc key ~= assoc value]) == 0) ifTrue:[
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4202
                                    selectorsWithCommentOrFormattingChangeOnly add:eachSelector.
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4203
                                ] ifFalse:[
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4204
                                    selectorsWithVariableChangeOnly add:eachSelector.
2142
d09c9d1b8c46 changed: #goodInitialLogMessageForCheckinClassOfClass:
sr
parents: 2137
diff changeset
  4205
                                ].
2129
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4206
                            ].
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4207
                        ].
2312
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4208
                    ].
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4209
                ]
2129
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4210
            ].
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4211
        ].
2313
3dbafc3a51a4 changed:
Claus Gittinger <cg@exept.de>
parents: 2312
diff changeset
  4212
2312
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4213
        modifiedSelectors removeAllFoundIn:selectorsWithCommentOrFormattingChangeOnly.
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4214
        modifiedSelectors removeAllFoundIn:selectorsWithVariableChangeOnly.
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4215
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4216
        (selectorsWithCommentOrFormattingChangeOnly notEmpty) ifTrue:[
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4217
            printSelectors value:'comment/format in' value:selectorsWithCommentOrFormattingChangeOnly.
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4218
        ].
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4219
        (selectorsWithVariableChangeOnly notEmpty) ifTrue:[
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4220
            printSelectors value:'variable renamed in' value:selectorsWithVariableChangeOnly.
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4221
        ].
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4222
        (modifiedSelectors notEmpty) ifTrue:[
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4223
            printSelectors value:'changed' value:modifiedSelectors.
2194
c45cd185ee80 changed: #goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
  4224
        ].
2129
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4225
    ].
2312
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4226
    categoryChanges notEmpty ifTrue:[
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4227
        printSelectors value:'category of' value:categoryChangeSelectors.
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4228
    ].
2129
9d5c146df780 goodInitialLogMessageForCheckinClassOfClass:
Claus Gittinger <cg@exept.de>
parents: 2106
diff changeset
  4229
    ^ initialLogStream contents
2312
21fb10cf6914 changed:
Claus Gittinger <cg@exept.de>
parents: 2295
diff changeset
  4230
2313
3dbafc3a51a4 changed:
Claus Gittinger <cg@exept.de>
parents: 2312
diff changeset
  4231
    "Modified: / 27-01-2011 / 09:25:30 / cg"
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4232
! !
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4233
2556
7d79bba1a1fa Methods moved to an instance side (with forwarding from class side)
vrany
parents: 2539
diff changeset
  4234
!SourceCodeManagerUtilities methodsFor:'utilities-encoding'!
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4235
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4236
guessEncodingOfFile:aFilename
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4237
    "look for a string
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4238
        encoding #name
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4239
     or:
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4240
        encoding: name
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4241
     within the given buffer 
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4242
     (which is usually the first few bytes of a textFile).
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4243
     If thats not found, use heuristics (in CharacterArray) to guess."
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4244
1433
c3696ad0922b mark obsolete messages as obsolete
Stefan Vogel <sv@exept.de>
parents: 1429
diff changeset
  4245
    <resource: #obsolete>
c3696ad0922b mark obsolete messages as obsolete
Stefan Vogel <sv@exept.de>
parents: 1429
diff changeset
  4246
1414
f67d4b166606 guessEncoding now implemented in CharacterEncoder
Claus Gittinger <cg@exept.de>
parents: 1403
diff changeset
  4247
    self obsoleteMethodWarning:'ask CharacterEncoder'.
f67d4b166606 guessEncoding now implemented in CharacterEncoder
Claus Gittinger <cg@exept.de>
parents: 1403
diff changeset
  4248
    ^ CharacterEncoder guessEncodingOfFile:aFilename
1375
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4249
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4250
    "
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4251
     SourceCodeManagerUtilities guessEncodingOfFile:'../../libview2/resources/ApplicationModel_de.rs' asFilename
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4252
     SourceCodeManagerUtilities guessEncodingOfFile:'../../libview2/resources/ApplicationModel_ru.rs' asFilename
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4253
    "
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4254
!
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4255
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4256
guessEncodingOfStream:aStream
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4257
    "look for a string of the form
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4258
            encoding #name
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4259
     or:
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4260
            encoding: name
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4261
     in the first few bytes of aStream."
80969e1428a8 category changes
Claus Gittinger <cg@exept.de>
parents: 1374
diff changeset
  4262
1433
c3696ad0922b mark obsolete messages as obsolete
Stefan Vogel <sv@exept.de>
parents: 1429
diff changeset
  4263
    <resource: #obsolete>
c3696ad0922b mark obsolete messages as obsolete
Stefan Vogel <sv@exept.de>
parents: 1429
diff changeset
  4264
1414
f67d4b166606 guessEncoding now implemented in CharacterEncoder
Claus Gittinger <cg@exept.de>
parents: 1403
diff changeset
  4265
    self obsoleteMethodWarning:'ask CharacterEncoder'.
f67d4b166606 guessEncoding now implemented in CharacterEncoder
Claus Gittinger <cg@exept.de>
parents: 1403
diff changeset
  4266
    ^ CharacterEncoder guessEncodingOfStream:aStream
873
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  4267
! !
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  4268
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  4269
!SourceCodeManagerUtilities class methodsFor:'documentation'!
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  4270
2487
c8f4417b9edc changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents: 2484
diff changeset
  4271
version
2602
a8fcee161334 added: #tagPackage:as:
vrany
parents: 2597
diff changeset
  4272
    ^ '$Header: /cvs/stx/stx/libbasic3/SourceCodeManagerUtilities.st,v 1.229 2011-10-15 22:23:36 vrany Exp $'
2487
c8f4417b9edc changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents: 2484
diff changeset
  4273
!
c8f4417b9edc changed: #ensureCorrectVersionMethodsInClass:using:
Claus Gittinger <cg@exept.de>
parents: 2484
diff changeset
  4274
2175
50349cb87bf4 changed:
fm
parents: 2161
diff changeset
  4275
version_CVS
2602
a8fcee161334 added: #tagPackage:as:
vrany
parents: 2597
diff changeset
  4276
    ^ '$Header: /cvs/stx/stx/libbasic3/SourceCodeManagerUtilities.st,v 1.229 2011-10-15 22:23:36 vrany Exp $'
873
0016bc968e28 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
  4277
! !