On Wed, Nov 03, 2004 at 01:16:58PM -0600, kfogel@collab.net wrote:
> After chatting with Mike Pilato about this, I think there is a
> confusion of two independent questions here (plus the documentation
> could be clearer).
>
> The rule in svn_delta.h is not about out-of-dateness. It's about the
> order of editor calls -- it's trying to give callers some guidance
> about what order to do things in. I'm not actually sure why it
> specifies this particular order, but in any case it's not about
> out-of-dateness. For example, note that the rule does not talk about
> files which have changed in the target directory, even though those
> would make a difference in out-of-dateness as much as subdirs would.
Yes, I understand this fully. The ordering rule #4 allows
change_dir_prop to be called right after open_directory or before
close_directory. However, the logic I pointed out in out-of-dateness
check is invalid in the latter case. Consider an out-of-date
directory 'foo' where it fails to:
open_directory ('foo');
change_dir_prop ('foo', 'prop', 'value'); # out-of-date
But the following order will not error out:
open_directory ('foo');
open_file ('foo/bar');
apply_textdelta ('foo/bar', ...);
close_file ('foo/bar');
change_dir_prop ('foo', 'prop', 'value');
with the file change at 'foo/bar', the node_created_revision of 'foo'
in the txn is updated and is definitely up-to-date at the last
change_dir_prop, which is wrong and allowing out-of-date editor call
to go through commit.
Cheers,
CLK
- application/pgp-signature attachment: stored
Received on Thu Nov 4 02:43:49 2004