MCCommitDialog.st
author Jan Vrany <jan.vrany@labware.com>
Tue, 11 Jul 2023 12:13:27 +0100
branchjv
changeset 1173 e3dd2050492e
parent 1002 54b4906215ca
permissions -rw-r--r--
Update class category to match package name if it does not This is needed because in Squeak / Pharo world package membership is defined by (class) category prefix. This is soo annoying...
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
360
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     1
"{ Package: 'stx:goodies/monticello' }"
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     2
974
c7dccf72f591 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 785
diff changeset
     3
"{ NameSpace: Smalltalk }"
c7dccf72f591 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 785
diff changeset
     4
360
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     5
MCDialog subclass:#MCCommitDialog
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     6
	instanceVariableNames:'workingCopyHolder repositoryHolder versionNameHolder
742
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
     7
		messageHolder messageView versionNameFinderProcess
784
cac151328dea class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
     8
		includeExtrasForSTX clearChangeSet'
cac151328dea class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
     9
	classVariableNames:'LastRepository DefaultForIncludeSTXExtras
cac151328dea class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
    10
		DefaultForClearChangeSet'
360
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    11
	poolDictionaries:''
580
d510eb1a7606 category change
Claus Gittinger <cg@exept.de>
parents: 573
diff changeset
    12
	category:'SCM-Monticello-St/X UI'
360
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
!
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
742
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
    16
!MCCommitDialog class methodsFor:'help specs'!
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
    17
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
    18
flyByHelpSpec
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
    19
    "This resource specification was automatically generated
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
    20
     by the UIHelpTool of ST/X."
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
    21
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
    22
    "Do not manually edit this!! If it is corrupted,
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
    23
     the UIHelpTool may not be able to read the specification."
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
    24
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
    25
    "
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
    26
     UIHelpTool openOnClass:MCCommitDialog    
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
    27
    "
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
    28
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
    29
    <resource: #help>
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
    30
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
    31
    ^ super flyByHelpSpec addPairsFrom:#(
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
    32
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
    33
#commitMessage
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
    34
'A log message describing this version (your changes)'
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
    35
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
    36
#includeExtrasForSTX
988
536fd853efeb mcz writing: do not include version_XX methods when include St/X extras is not wanted
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 974
diff changeset
    37
'When checked, include extra support files (makefiles) needed to build a binary class library under ST/X.
742
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
    38
If this is not checked, only the plain code is saved which is needed to load the package as bytecode.
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
    39
Notice, that those files are not strictly required - they can easily be recreated by loading the package,
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
    40
and then recreating the support files from the system browser on the target system.
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
    41
Turn this off, if this package is meant to be transported to or shared with other Smalltalk dialects.
988
536fd853efeb mcz writing: do not include version_XX methods when include St/X extras is not wanted
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 974
diff changeset
    42
(however, this is transparent to other Smalltalk dialects - these will simply ignore these additional definitions)
536fd853efeb mcz writing: do not include version_XX methods when include St/X extras is not wanted
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 974
diff changeset
    43
536fd853efeb mcz writing: do not include version_XX methods when include St/X extras is not wanted
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 974
diff changeset
    44
When unchecked, project definition class and version_XX methods are ommited (i.e., not present in .mcz).
536fd853efeb mcz writing: do not include version_XX methods when include St/X extras is not wanted
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 974
diff changeset
    45
This may be desirable when commiting Smalltalk/X changes back to Squeak / Pharo upstream repository
536fd853efeb mcz writing: do not include version_XX methods when include St/X extras is not wanted
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 974
diff changeset
    46
(and maintainer does not want these in the code even though it does not hurt)'
742
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
    47
784
cac151328dea class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
    48
#clearChangeSet
cac151328dea class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
    49
'Clear the internal changeset after the Monticello commit'
cac151328dea class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
    50
742
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
    51
#repository
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
    52
'A repository or the name of a directory where the generated package file is to be stored'
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
    53
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
    54
#versionName
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
    55
'The name of the version (will also be the name of the generated package file)'
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
    56
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
    57
)
988
536fd853efeb mcz writing: do not include version_XX methods when include St/X extras is not wanted
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 974
diff changeset
    58
536fd853efeb mcz writing: do not include version_XX methods when include St/X extras is not wanted
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 974
diff changeset
    59
    "Modified: / 24-04-2015 / 08:39:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
