36 bounds: (Rectangle 0 0 300 300) |
36 bounds: (Rectangle 0 0 300 300) |
37 ) |
37 ) |
38 component: |
38 component: |
39 (SpecCollection |
39 (SpecCollection |
40 collection: ( |
40 collection: ( |
|
41 (LabelSpec |
|
42 label: 'Repository:' |
|
43 name: 'Label1' |
|
44 layout: (LayoutFrame 3 0 4 0 94 0 26 0) |
|
45 translateLabel: true |
|
46 adjust: left |
|
47 ) |
41 (ComboListSpec |
48 (ComboListSpec |
42 name: 'RepositoryList' |
49 name: 'RepositoryList' |
43 layout: (LayoutFrame 0 0 0 0 0 1 25 0) |
50 layout: (LayoutFrame 101 0 0 0 0 1 25 0) |
44 model: repositoryHolder |
51 model: repositoryHolder |
45 comboList: repositoryList |
52 comboList: repositoryList |
46 useIndex: false |
53 useIndex: false |
47 ) |
54 ) |
|
55 (LabelSpec |
|
56 label: 'Version:' |
|
57 name: 'Label2' |
|
58 layout: (LayoutFrame 3 0 30 0 94 0 52 0) |
|
59 translateLabel: true |
|
60 adjust: left |
|
61 ) |
48 (InputFieldSpec |
62 (InputFieldSpec |
49 name: 'VersionName' |
63 name: 'VersionName' |
50 layout: (LayoutFrame 0 0 30 0 0 1 55 0) |
64 layout: (LayoutFrame 101 0 30 0 0 1 55 0) |
51 model: versionNameHolder |
65 model: versionNameHolder |
52 immediateAccept: true |
66 immediateAccept: true |
53 acceptOnReturn: true |
67 acceptOnReturn: true |
54 acceptOnTab: true |
68 acceptOnTab: true |
55 acceptOnPointerLeave: true |
69 acceptOnPointerLeave: true |
81 !MCCommitDialog methodsFor:'accessing - defaults'! |
95 !MCCommitDialog methodsFor:'accessing - defaults'! |
82 |
96 |
83 defaultTitle |
97 defaultTitle |
84 "superclass MCDialog says that I am responsible to implement this method" |
98 "superclass MCDialog says that I am responsible to implement this method" |
85 |
99 |
86 ^ 'Commit' |
100 ^ 'Monticello Commit' |
87 |
101 |
88 "Modified: / 14-09-2010 / 23:00:13 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
102 "Modified: / 14-09-2010 / 23:00:13 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
103 "Modified: / 02-12-2011 / 15:44:08 / cg" |
89 ! ! |
104 ! ! |
90 |
105 |
91 !MCCommitDialog methodsFor:'actions'! |
106 !MCCommitDialog methodsFor:'actions'! |
92 |
107 |
93 doAccept |
108 doAccept |
94 |
|
95 | workingCopy version repository | |
|
96 |
|
97 self acceptEnabled ifFalse:[^self]. |
109 self acceptEnabled ifFalse:[^self]. |
98 workingCopy := self workingCopyHolder value. |
110 |
99 [version := workingCopy newVersion] |
111 self withWaitCursorDo:[ |
100 on: MCVersionNameAndMessageRequest |
112 |workingCopy version repository newVersionString stxPackageID defClass| |
101 do: [:n | |
113 |
102 n resume: |
114 workingCopy := self workingCopyHolder value. |
103 (Array with: self versionNameHolder value |
115 [ |
104 with: messageView contents asText string)]. |
116 version := workingCopy newVersion |
105 repository := self repositoryHolder value. |
117 ] on: MCVersionNameAndMessageRequest do:[:n | |
106 repository storeVersion: version. |
118 n resume: (Array with: self versionNameHolder value |
107 super doAccept. |
119 with: messageView contents asText string) |
|
120 ]. |
|
121 |
|
122 stxPackageID := version package name. |
|
123 defClass := ProjectDefinition definitionClassForPackage:stxPackageID. |
|
124 newVersionString := MCSourceCodeManager revisionStringForVersion:version. |
|
125 |
|
126 "/ update all project classes version_MC |
|
127 defClass allClasses do:[:cls | |
|
128 MCSourceCodeManager |
|
129 updateVersionMethod:(MCSourceCodeManager nameOfVersionMethodInClasses) |
|
130 of:cls |
|
131 for:newVersionString. |
|
132 ]. |
|
133 |
|
134 "/ update the project definition classes version_MC |
|
135 MCSourceCodeManager |
|
136 updateVersionMethod:(MCSourceCodeManager nameOfVersionMethodInClasses) |
|
137 of:defClass |
|
138 for:newVersionString. |
|
139 MCSourceCodeManager |
|
140 updateVersionMethod:(MCSourceCodeManager nameOfVersionMethodForExtensions) |
|
141 of:defClass |
|
142 for:newVersionString. |
|
143 |
|
144 "/ sigh: make a new snapshot (now with updated version methods) |
|
145 version snapshot:version package snapshot. |
|
146 |
|
147 repository := self repositoryHolder value. |
|
148 repository storeVersion: version. |
|
149 super doAccept. |
|
150 ]. |
108 |
151 |
109 "Created: / 15-09-2010 / 14:07:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
152 "Created: / 15-09-2010 / 14:07:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
153 "Modified: / 02-12-2011 / 16:09:42 / cg" |
110 ! ! |
154 ! ! |
111 |
155 |
112 !MCCommitDialog methodsFor:'aspects'! |
156 !MCCommitDialog methodsFor:'aspects'! |
113 |
157 |
114 messageHolder |
158 messageHolder |
313 ! ! |
357 ! ! |
314 |
358 |
315 !MCCommitDialog class methodsFor:'documentation'! |
359 !MCCommitDialog class methodsFor:'documentation'! |
316 |
360 |
317 version |
361 version |
318 ^ '$Header: /cvs/stx/stx/goodies/monticello/MCCommitDialog.st,v 1.3 2011-12-01 20:02:29 cg Exp $' |
362 ^ '$Header: /cvs/stx/stx/goodies/monticello/MCCommitDialog.st,v 1.4 2011-12-04 14:43:35 cg Exp $' |
319 ! |
363 ! |
320 |
364 |
321 version_CVS |
365 version_CVS |
322 ^ '$Header: /cvs/stx/stx/goodies/monticello/MCCommitDialog.st,v 1.3 2011-12-01 20:02:29 cg Exp $' |
366 ^ '$Header: /cvs/stx/stx/goodies/monticello/MCCommitDialog.st,v 1.4 2011-12-04 14:43:35 cg Exp $' |
323 ! |
367 ! |
324 |
368 |
325 version_SVN |
369 version_SVN |
326 ^ '§Id: MCCommitDialog.st 12 2010-09-15 13:13:22Z vranyj1 §' |
370 ^ '§Id: MCCommitDialog.st 12 2010-09-15 13:13:22Z vranyj1 §' |
327 ! ! |
371 ! ! |