<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>