742
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
    60
! !
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
    61
360
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    62
!MCCommitDialog class methodsFor:'interface specs'!
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    63
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    64
contentSpec
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    65
    "This resource specification was automatically generated
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    66
     by the UIPainter of ST/X."
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    67
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    68
    "Do not manually edit this!! If it is corrupted,
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    69
     the UIPainter may not be able to read the specification."
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    70
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    71
    "
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    72
     UIPainter new openOnClass:MCCommitDialog andSelector:#contentSpec
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    73
     MCCommitDialog new openInterface:#contentSpec
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    74
    "
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    75
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    76
    <resource: #canvas>
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    77
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    78
    ^ 
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    79
     #(FullSpec
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    80
        name: contentSpec
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    81
        window: 
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    82
       (WindowSpec
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    83
          label: 'Commit Dialog'
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    84
          name: 'Commit Dialog'
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    85
          min: (Point 10 10)
742
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
    86
          bounds: (Rectangle 0 0 555 303)
360
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    87
        )
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    88
        component: 
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    89
       (SpecCollection
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    90
          collection: (
537
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
    91
           (LabelSpec
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
    92
              label: 'Repository:'
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
    93
              name: 'Label1'
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
    94
              layout: (LayoutFrame 3 0 4 0 94 0 26 0)
742
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
    95
              activeHelpKey: repository
537
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
    96
              translateLabel: true
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
    97
              adjust: left
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
    98
            )
360
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    99
           (ComboListSpec
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   100
              name: 'RepositoryList'
537
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
   101
              layout: (LayoutFrame 101 0 0 0 0 1 25 0)
742
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   102
              activeHelpKey: repository
360
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   103
              model: repositoryHolder
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   104
              comboList: repositoryList
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   105
              useIndex: false
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   106
            )
537
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
   107
           (LabelSpec
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
   108
              label: 'Version:'
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
   109
              name: 'Label2'
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
   110
              layout: (LayoutFrame 3 0 30 0 94 0 52 0)
742
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   111
              activeHelpKey: versionName
537
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
   112
              translateLabel: true
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
   113
              adjust: left
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
   114
            )
360
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   115
           (InputFieldSpec
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   116
              name: 'VersionName'
537
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
   117
              layout: (LayoutFrame 101 0 30 0 0 1 55 0)
742
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   118
              activeHelpKey: versionName
360
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   119
              model: versionNameHolder
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   120
              immediateAccept: true
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   121
              acceptOnReturn: true
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   122
              acceptOnTab: true
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   123
              acceptOnPointerLeave: true
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   124
            )
742
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   125
           (CheckBoxSpec
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   126
              label: 'Include ST/X Support Files'
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   127
              name: 'CheckBox1'
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   128
              layout: (LayoutFrame 96 0 63 0 232 1 85 0)
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   129
              activeHelpKey: includeExtrasForSTX
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   130
              model: includeExtrasForSTX
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   131
              translateLabel: true
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   132
            )
784
cac151328dea class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
   133
           (CheckBoxSpec
cac151328dea class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
   134
              label: 'Clear Change Set'
cac151328dea class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
   135
              name: 'CheckBox2'
cac151328dea class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
   136
              layout: (LayoutFrame 96 0 90 0 232 1 112 0)
cac151328dea class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
   137
              activeHelpKey: clearChangeSet
cac151328dea class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
   138
              model: clearChangeSet
cac151328dea class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
   139
              translateLabel: true
cac151328dea class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
   140
            )
cac151328dea class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
   141
           (TextEditorSpec
cac151328dea class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
   142
              name: 'CommitMessage'
cac151328dea class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
   143
              layout: (LayoutFrame 0 0 120 0 0 1 0 1)
cac151328dea class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
   144
              activeHelpKey: commitMessage
cac151328dea class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
   145
              model: messageHolder
cac151328dea class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
   146
              hasHorizontalScrollBar: true
cac151328dea class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
   147
              hasVerticalScrollBar: true
cac151328dea class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
   148
              hasKeyboardFocusInitially: false
cac151328dea class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
   149
              postBuildCallback: postBuildMessageView:
cac151328dea class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
   150
            )
360
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   151
           )
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   152
         
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   153
        )
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   154
      )
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   155
! !
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   156
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   157
!MCCommitDialog methodsFor:'accessing'!
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   158
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   159
workingCopy: aMCWorkingCopy
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   160
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   161
    ^self workingCopyHolder value: aMCWorkingCopy
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   162
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   163
    "Created: / 14-09-2010 / 23:43:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   164
