You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by SteveKing <st...@gmx.ch> on 2003/06/30 18:29:52 UTC
finding the root of a repository url
Hi,
For my subversion client (TortoiseSVN) I need to
find the root of a subversion repository url from
a log.
Right now I get the log of a directory, which
gives me all log entries and for each of those
the list of files which were changed.
Each entry in that list is a svn_log_changed_path_t
structure, and the copyfrom_path member
has a path to the changed file. But this path
is based on the repository root.
So my problem is: how do I create a full url
from those entries?
Right now I'm just doing an svn_client_ls, starting
from the url of the directory the log was done
(e.g. http://svn.collab.net/repos/svn/trunk/) and
go up step by step one folder until svn_client_ls
returns an error. This usually means that
on that path (e.g. http://svn.collab.net/repos/) there's
no subversion repository anymore and the path checked
before is the repository root.
I know this is a terrible way to do that but I haven't found
another.
I really hope that someone can point me to a
better solution to get the repository root url.
Stefan
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: finding the root of a repository url
Posted by mark benedetto king <mb...@lowlatency.com>.
On Tue, Jul 01, 2003 at 10:07:53AM -0500, cmpilato@collab.net wrote:
> steveking@gmx.ch writes:
>
> > > Ben Collins-Sussman <su...@collab.net> writes:
> > >
> > > > "SteveKing" <st...@gmx.ch> writes:
> > > >
> > > > > For my subversion client (TortoiseSVN) I need to find the root of a
> > > > > subversion repository url from a log.
> > > >
> > > > We long ago decided that we wouldn't be able to keep the repo-root and
> > > > repo-path permanently joined in an opaque URL. Someday, we decided,
> > > > we would have to store the repo-root in the entries file as another
> > > > "live" prop ("entry prop"), just like the repos-UUID.
> > >
> > > Actually, almost every use-case we knew of for storing the canonical
> > > repos URL was made irrelevant by the introduction of a stored repos
> > > UUID. So, I believe we had actually abandoned the repos URL idea
> > > altogether. This might be a reason to re-evaluate that decision.
> > >
> >
> > So you mean there's no clean way to create the correct URL of a file
> > from the path I get from svn_client_log?
>
If we were to add it as a live prop, we could report it via "svn info".
--ben
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: finding the root of a repository url
Posted by cm...@collab.net.
steveking@gmx.ch writes:
> > Ben Collins-Sussman <su...@collab.net> writes:
> >
> > > "SteveKing" <st...@gmx.ch> writes:
> > >
> > > > For my subversion client (TortoiseSVN) I need to find the root of a
> > > > subversion repository url from a log.
> > >
> > > We long ago decided that we wouldn't be able to keep the repo-root and
> > > repo-path permanently joined in an opaque URL. Someday, we decided,
> > > we would have to store the repo-root in the entries file as another
> > > "live" prop ("entry prop"), just like the repos-UUID.
> >
> > Actually, almost every use-case we knew of for storing the canonical
> > repos URL was made irrelevant by the introduction of a stored repos
> > UUID. So, I believe we had actually abandoned the repos URL idea
> > altogether. This might be a reason to re-evaluate that decision.
> >
>
> So you mean there's no clean way to create the correct URL of a file
> from the path I get from svn_client_log?
That's correct. Or, there's no way that I know of, at least.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: finding the root of a repository url
Posted by st...@gmx.ch.
> Ben Collins-Sussman <su...@collab.net> writes:
>
> > "SteveKing" <st...@gmx.ch> writes:
> >
> > > For my subversion client (TortoiseSVN) I need to find the root of a
> > > subversion repository url from a log.
> >
> > We long ago decided that we wouldn't be able to keep the repo-root and
> > repo-path permanently joined in an opaque URL. Someday, we decided,
> > we would have to store the repo-root in the entries file as another
> > "live" prop ("entry prop"), just like the repos-UUID.
>
> Actually, almost every use-case we knew of for storing the canonical
> repos URL was made irrelevant by the introduction of a stored repos
> UUID. So, I believe we had actually abandoned the repos URL idea
> altogether. This might be a reason to re-evaluate that decision.
>
So you mean there's no clean way to create the correct URL of a file
from the path I get from svn_client_log?
Stefan
--
+++ GMX - Mail, Messaging & more http://www.gmx.net +++
Bitte lächeln! Fotogalerie online mit GMX ohne eigene Homepage!
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: finding the root of a repository url
Posted by cm...@collab.net.
Ben Collins-Sussman <su...@collab.net> writes:
> "SteveKing" <st...@gmx.ch> writes:
>
> > For my subversion client (TortoiseSVN) I need to find the root of a
> > subversion repository url from a log.
>
> We long ago decided that we wouldn't be able to keep the repo-root and
> repo-path permanently joined in an opaque URL. Someday, we decided,
> we would have to store the repo-root in the entries file as another
> "live" prop ("entry prop"), just like the repos-UUID.
Actually, almost every use-case we knew of for storing the canonical
repos URL was made irrelevant by the introduction of a stored repos
UUID. So, I believe we had actually abandoned the repos URL idea
altogether. This might be a reason to re-evaluate that decision.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: finding the root of a repository url
Posted by Ben Collins-Sussman <su...@collab.net>.
"SteveKing" <st...@gmx.ch> writes:
> For my subversion client (TortoiseSVN) I need to find the root of a
> subversion repository url from a log.
We long ago decided that we wouldn't be able to keep the repo-root and
repo-path permanently joined in an opaque URL. Someday, we decided,
we would have to store the repo-root in the entries file as another
"live" prop ("entry prop"), just like the repos-UUID.
We just haven't gotten around to doing it... not sure if there's an
issue filed on this yet. But it means creating a new entry-prop, and
marshalling it to the client. It will be a change that we probably
have to roll out over a couple of releases.
Note -- I don't think we'll need to add a whole new RA->get_root()
API, just like we added RA->get_uuid(). The only reason
RA->get_uuid() exists is so that wc-less operations (like 'svn cp URL
URL') can decide if you're working against the same repository or
not. But I can't think of a reason a wc-less operation would need to
know the repos-root.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org