A long long time ago, in a galaxy far away, I wrote a couple of
functions, namely svn_path_get_absolute(), and
svn_path_condense_targets(), that were meant to deal with situations
such as this. The first takes a path and returns the absolute form of
it. The second takes a list of paths, and returns 1) The absolute path
that is common to all of the paths, and 2) A list of paths relative to
that common path. These were written to be able to find the directory
to call replace_root (or whatever we're calling it now) from when given
a situation like the following:
kevin@pilchie /home/kevin/projects/t1/$ svn commit iota ~/projects/t2
In this case, it will return with:
/home/kevin/projects
t1/iota
t2
It also does one other thing. If something is contained in another
target, it removes the redundant one, which works for commits and
updates, but isn't necessarily so great for propget. i.e.
kevin@pilchie /home/kevin/projects/t1$ svn propget . iota
will return only /home/kevin/projects/t1 since iota is in t1.
Anyway, take a look at them, and see if you can convince them to do what
you need. They are in svn_subr.h, and libsvn_subr/target.c
On Mon, Mar 19, 2001 at 12:10:51AM -0600, B. W. Fitzpatrick wrote:
>
> The problem: proplist works from inside ../WORKING_COPY, but not from
> ./WORKING_COPY
>
> The example:
>
> pantheon: ...tests$ ../svn proplist t1/iota
> lexicon : cryptonalysis
> ocean : atlantic
> bat : bandersnatch
> color : blue
> pantheon: ...tests$ cd t1
> pantheon: ...t1$ ../../svn proplist iota
>
> svn_error: #21015 svn_wc__prop_path: is not a working copy directory
> pantheon: ...t1$
>
> By the way: This doesn't happen with directories, e.g. 't1/A'
>
> I tracked this behavior down to prop_path_internal in adm_files.c. It
> seems to have trouble when that function gets to svn_path_split and
> winds up with a path of "".
>
> So, should I look into fixing this in prop_path_internal or focus
> efforts on canonicalize_path (which would obviate the need to do
> anything to prop_path_internal as it would then do The Right Thing)?
>
> -Fitz
>
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Kevin Pilch-Bisson http://www.pilch-bisson.net
"Historically speaking, the presences of wheels in Unix
has never precluded their reinvention." - Larry Wall
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- application/pgp-signature attachment: stored
Received on Sat Oct 21 14:36:26 2006