! !
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   165
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   166
!MCCommitDialog methodsFor:'accessing - defaults'!
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   167
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   168
defaultTitle
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   169
    "superclass MCDialog says that I am responsible to implement this method"
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   170
537
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
   171
    ^ 'Monticello Commit'
360
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   172
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   173
    "Modified: / 14-09-2010 / 23:00:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
537
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
   174
    "Modified: / 02-12-2011 / 15:44:08 / cg"
360
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   175
! !
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   176
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   177
!MCCommitDialog methodsFor:'actions'!
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   178
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   179
doAccept
537
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
   180
    self acceptEnabled ifFalse:[^self].
360
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   181
537
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
   182
    self withWaitCursorDo:[
784
cac151328dea class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
   183
        |workingCopy version repository clearChangeSet
cac151328dea class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
   184
         newVersionString stxPackageID defClass|
537
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
   185
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
   186
        workingCopy := self workingCopyHolder value.
569
8ee0dffb7160 class definition
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   187
        repository := self repositoryHolder value.
8ee0dffb7160 class definition
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   188
        LastRepository := repository.
784
cac151328dea class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
   189
        DefaultForIncludeSTXExtras := clearChangeSet := self clearChangeSet value.
569
8ee0dffb7160 class definition
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   190
537
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
   191
        [
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
   192
            version := workingCopy newVersion
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
   193
        ] on: MCVersionNameAndMessageRequest do:[:n | 
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
   194
            n resume: (Array with: self versionNameHolder value 
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
   195
                             with: messageView contents asText string)
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
   196
        ].
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
   197
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
   198
        stxPackageID := version package name.
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
   199
        defClass := ProjectDefinition definitionClassForPackage:stxPackageID.
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
   200
        newVersionString := MCSourceCodeManager revisionStringForVersion:version.
360
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   201
537
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
   202
        "/ update all project classes version_MC
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
   203
        defClass allClasses do:[:cls |
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
   204
            MCSourceCodeManager 
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
   205
                updateVersionMethod:(MCSourceCodeManager nameOfVersionMethodInClasses) 
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
   206
                of:cls 
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
   207
                for:newVersionString.
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
   208
        ].
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
   209
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
   210
        "/ update the project definition classes version_MC
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
   211
        MCSourceCodeManager 
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
   212
            updateVersionMethod:(MCSourceCodeManager nameOfVersionMethodInClasses) 
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
   213
            of:defClass 
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
   214
            for:newVersionString.
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
   215
        MCSourceCodeManager 
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
   216
            updateVersionMethod:(MCSourceCodeManager nameOfVersionMethodForExtensions) 
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
   217
            of:defClass 
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
   218
            for:newVersionString.
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
   219
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
   220
        "/ sigh: make a new snapshot (now with updated version methods)
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
   221
        version snapshot:version package snapshot.
742
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   222
        version cachable:false. "/ force new a write (otherwise, the mcz is not rewritten)
1002
54b4906215ca Introduced MCSnapshotOptions for more fine-graned control over contents of .mcz
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 988
diff changeset
   223
        version snapshot options includeExtrasForSTX:(DefaultForIncludeSTXExtras := self includeExtrasForSTX value).
537
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
   224
        repository storeVersion: version.
758
e52bf52fafbb class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 757
diff changeset
   225
784
cac151328dea class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
   226
        clearChangeSet ifTrue:[
cac151328dea class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
   227
            ChangeSet current condenseChangesForPackage:stxPackageID
cac151328dea class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
   228
        ].
537
f84d9254b1ba checkin support
Claus Gittinger <cg@exept.de>
parents: 529
diff changeset
   229
    ].
784
cac151328dea class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
   230
    super doAccept.
360
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   231
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   232
    "Created: / 15-09-2010 / 14:07:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
569
8ee0dffb7160 class definition
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   233
    "Modified: / 24-07-2012 / 16:33:56 / cg"
