> want the public files. To make this scheme work, we would want a way
> to force users to commit public/private pairs of files in synch. This
> is possible in principle, but I'm not sure how easy it would be. In
> the worst case, Leo users could fall back on @auto, but we really
> would rather avoid that sad eventuality.
Hashing to rescue! For file foo.py ver 3, we have a private version
2368237aaee.txt.py. The name is the hash digest of contents of foo.py.
So, when you open foo.py, leo will look up the right private filei in
a priv file repo. People can commit their private files a bit
off-sync, as long as the right files end up in the repo at some point.
> BTW, it might be good for this case to put all files containing
> sentinels in a single place, so as not to overly pollute the directory
> structure in the repository.
Yeah, that's the repo :-). Like we have .bzr, we can have
.leo_structure in project root. If you send out a leo tree somewhere
(release), you will also ship that dir. GC can be done every now and
then.
> Unless I am horribly mistaken, @file! promises to relegate the
> (absolutely essential) sentinels to the background for almost all use
> cases. In effect, we get all the advantages of @thin nodes in all use
> cases.
Why not keep calling it @shadow, becase that's what it still remains?
The difference is that shadow files are also public files now.
--
Ville M. Vainio
http://tinyurl.com/vainio
Hashing to rescue! For file foo.py ver 3, we have a private version
On Wed, Mar 25, 2009 at 11:59 PM, Edward K. Ream <edre...@gmail.com> wrote:
> want the public files. To make this scheme work, we would want a way
> to force users to commit public/private pairs of files in synch. This
> is possible in principle, but I'm not sure how easy it would be. In
> the worst case, Leo users could fall back on @auto, but we really
> would rather avoid that sad eventuality.
2368237aaee.txt.py. The name is the hash digest of contents of foo.py.
So, when you open foo.py, leo will look up the right private filei in
a priv file repo. People can commit their private files a bit
off-sync, as long as the right files end up in the repo at some point.
> BTW, it might be good for this case to put all files containingYeah, that's the repo :-). Like we have .bzr, we can have
> sentinels in a single place, so as not to overly pollute the directory
> structure in the repository.
.leo_structure in project root. If you send out a leo tree somewhere
(release), you will also ship that dir. GC can be done every now and
then.
Why not keep calling it @shadow, becase that's what it still remains?
> Unless I am horribly mistaken, @file! promises to relegate the
> (absolutely essential) sentinels to the background for almost all use
> cases. In effect, we get all the advantages of @thin nodes in all use
> cases.
The difference is that shadow files are also public files now.
I'm a bit shocked that you haven't found a glaring hole in the idea. I'm starting to confront how good this scheme might be. For example, it looks like @file! does not need to care whether the public or private files are committed to bzr. As another example, the docs will no longer have to describe the 9 (!) ways to create external files.
Obviously, we can call @file! anything we want. My thinking is that the new @file might actually be all there is, so @file would seem to be the clearest choice. I'm not wild about @shadow, because @file! is an amalgam of @thin, @auto, @shadow and maybe even @edit. We probably should leave the final name for later, after all the details become clearer.
>> Hashing to rescue! For file foo.py ver 3, we have a private version
>> 2368237aaee.txt.py. The name is the hash digest of contents of foo.py.
Grab a chair.
*this is the speedup cache I've been talking about*
It will not contain @thin like nodes. It will contain the whole data
structure in a pickle [(gnx1, h1, b1, (gnx1.1, h1.1, b1.1)),
(gnx2...)]
This will allow us to avoid the slow sentinel scanning.
So, besides providing a structure for @auto nodes, it can be used to
speed up @thin nodes. Also, if we have that file available, no @auto
scanning need to be done either - just grab the structure from quickly
read pickle.
So basically, this is a rehashed version of the hash speedup scheme,
with this twist:
- "cache" files actually contain valuable data, i.e. it's not just a
function of file contents.
- cache files are published.
There *are* a few holes in the scheme (garbage collection needs to be
thought of, @shadow preserves structure on external file change etc.)
. Just wanted to throw this out quickly.
On Wed, Mar 25, 2009 at 9:45 PM, Edward K. Ream <edre...@gmail.com> wrote:I'm a bit shocked that you haven't found a glaring hole in the idea. I'm starting to confront how good this scheme might be. For example, it looks like @file! does not need to care whether the public or private files are committed to bzr. As another example, the docs will no longer have to describe the 9 (!) ways to create external files.
This is a very serious boon. I try to track the discussions here, but I can't because everything everybody says is "this would be good for @thin, but @shadow wouldn't work," "Yeah, you're right," etc.
Whatever you call the @ directive, it seems your public vs. private files are really external vs. "Leo-specific".
Grab a chair.
On Thu, Mar 26, 2009 at 3:45 AM, Edward K. Ream <edre...@gmail.com> wrote:
>> Hashing to rescue! For file foo.py ver 3, we have a private version
>> 2368237aaee.txt.py. The name is the hash digest of contents of foo.py.
*this is the speedup cache I've been talking about*
It will not contain @thin like nodes. It will contain the whole data
structure in a pickle [(gnx1, h1, b1, (gnx1.1, h1.1, b1.1)),
(gnx2...)]
This will allow us to avoid the slow sentinel scanning.
. Just wanted to throw this out quickly.