<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>Hi Marcel,</p>
<p><br>
</p>
<p>I think I preserved the original message - I only removed the little word "inbox" for the sake of abstraction. Is this what you are referring to?</p>
<p><br>
</p>
<p>> <span>This looks like "premature abstraction".</span></p>
<p><span><br>
</span></p>
<p><span>Hm ... Can't we call it a feature of the Monticello API instead? I just wanted to get rid of these "magic numbers" in the UI methods. Smalltalk idioms told me to extract them into explaining methods. :-)</span></p>
<p><span><br>
</span></p>
<p><span>Best,</span></p>
<p><span>Christoph</span></p>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div>
<div class="_rp_T4" id="Item.MessagePartBody">
<div class="_rp_U4 ms-font-weight-regular ms-font-color-neutralDark rpHighlightAllClass rpHighlightBodyClass" id="Item.MessageUniqueBody" style="font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif,serif,EmojiFont">
<div dir="ltr">
<div id="divtagdefaultwrapper"><font face="Calibri,Helvetica,sans-serif,EmojiFont,Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols">
<div id="Signature">
<div style="margin:0px"><font style="font-family:Calibri,Arial,Helvetica,sans-serif,serif,EmojiFont">
<div><font size="3" color="black"><span style="font-size:12pt"><a href="http://www.hpi.de/" target="_blank" rel="noopener noreferrer" id="LPNoLP"><font size="2"><span id="LPlnk909538"><font color="#757B80"></font></span></font></a></span></font></div>
</font></div>
</div>
</font></div>
</div>
</div>
</div>
</div>
<div><font size="2" color="#808080"></font></div>
</div>
</div>
</div>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Von:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von Taeumel, Marcel<br>
<b>Gesendet:</b> Donnerstag, 11. März 2021 08:58:43<br>
<b>An:</b> squeak-dev<br>
<b>Betreff:</b> Re: [squeak-dev] The Inbox: Monticello-ct.737.mcz</font>
<div> </div>
</div>
<div>
<div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000;text-align: left" dir="ltr">
-1
<div><br>
</div>
<div>#save does not inform the user about the actual problem between Inbox and Trunk/Treated anymore. Good error messages are paramount for usability.</div>
<div><br>
</div>
<div>To make this a constructive discussion: This looks like "premature abstraction". What are other examples for source/sink repositories?</div>
<div><br>
</div>
<div>Best,</div>
<div>Marcel</div>
<div class="mb_sig"></div>
<blockquote class="history_container" type="cite" style="border-left-style: solid;border-width: 1px;margin-top: 20px;margin-left: 0px;padding-left: 10px;min-width: 500px">
<p style="color: #AAAAAA; margin-top: 10px;">Am 09.03.2021 14:00:07 schrieb commits@source.squeak.org <commits@source.squeak.org>:</p>
<div style="font-family:Arial,Helvetica,sans-serif">A new version of Monticello was added to project The Inbox:<br>
http://source.squeak.org/inbox/Monticello-ct.737.mcz<br>
<br>
==================== Summary ====================<br>
<br>
Name: Monticello-ct.737<br>
Author: ct<br>
Time: 9 March 2021, 1:59:56.826559 pm<br>
UUID: 697dc3bc-f4f7-3e43-b05d-d6a1f5fb421e<br>
Ancestors: Monticello-mt.736<br>
<br>
Revises warnings shown before saving a version. In #checkForNewVersions, do not only check the current repository (e.g. inbox) but also the sink repository (e.g. trunk). Also generalizes the idea of sink repositories and resolve hard-coded repositores in Monticello-UI.<br>
<br>
=============== Diff against Monticello-mt.736 ===============<br>
<br>
Item was added:<br>
+ ----- Method: MCRepository>>allSinkRepositories (in category 'accessing') -----<br>
+ allSinkRepositories<br>
+ "If the workflow of the receiver requires to move new versions into one of any other repositories in the end, answer all these available sink repositories here."<br>
+ <br>
+ self = MCRepository inbox ifTrue: [<br>
+ ^ {MCRepository trunk. MCRepository treated}].<br>
+ <br>
+ ^ Array empty!<br>
<br>
Item was added:<br>
+ ----- Method: MCRepository>>defaultSinkRepository (in category 'accessing') -----<br>
+ defaultSinkRepository<br>
+ "If the workflow of the receiver requires to move new versions into another repository in the end, answer this default sink repository here."<br>
+ <br>
+ self = MCRepository inbox ifTrue: [<br>
+ ^ MCRepository trunk].<br>
+ <br>
+ ^ nil!<br>
<br>
Item was changed:<br>
----- Method: MCRepositoryInspector>>save (in category 'actions') -----<br>
save<br>
+ <br>
+ | targetRepository |<br>
+ targetRepository := self pickRepository ifNil: [^ self].<br>
+ <br>
+ (self repository allSinkRepositories includes: targetRepository) ifTrue: [<br>
+ self notify: (String streamContents: [:stream |<br>
+ stream nextPutAll: 'Versions from this repository should only be moved, not copied.' translated.<br>
+ (self repository isKindOf: MCHttpRepository) ifTrue: [<br>
+ stream space; nextPutAll: ('Instead, use the web interface via {1} to manage contributions.' translated format: {(Url absoluteFromText: self repository description)<br>
+ path: '';<br>
+ downloadUrl})].<br>
+ stream cr; cr; nextPutAll: 'Do you want to proceed anyway?' withCRs translated])].<br>
+ <br>
+ repository storeVersion: self version.!<br>
- self pickRepository ifNotNil:<br>
- [:repository |<br>
- (self repository = MCRepository inbox and:<br>
- [repository = MCRepository trunk or: [repository = MCRepository treated]]) ifTrue:<br>
- [self notify: 'Versions from the inbox should only be moved, not copied. Instead, use the web interface via source.squeak.org to manage inbox contributions.\\Do you want to proceed anyway?' translated withCRs].<br>
- repository storeVersion: self version]!<br>
<br>
Item was changed:<br>
----- Method: MCWorkingCopyBrowser>>checkForNewerVersions (in category 'actions') -----<br>
checkForNewerVersions<br>
+ <br>
| newer |<br>
newer := workingCopy possiblyNewerVersionsIn: self repository.<br>
+ (newer notEmpty ==> [<br>
+ self confirm: ('{1}\\{2}\\{3}' withCRs translated format: {<br>
+ 'CAUTION!! These versions in the repository may be newer:' translated.<br>
+ (newer asCommaString withNoLineLongerThan: 150) truncateWithElipsisTo: 5 * 149.<br>
+ 'Do you really want to save this version?' translated}) ])<br>
+ ifFalse: [^ false].<br>
+ <br>
+ self repository defaultSinkRepository ifNotNil: [:sinkRepository |<br>
+ newer := workingCopy possiblyNewerVersionsIn: sinkRepository.<br>
+ (newer notEmpty ==> [<br>
+ self confirm: ('{1}\\{2}\\{3}' withCRs translated format: {<br>
+ 'CAUTION!! These versions in the sink repository\({1})\may be newer:' withCRs translated format: {sinkRepository description}.<br>
+ (newer asCommaString withNoLineLongerThan: 150) truncateWithElipsisTo: 5 * 149.<br>
+ 'Do you really want to save this version?' translated}) ])<br>
+ ifFalse: [^ false]].<br>
+ <br>
+ ^ true!<br>
- ^ newer isEmpty or: [<br>
- self confirm: 'CAUTION!! These versions in the repository may be newer:', <br>
- String cr, ((newer asCommaString withNoLineLongerThan: 150) truncateWithElipsisTo: 5 * 149), String cr,<br>
- 'Do you really want to save this version?'].!<br>
<br>
<br>
</div>
</blockquote>
</div>
</div>
</body>
</html>