1002
54b4906215ca Introduced MCSnapshotOptions for more fine-graned control over contents of .mcz
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 988
diff changeset
   234
    "Modified: / 07-09-2015 / 15:27:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
360
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   235
! !
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   236
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   237
!MCCommitDialog methodsFor:'aspects'!
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   238
784
cac151328dea class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
   239
clearChangeSet
cac151328dea class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
   240
    clearChangeSet isNil ifTrue:[
cac151328dea class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
   241
        clearChangeSet := (DefaultForClearChangeSet ? true) asValue.
cac151328dea class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
   242
    ].
cac151328dea class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
   243
    ^ clearChangeSet
cac151328dea class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
   244
!
cac151328dea class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 758
diff changeset
   245
742
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   246
includeExtrasForSTX
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   247
    includeExtrasForSTX isNil ifTrue:[
758
e52bf52fafbb class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 757
diff changeset
   248
        includeExtrasForSTX := (DefaultForIncludeSTXExtras ? true) asValue.
742
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   249
    ].
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   250
    ^ includeExtrasForSTX
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   251
!
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   252
360
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   253
messageHolder
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   254
    "return/create the 'messageHolder' value holder (automatically generated)"
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   255
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   256
    messageHolder isNil ifTrue:[
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   257
        messageHolder := ValueHolder with: ('Commit message' asText colorizeAllWith: Color gray).
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   258
        messageHolder addDependent:self.
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   259
    ].
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   260
    ^ messageHolder
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   261
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   262
    "Modified: / 15-09-2010 / 13:58:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   263
!
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   264
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   265
messageHolder:something
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   266
    "set the 'messageHolder' value holder (automatically generated)"
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   267
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   268
    |oldValue newValue|
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   269
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   270
    messageHolder notNil ifTrue:[
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   271
        oldValue := messageHolder value.
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   272
        messageHolder removeDependent:self.
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   273
    ].
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   274
    messageHolder := something.
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   275
    messageHolder notNil ifTrue:[
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   276
        messageHolder addDependent:self.
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   277
    ].
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   278
    newValue := messageHolder value.
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   279
    oldValue ~~ newValue ifTrue:[
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   280
        self update:#value with:newValue from:messageHolder.
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   281
    ].
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   282
!
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   283
785
4e581e7b9634 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   284
repositoryActionList
4e581e7b9634 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   285
    "to determine which action to take when the repository selection is
4e581e7b9634 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   286
     changed (especially for the add xxx entries)"
4e581e7b9634 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   287
4e581e7b9634 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   288
    ^
4e581e7b9634 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   289
      (Array new: MCRepositoryGroup default repositories size)
4e581e7b9634 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   290
      , (Array 
4e581e7b9634 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   291
            with:nil
4e581e7b9634 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   292
            with:#addRepository
4e581e7b9634 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   293
            with:#addDirectoryRepository
4e581e7b9634 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   294
        ) 
4e581e7b9634 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   295
!
4e581e7b9634 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   296
360
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   297
repositoryHolder
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   298
    "return/create the 'repositoryHolder' value holder (automatically generated)"
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   299
569
8ee0dffb7160 class definition
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   300
    |initial|
8ee0dffb7160 class definition
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   301
360
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   302
    repositoryHolder isNil ifTrue:[
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   303
        repositoryHolder := ValueHolder new.
569
8ee0dffb7160 class definition
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   304
        initial := LastRepository.
8ee0dffb7160 class definition
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   305
        initial isNil ifTrue:[
8ee0dffb7160 class definition
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   306
            initial := UserPreferences current at:#mcPrimaryRepository ifAbsent:nil.
8ee0dffb7160 class definition
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   307
        ].
8ee0dffb7160 class definition
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   308
        repositoryHolder value:initial.
360
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   309
        repositoryHolder addDependent:self.
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   310
    ].
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   311
    ^ repositoryHolder
529
d0d668b95c4c changed: #repositoryHolder
Claus Gittinger <cg@exept.de>
parents: 440
diff changeset
   312
569
8ee0dffb7160 class definition
Claus Gittinger <cg@exept.de>
parents: 537
diff changeset
   313
    "Modified: / 24-07-2012 / 16:32:01 / cg"
