First off: we have *two* paths of interest during a commit walk:
1) the URL pointing at the repository
2) the filesystem path for local files
The RA library uses (1) to know where to commit the changes. But it needs
(2) to fetch properties stored on the local system.
On Tue, Dec 19, 2000 at 01:06:51PM -0600, Karl Fogel wrote:
> Greg Stein <email@example.com> writes:
> > During the walk for the commit, I need the PATH for the "current" node so
> > that I can pass it to svn_wc_prop_*(). But the best that I can come up with
> > is to use "." at the start of the walk, and then to append paths on the way
> > up/down.
> > The problem with this, though is when somebody does:
> > $ svn commit some/dir/way/down
> > The current directory will not match the root of the commit walk, so the "."
> > will not work properly. I think the proper answer is to pass a path into
> > the replace_root() editor function.
> If someone does
> $ svn commit
> that's the same as
> $ svn commit .
> just like with CVS. Thus, it works the same as
> $ svn commit some/dir/way/down
> that is, for each of the path argument(s), you start a particular
> append spree with that argument, telescoping down and back up. If
> there's another argument, do the same for that.
> Am I missing the point here? (I didn't completely understand the
> scenario you were describing, so I might be talking about the wrong
I'm presuming that the commit process will begin at ".../down" rather than
".". In other words, we call RA->open with the repository URL at .../down.
And then call replace_root() there.
[ the alternative is to call RA->open with the URL corresponding to "." and
then do a replace_dir all the way down to .../down; those are wasted
replace_dirs, though. ]
In the above case, I cannot construct a filesystem path to pass to the WC to
fetch properties. I never saw "some", "dir", "way", or "down" in replace_dir
arguments. Therefore, I can't "telescope" a path which can be used from the
current-dir down to the appropriate file.
But even so, if the RA/DAV *knows* that it needs to call svn_wc_prop_get()
to get information about the [commit] walker resources, then we've tied the
two together too strongly. This was the point about the svn_resource stuff,
and passing that into the editor callbacks.
Greg Stein, http://www.lyra.org/
Received on Sat Oct 21 14:36:17 2006