<div dir="ltr">OK here&#39;s what I came up with, and it&#39;s not pretty.  But it is useful.  Should this be included in MCCacheRepository or MCFileBasedRepository as a general facility?  IMO, yes, to have some poor soul going down this same route.  But I want to canvas opinion first.  Nte that one wpould think all one had to do was <div><div><br></div><div><span class="" style="white-space:pre">        </span>cacheRepo storeVersion: (repo versionNamed: versionName).<br></div><div><br></div><div>but MCCacheRepository defeats that simple route with</div><div><br></div><div><div>MCCacheRepository &gt;&gt;basicStoreVersion: aVersion</div><div><span class="" style="white-space:pre">        </span>(aVersion isCacheable not or: [self allFileNames includes: aVersion fileName])</div><div><span class="" style="white-space:pre">                </span>ifFalse: [super basicStoreVersion: aVersion]</div></div><div><br></div><div>So that leaves the brute-force:</div><div><br></div><div><div>cachedNonDiffyVersionNamed: versionName from: repo</div><div><span class="" style="white-space:pre">        </span>&quot;Make sure that the cache contains a non-diffy version of versionName and  answer it.&quot;</div><div><span class="" style="white-space:pre">        </span>| cacheRepo |</div><div><span class="" style="white-space:pre">        </span>self assert: (versionName endsWith: &#39;.mcz&#39;).</div><div><span class="" style="white-space:pre">        </span>cacheRepo := MCCacheRepository default.</div><div><span class="" style="white-space:pre">        </span>&quot;Make sure that at least the diffy (.mcd) version is present&quot;</div><div><span class="" style="white-space:pre">        </span>(cacheRepo directory includesKey: versionName) ifFalse:</div><div><span class="" style="white-space:pre">                </span>[cacheRepo storeVersion: (repo versionNamed: versionName)].</div><div><span class="" style="white-space:pre">        </span>&quot;if after storeVersion there&#39;s still no .mcz we need to create one; sigh...&quot;</div><div><span class="" style="white-space:pre">        </span>(cacheRepo directory includesKey: versionName) ifFalse:</div><div><span class="" style="white-space:pre">                </span>[| baseName diffyVersionName diffyVersion file delete |</div><div><span class="" style="white-space:pre">                </span> baseName := versionName allButLast: 4. &quot;strip .mcz&quot;</div><div><span class="" style="white-space:pre">                </span> diffyVersionName := cacheRepo directory fileNames detect: [:fn| (fn endsWith: &#39;.mcd&#39;) and: [(fn copyUpTo: $() = baseName]].</div><div><span class="" style="white-space:pre">                </span> diffyVersion := cacheRepo versionNamed: diffyVersionName.</div><div><span class="" style="white-space:pre">                </span> file := cacheRepo directory newFileNamed: versionName.</div><div><span class="" style="white-space:pre">                </span> delete := false.</div><div><span class="" style="white-space:pre">                </span> [file binary.</div><div><span class="" style="white-space:pre">                </span>  [MCMczWriter fileOut: diffyVersion on: file]</div><div><span class="" style="white-space:pre">                        </span>on: Error</div><div><span class="" style="white-space:pre">                        </span>do: [:ex|</div><div><span class="" style="white-space:pre">                                </span>delete := true. &quot;don&#39;t leave half-formed .mcz files around to screw things up later on...&quot;</div><div><span class="" style="white-space:pre">                                </span>ex pass]]</div><div><span class="" style="white-space:pre">                        </span>ensure:</div><div><span class="" style="white-space:pre">                                </span>[file close.</div><div><span class="" style="white-space:pre">                                </span> delete ifTrue:</div><div><span class="" style="white-space:pre">                                        </span>[cacheRepo directory deleteFileNamed: versionName]].</div><div><span class="" style="white-space:pre">                </span> &quot;now delete the damn diffy version that caused all the pain in the first place&quot;</div><div><span class="" style="white-space:pre">                </span> delete ifFalse:</div><div><span class="" style="white-space:pre">                        </span>[cacheRepo directory deleteFileNamed: diffyVersionName].</div><div><span class="" style="white-space:pre">                </span> cacheRepo cacheAllFilenames].</div><div><span class="" style="white-space:pre">        </span>^cacheRepo versionNamed: versionName</div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 8, 2014 at 4:12 PM, Eliot Miranda <span dir="ltr">&lt;<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi All,<div><br></div><div>    so *how* do I ensure I have a .mcz when there appears to only be a .mcd?  I&#39;m talking about trying to get &#39;Kernel-ul.875.mcz&#39; from trunk when Kernel-ul.875(eem.872).mcd appears to be on offer.  If I try <br clear="all"><div><br></div><div>MCCacheRepository default storeVersion: (trunk versionNamed: &#39;Kernel-ul.875.mcz&#39;) I *do not* get a &#39;Kernel-ul.875.mcz&#39; in my cache repository.  I&#39;m f*&amp;^%d until I can get this working.  help, please!</div><span class="HOEnZb"><font color="#888888"><div><br>-- <br></div>best,<div>Eliot</div>
</font></span></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div>
</div>