360
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   314
!
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   315
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   316
repositoryHolder:something
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   317
    "set the 'repositoryHolder' value holder (automatically generated)"
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   318
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   319
    |oldValue newValue|
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   320
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   321
    repositoryHolder notNil ifTrue:[
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   322
        oldValue := repositoryHolder value.
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   323
        repositoryHolder removeDependent:self.
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   324
    ].
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   325
    repositoryHolder := something.
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   326
    repositoryHolder notNil ifTrue:[
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   327
        repositoryHolder addDependent:self.
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   328
    ].
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   329
    newValue := repositoryHolder value.
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   330
    oldValue ~~ newValue ifTrue:[
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   331
        self update:#value with:newValue from:repositoryHolder.
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   332
    ].
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   333
!
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   334
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   335
repositoryList
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   336
785
4e581e7b9634 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   337
    ^[
4e581e7b9634 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   338
      MCRepositoryGroup default repositories
4e581e7b9634 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   339
      , (Array 
4e581e7b9634 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   340
            with:nil
4e581e7b9634 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   341
            with:(resources string:'Open MC Repository Dialog...')
4e581e7b9634 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   342
            with:(resources string:'Add Directory Repository...')
4e581e7b9634 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   343
        ) 
4e581e7b9634 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   344
     ]
360
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   345
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   346
    "Created: / 14-09-2010 / 23:16:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
573
4cc009526331 class definition
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   347
    "Modified: / 31-08-2012 / 11:39:42 / cg"
360
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   348
!
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   349
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   350
versionNameHolder
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   351
    "return/create the 'versionNameHolder' value holder (automatically generated)"
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   352
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   353
    versionNameHolder isNil ifTrue:[
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   354
        versionNameHolder := ValueHolder new.
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   355
        versionNameHolder addDependent:self.
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   356
    ].
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   357
    ^ versionNameHolder
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   358
!
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   359
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   360
versionNameHolder:something
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   361
    "set the 'versionNameHolder' value holder (automatically generated)"
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   362
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   363
    |oldValue newValue|
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   364
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   365
    versionNameHolder notNil ifTrue:[
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   366
        oldValue := versionNameHolder value.
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   367
        versionNameHolder removeDependent:self.
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   368
    ].
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   369
    versionNameHolder := something.
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   370
    versionNameHolder notNil ifTrue:[
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   371
        versionNameHolder addDependent:self.
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   372
    ].
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   373
    newValue := versionNameHolder value.
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   374
    oldValue ~~ newValue ifTrue:[
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   375
        self update:#value with:newValue from:versionNameHolder.
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   376
    ].
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   377
!
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   378
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   379
workingCopyHolder
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   380
    "return/create the 'workingCopyHolder' value holder (automatically generated)"
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   381
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   382
    workingCopyHolder isNil ifTrue:[
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   383
        workingCopyHolder := ValueHolder new.
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   384
        workingCopyHolder addDependent:self.
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   385
    ].
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   386
    ^ workingCopyHolder
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   387
!
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   388
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   389
workingCopyHolder:something
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   390
    "set the 'workingCopyHolder' value holder (automatically generated)"
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   391
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   392
    |oldValue newValue|
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   393
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   394
    workingCopyHolder notNil ifTrue:[
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   395
        oldValue := workingCopyHolder value.
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   396
        workingCopyHolder removeDependent:self.
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   397
    ].
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   398
    workingCopyHolder := something.
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   399
    workingCopyHolder notNil ifTrue:[
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   400
        workingCopyHolder addDependent:self.
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   401
    ].
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   402
    newValue := workingCopyHolder value.
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   403
    oldValue ~~ newValue ifTrue:[
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   404
        self update:#value with:newValue from:workingCopyHolder.
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   405
    ].
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   406
! !
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   407
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   408
!MCCommitDialog methodsFor:'change & update'!
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   409
785
4e581e7b9634 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   410
addDirectoryRepository
4e581e7b9634 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   411
    |dir repo|
4e581e7b9634 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   412
4e581e7b9634 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   413
    dir := Dialog requestDirectoryName:'Choose a Repository Directory'.
4e581e7b9634 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   414
    dir isEmptyOrNil ifTrue:[^ self].
4e581e7b9634 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   415
    repo := MCDirectoryRepository directory:dir.
4e581e7b9634 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   416
    MCRepositoryGroup default addRepository:repo.
