On Tue, Jan 02, 2001 at 02:17:43PM -0600, Karl Fogel wrote:
>...
> Now, it may be that the actual changes are scattered among entities
> far down in the tree, leaving many intermediate directories with no
> changes at all. But even in that case, one replace_root() call is
> certainly sufficient: you just end up with a lot of
> replace_directory() calls containing more replace_directory() calls,
> all the way down until the leaf layers, which will have actual
> replace_file()'s, etc.
It is possible that (at some point in the future) these "no effect"
replace_directory calls might have an undesirable side effect. For example,
we might open a WC admin dir for changes, perform no changes, then close the
admin dir. A bit of wasted time (no biggy), but possibly changes in
timestamps. Those timestamps may cause a problem.
Just blue-skying. And a nit anyhow. But it is kind of nice to be able to
avoid any semblance of a change when it doesn't really happen.
> There was a nice symmetry to this, because it meant that one change
> "atom" was always a perfectly nested tree-delta (either in XML or as a
> pattern of editor calls). It had one root, and everything took place
> within that root.
>
> If we allow multiple change-roots, so the thinking went, then it's
> hard to tell the difference between a single atom and a group of
> several atoms.
Or redefine your "atom" to be "delta-pkg" and you're on safe ground again :-)
> However, in practice, I doubt it would be hard to tell the difference.
> For updates (which aren't atomic anyway, but never mind that), the
> grouping is by the edit itself -- everything from get_editor() to
> close_edit(). For commits, the same is true on the client side, and
> on the server side, the txn is the real grouping. And when expressed
> in XML, an "atom" would just be everything inside a delta-pkg.
In a commit, we tell the server to commit all changes at close_edit time. So
yes... you can have any number of replace_root calls -- no biggy.
> Therefore, having multiple replace_roots() results in no theological
> inconsistency as far as I can tell.
Agreed. However, we have some API changes to allow for multiple replace_root
calls. For example: how is the first differentiated from the second?
get_editor("/some/path")
replace_root("subdir/another")
close_dir()
replace_root("xyzdir/subsub")
close_dir()
close_edit()
We don't have the relative path in the replace_root call.
Cheers,
-g
--
Greg Stein, http://www.lyra.org/
Received on Sat Oct 21 14:36:19 2006