Issue #960: get repos root inot entries file

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue #960: get repos root inot entries file

Peter N. Lundblad
Hi,

I'm starting with #960, which wants to separate the repository root from
the FS path. (The most important benefit as I see it is that we can help
people avoid misusing switch and switch --relocate).

My plan is to make svn_wc__do_update_cleanup, which crawls the whole WC
(in case of a recursive update/switch) ensure that the repos-root
information is available in each entry. I think this pretty
straight-forward. One curious thing is what to do when the repos-root
doesn't match a prefix of the entry's URL. Since we've had bugs regarding
URI encoding of the repository root, I'd bet some money that we have such
working copies on users' disks. A rather unfriendly way to deal with this
might be to just error out. That's not nice, since it will make the
working copy useless. I'm leaning towards just silently not set the
repos-root in this case. We can't rely on this info to be available
anyway. I'm not sure about this, so any input would be appreciated.

Thanks,
//Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Issue #960: get repos root inot entries file

Greg Hudson
On Thu, 2005-06-02 at 23:03 +0200, Peter N. Lundblad wrote:
> My plan is to make svn_wc__do_update_cleanup, which crawls the whole WC
> (in case of a recursive update/switch) ensure that the repos-root
> information is available in each entry.

If I were doing it, I'd only worry about newly-created entries, and
wouldn't put any effort into migrating existing entries to have the
repository root information.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Issue #960: get repos root inot entries file

Peter N. Lundblad
On Thu, 2 Jun 2005, Greg Hudson wrote:

> On Thu, 2005-06-02 at 23:03 +0200, Peter N. Lundblad wrote:
> > My plan is to make svn_wc__do_update_cleanup, which crawls the whole WC
> > (in case of a recursive update/switch) ensure that the repos-root
> > information is available in each entry.
>
> If I were doing it, I'd only worry about newly-created entries, and
> wouldn't put any effort into migrating existing entries to have the
> repository root information.
>
But doing the migration is cheap, isnce we have to do it on checkout
anyway and update and checkout share code.  So I think it is reasonable in
this case

Regards,
//Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Issue #960: get repos root inot entries file

kfogel
"Peter N. Lundblad" <[hidden email]> writes:

> On Thu, 2 Jun 2005, Greg Hudson wrote:
> > On Thu, 2005-06-02 at 23:03 +0200, Peter N. Lundblad wrote:
> > > My plan is to make svn_wc__do_update_cleanup, which crawls the whole WC
> > > (in case of a recursive update/switch) ensure that the repos-root
> > > information is available in each entry.
> >
> > If I were doing it, I'd only worry about newly-created entries, and
> > wouldn't put any effort into migrating existing entries to have the
> > repository root information.
>
> But doing the migration is cheap, isnce we have to do it on checkout
> anyway and update and checkout share code.  So I think it is reasonable in
> this case

In that case, your "silently do nothing if things look hard" plan
looks pretty good.  After all, the choices are silently do nothing
sometimes, and silently do nothing all the time :-).

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Issue #960: get repos root inot entries file

Greg Hudson
In reply to this post by Peter N. Lundblad
On Thu, 2005-06-02 at 23:14 +0200, Peter N. Lundblad wrote:
> > If I were doing it, I'd only worry about newly-created entries, and
> > wouldn't put any effort into migrating existing entries to have the
> > repository root information.
> >
> But doing the migration is cheap, isnce we have to do it on checkout
> anyway and update and checkout share code.  So I think it is reasonable in
> this case

Well, get_repos_root is guaranteed to return a prefix of the passed-in
URL.  So, for a new entry there should never be a problem.  For an
existing entry you might run into the difficulty you mentioned, in which
case either overwriting the URL or failing to store the repos root would
be reasonable.

Of course, when you go to use the repos root, you'll still have to
handle the case where it's not a prefix of the entry URL since the
entries file might have become corrupt.  But erroring in that case
should be reasonable.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]