4e581e7b9634 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   417
4e581e7b9634 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   418
    self repositoryHolder 
4e581e7b9634 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   419
        value:repo
4e581e7b9634 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   420
        withoutNotifying:self.
4e581e7b9634 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   421
!
4e581e7b9634 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   422
4e581e7b9634 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   423
addRepository
4e581e7b9634 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   424
    MCSettingsApp open.
4e581e7b9634 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   425
    self repositoryHolder 
4e581e7b9634 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   426
        value:(self repositoryList value first)
4e581e7b9634 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   427
        withoutNotifying:self.
4e581e7b9634 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   428
!
4e581e7b9634 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   429
573
4cc009526331 class definition
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   430
findUniqueVersionNumber
4cc009526331 class definition
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   431
    | wc versionName |
4cc009526331 class definition
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   432
4cc009526331 class definition
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   433
    self versionNameHolder value:('One Moment, please...' colorizeAllWith:Color grey).
4cc009526331 class definition
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   434
4cc009526331 class definition
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   435
    wc := self workingCopyHolder value.
4cc009526331 class definition
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   436
    self assert:wc notNil.
4cc009526331 class definition
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   437
4cc009526331 class definition
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   438
    self subtitle: wc package name.
4cc009526331 class definition
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   439
    versionName := wc uniqueVersionName.
4cc009526331 class definition
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   440
    self 
4cc009526331 class definition
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   441
        enqueueMessage:#updateVersionNumberTo:
4cc009526331 class definition
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   442
        for:self
4cc009526331 class definition
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   443
        arguments: { versionName }
4cc009526331 class definition
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   444
4cc009526331 class definition
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   445
    "Created: / 31-08-2012 / 11:49:56 / cg"
4cc009526331 class definition
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   446
!
4cc009526331 class definition
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   447
360
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   448
messageChanged
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   449
974
c7dccf72f591 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 785
diff changeset
   450
    "/ self halt
360
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   451
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   452
    "Created: / 15-09-2010 / 10:04:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   453
!
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   454
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   455
repositoryChanged
785
4e581e7b9634 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   456
    |selIndex action|
4e581e7b9634 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   457
4e581e7b9634 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   458
    selIndex := self repositoryList value indexOf:self repositoryHolder value.
4e581e7b9634 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   459
    action := self repositoryActionList at:selIndex.
4e581e7b9634 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   460
    action notNil ifTrue:[ 
4e581e7b9634 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   461
        self perform:action.
573
4cc009526331 class definition
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   462
    ].
360
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   463
    self updateAcceptEnabled
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   464
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   465
    "Created: / 15-09-2010 / 14:02:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
573
4cc009526331 class definition
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   466
    "Modified: / 31-08-2012 / 12:01:02 / cg"
360
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   467
!
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   468
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   469
update:something with:aParameter from:changedObject
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   470
    "Invoked when an object that I depend upon sends a change notification."
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   471
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   472
    "stub code automatically generated - please change as required"
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   473
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   474
    changedObject == workingCopyHolder ifTrue:[
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   475
         self workingCopyChanged.
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   476
         ^ self.
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   477
    ].
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   478
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   479
    changedObject == messageHolder ifTrue:[
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   480
         self messageChanged.
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   481
         ^ self.
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   482
    ].
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   483
    changedObject == repositoryHolder ifTrue:[
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   484
         self repositoryChanged.
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   485
         ^ self.
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   486
    ].
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   487
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   488
    super update:something with:aParameter from:changedObject
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   489
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   490
    "Modified: / 15-09-2010 / 14:02:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   491
!
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   492
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   493
updateAcceptEnabled
573
4cc009526331 class definition
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   494
    | enabled |
360
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   495
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   496
    enabled := true.
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   497
    enabled := enabled and:[self workingCopyHolder value notNil].
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   498
    enabled := enabled and:[self repositoryHolder value notNil].
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   499
    self acceptEnabledHolder value: enabled.
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   500
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   501
    "Created: / 15-09-2010 / 14:01:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
573
4cc009526331 class definition
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   502
    "Modified: / 31-08-2012 / 11:59:09 / cg"
4cc009526331 class definition
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   503
!
4cc009526331 class definition
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   504
4cc009526331 class definition
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   505
updateVersionNumberTo:versionName
4cc009526331 class definition
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   506
    self versionNameHolder value: versionName.
