Greg Stein <gstein@lyra.org> writes:
> When doing a checkout/update, when would ancestor path ever get set? It
> would seem that the client doesn't care about the ancestory -- that is only
> important for the client to track when a "svn move" or "svn copy" is
> performed (and then forgotten during the commit).
I think the client does care, actually.
Consider this freaky update scenario:
1. Client reports its state to the repository. This
communicates to the server, either explicitly or implicitly,
the rev of every file in the portion of the wc being updated.
2a. Server computes the appropriate diffs to send back, based on
this state.
2b. Meanwhile, the version number of something on the client side
changes. (Maybe another, smaller update got run entirely
during the state-reporting stage of a larger update.
Whatever.)
3. The client receives the diffs from the update that started in
step 1. But for some file, the received diff is against the
wrong version. If the client isn't told what version the diff
is supposed to be against, it can't check that its local copy
is still at that version.
IOW, since the wc was not locked during a state reporting stage, the
state reported might be obsolete by the time the diffs come back. We
need ancestry (rev and path) information to detect this case.
> Given that the editor interface says the ancestor_revision is ignored when
> the ancestor_path is NULL, then when/how does the checkout/update process
> tell the WC what revision a particular file is?
The documentation is simply reiterating that ancestry must always be a
pair: you need both revision and path. One is meaningless without the
other.
So, it looks like the ancestry arguments in editor calls must be
passed when driving an update editor. (Note: the update editor may
not actually be doing these ancestry checks right now, but at any rate
it will have to once we're doing state reporting.)
For checkout, the argument is less compelling. I mean, obviously the
wc has to have all the ancestry data by the time the checkout is done,
but that's just a matter of getting it for the root dir and using it
over and over again, extending paths as necessary. It would be nice
to pass the arguments to the editor calls anyway, but I guess you
don't have to. (Yeah, having optional arguments like that makes me
feel funny too, but don't have a better answer. :-) ).
-K
Received on Sat Oct 21 14:36:17 2006