<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Title" content="">
<meta name="Keywords" content="">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:Calibri;
        color:windowtext;}
span.msoIns
        {mso-style-type:export-only;
        mso-style-name:"";
        text-decoration:underline;
        color:teal;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body bgcolor="white" lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri">I can make the stack available on bitbucket for people to peruse and give basic comments on at least:
<a href="https://bitbucket.org/DurhamG/hg/commits/branch/manifestrefactor">https://bitbucket.org/DurhamG/hg/commits/branch/manifestrefactor</a>  It’s not quite a final stack (treemanifestctx needs to be lazily initialized and some of the commits need some cleanup,
 comments, and better commit messages).<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:Calibri"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-family:Calibri;color:black">From: </span>
</b><span style="font-family:Calibri;color:black">Martin von Zweigbergk <martinvonz@google.com><br>
<b>Date: </b>Tuesday, July 19, 2016 at 9:30 AM<br>
<b>To: </b>Augie Fackler <raf@durin42.com>, Durham Goode <durham@fb.com><br>
<b>Cc: </b>mercurial-devel <mercurial-devel@mercurial-scm.org>, Tony Tung <tonytung@instagram.com>, Gregory Szorc <gregory.szorc@gmail.com><br>
<b>Subject: </b>Re: Manifest Refactor<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<div>
<p class="MsoNormal">If you do, please invite me too. But I suppose we shouldn't be doing that until after the freeze :-)<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Tue, Jul 19, 2016 at 5:22 AM Augie Fackler <<a href="mailto:raf@durin42.com">raf@durin42.com</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal">At a high level, this looks fine to me. If you want, we can find some<br>
time in the next couple of weeks for me to go over your series in<br>
advance.<br>
<br>
AF<br>
<br>
On Mon, Jul 18, 2016 at 4:06 PM, Durham Goode <<a href="mailto:durham@fb.com" target="_blank">durham@fb.com</a>> wrote:<br>
> The final design has come out looking like the following.  It mirrors the<br>
> changelog pretty closely, with ctx objects of various implementations, and<br>
> memctx objects for representing pending inmemory manifests.  There is no<br>
> manifest.manifest class after this.<br>
><br>
> class manifestlog(object):<br>
>     def __init__(self, opener, revlog)<br>
>     def __getitem__(self, node): return self.get(node)<br>
>     def get(self, node, dir='')<br>
>     def add(self, m, transaction, link, p1, p2...): return<br>
> m.write(transaction, ...)<br>
><br>
> class manifestrevlog(revlog):<br>
>     def dirlog(self, dir)<br>
><br>
> class manifestctx(manifestdict):<br>
>     def new(self)<br>
>     def node(self)<br>
>     def p1(self)<br>
>     def p2(self)<br>
>     def linkrev(self)<br>
>     def readfast(self, shallow=False)<br>
>     def readdelta(self, shallow=False)<br>
><br>
> class treemanifestctx(treemanifest)<br>
>     <same as manifestctx><br>
><br>
> class memmanifestctx(manifestdict):<br>
>     def new(self)<br>
>     def write(self, transaction, link, p1, p2, ....)<br>
><br>
> class memtreemanifestctx(treemanifest):<br>
>     <same as memmanifestctx><br>
>     def _addtree(...)<br>
><br>
><br>
> Notes:<br>
><br>
> - All the nasty if-tree-else-flat conditions are gone thanks to them being<br>
> separate classes<br>
><br>
> - All revlog specific operations can be accessed via<br>
> repo.manifestlog._revlog, but it has no manifest specific logic on the<br>
> revlog anymore.<br>
><br>
> - The actual manifest.py can be found <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__bpaste.net_show_ef4b138f9083&d=CwMFaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=nuarHzhP1wi1T9iURRCj1A&m=JsX2nG9CzG0mJUBXNryByh-bM5C_h5ZzRaxh2YXROQs&s=oSilNIQuf1Nf7R54BzmHmqWLMlHl2HLOh1Bd5I2GaxE&e=" target="_blank">
https://bpaste.net/show/ef4b138f9083</a> .<br>
> I have a 30 patch series that makes the transformation, so I'll start<br>
> sending that out in small chunks soon.<br>
><br>
><br>
><br>
><br>
> On 7/12/16 3:03 PM, Durham Goode wrote:<br>
>><br>
>> We'll be looking at moving to tree manifests as our source of truth over<br>
>> the next few months, and one problem area is the fact that the manifest<br>
>> class is not well factored for this usecase. This one class is the<br>
>> collection of all manifests, the accessor for information about individual<br>
>> manifests, and the storage format (revlog).<o:p></o:p></p>
</blockquote>
</div>
</div>
</div>
</div>
</body>
</html>