4cc009526331 class definition
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   507
    self updateAcceptEnabled
4cc009526331 class definition
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   508
4cc009526331 class definition
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   509
    "Created: / 31-08-2012 / 11:54:15 / cg"
360
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   510
!
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   511
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   512
workingCopyChanged
573
4cc009526331 class definition
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   513
    |p|
360
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   514
573
4cc009526331 class definition
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   515
    self window isNil ifTrue:[
4cc009526331 class definition
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   516
        versionNameFinderProcess isNil ifTrue:[
4cc009526331 class definition
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   517
            versionNameFinderProcess :=
4cc009526331 class definition
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   518
                [
4cc009526331 class definition
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   519
                    self findUniqueVersionNumber.
4cc009526331 class definition
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   520
                ] fork.
4cc009526331 class definition
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   521
        ].
4cc009526331 class definition
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   522
        ^ self.
4cc009526331 class definition
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   523
    ].
4cc009526331 class definition
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   524
4cc009526331 class definition
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   525
    (self workingCopyHolder value) notNil ifTrue:[
4cc009526331 class definition
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   526
        (p := versionNameFinderProcess) notNil ifTrue:[
4cc009526331 class definition
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   527
            versionNameFinderProcess := nil.
4cc009526331 class definition
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   528
            p terminateAndWait.
4cc009526331 class definition
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   529
        ].
4cc009526331 class definition
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   530
        self findUniqueVersionNumber.
4cc009526331 class definition
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   531
    ].
360
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   532
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   533
    "Created: / 15-09-2010 / 09:30:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   534
    "Modified: / 15-09-2010 / 14:01:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
573
4cc009526331 class definition
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   535
    "Modified: / 31-08-2012 / 11:53:32 / cg"
360
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   536
! !
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   537
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   538
!MCCommitDialog methodsFor:'hooks'!
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   539
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   540
postBuildMessageView: aView
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   541
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   542
    messageView := aView scrolledView
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   543
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   544
    "Created: / 15-09-2010 / 13:56:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   545
! !
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   546
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   547
!MCCommitDialog class methodsFor:'documentation'!
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   548
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   549
version
974
c7dccf72f591 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 785
diff changeset
   550
    ^ '$Header: /cvs/stx/stx/goodies/monticello/MCCommitDialog.st,v 1.13 2015-02-25 00:12:38 cg Exp $'
360
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   551
!
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   552
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   553
version_CVS
974
c7dccf72f591 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 785
diff changeset
   554
    ^ '$Header: /cvs/stx/stx/goodies/monticello/MCCommitDialog.st,v 1.13 2015-02-25 00:12:38 cg Exp $'
573
4cc009526331 class definition
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   555
!
4cc009526331 class definition
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   556
988
536fd853efeb mcz writing: do not include version_XX methods when include St/X extras is not wanted
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 974
diff changeset
   557
version_HG
536fd853efeb mcz writing: do not include version_XX methods when include St/X extras is not wanted
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 974
diff changeset
   558
536fd853efeb mcz writing: do not include version_XX methods when include St/X extras is not wanted
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 974
diff changeset
   559
    ^ '$Changeset: <not expanded> $'
536fd853efeb mcz writing: do not include version_XX methods when include St/X extras is not wanted
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 974
diff changeset
   560
!
536fd853efeb mcz writing: do not include version_XX methods when include St/X extras is not wanted
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 974
diff changeset
   561
573
4cc009526331 class definition
Claus Gittinger <cg@exept.de>
parents: 569
diff changeset
   562
version_MC
974
c7dccf72f591 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 785
diff changeset
   563
    ^ '$stx:goodies/monticello-cg.3 4e70fe70-f030-11e1-ac62-001f3bda2d09 2012-08-27T12:16:46 cg$'
360
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   564
!
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   565
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   566
version_SVN
974
c7dccf72f591 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 785
diff changeset
   567
    ^ '$Id: MCCommitDialog.st,v 1.13 2015-02-25 00:12:38 cg Exp $'
360
49f34323f6c6 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   568
! !
742
65fd0b6f3267 class: MCCommitDialog
Claus Gittinger <cg@exept.de>
parents: 580
diff changeset
   569