You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Stefan <lu...@gmx.de> on 2015/08/12 01:17:46 UTC

detach.py script isn't updated for 1.8/1.9

Hi,

this was brought up by a user on IRC who wanted to use the 
detach.py-script with a 1.8 WC.

Looking at the script (in tools\client-side) around line 78 suggest it 
was not updated for the 1.8/1.9 WC format (31):

[...]
   # We only know how to handle format 29 working copies
   assert user_version == 29
[...]

Would it be possible to fix/update that script so it will also be usable 
with 1.8/1.9 WCs?
stefan2 suggested that Bert or philipm might know best.

Regards,
Stefan

Re: detach.py script isn't updated for 1.8/1.9

Posted by Julian Foad <ju...@btopenworld.com>.
Stefan Sperling wrote:
> On Wed, Aug 19, 2015 at 10:34:19PM +0200, Stefan wrote:
>> In the light of this script surviving the release of 1.10 I'd though suggest
>> to add the known issue as a comment to the top of the file:
>>
>> # Note: This script has a hardcoded check for a 1.7 WC format. It won't work
>> # with 1.8+ WCs.
>> # As stated in the  exception it's unfinished and not ready for use.

I added this note, with a bit more detail and a link to this thread,
in r1696722.

> I would still prefer just deleting the script.
> Anyone sufficiently interested can find it in our repository history.

I deleted it in r1696742. The note will be useful to anyone who
resurrects the latest (deleted) version.

Other observations:

We first included this script in the 1.8.0 release, and listed it in
the 'CHANGES' file as a "new w/c subtree duplication tool". Oops!

This script is mentioned as a temporary solution in issue #2884,
http://subversion.tigris.org/issues/show_bug.cgi?id=2884 "Implement
'svn detach' for copying partial working copies".

- Julian

Re: detach.py script isn't updated for 1.8/1.9

Posted by Stefan Sperling <st...@elego.de>.
On Wed, Aug 19, 2015 at 10:34:19PM +0200, Stefan wrote:
> >Stefan <lu...@gmx.de> writes:
> >
> >>2. add some documentation to the script to point out it's an
> >>experiment and can be used as a starting point, if someone needs the
> >>functionality and cannot use a different approach
> >When run the only thing the script does is print:
> >
> >   Exception: This script is unfinished and not ready to be used on live data.
> >       Trust us.
> >
> >I don't really see how we could make it clearer.
> Oops. That part I overlooked. Yes this certainly reduces the issue I
> initially saw here and therefore I guess unless s/o supports solution 1 or
> 3, nothing would be worth to add for no 2.
> 
> In the light of this script surviving the release of 1.10 I'd though suggest
> to add the known issue as a comment to the top of the file:
> 
> # Note: This script has a hardcoded check for a 1.7 WC format. It won't work
> # with 1.8+ WCs.
> # As stated in the  exception it's unfinished and not ready for use.

I would still prefer just deleting the script.
Anyone sufficiently interested can find it in our repository history.

Re: detach.py script isn't updated for 1.8/1.9

Posted by Stefan <lu...@posteo.de>.
> Stefan <lu...@gmx.de> writes:
>
>> 2. add some documentation to the script to point out it's an
>> experiment and can be used as a starting point, if someone needs the
>> functionality and cannot use a different approach
> When run the only thing the script does is print:
>
>    Exception: This script is unfinished and not ready to be used on live data.
>        Trust us.
>
> I don't really see how we could make it clearer.
Oops. That part I overlooked. Yes this certainly reduces the issue I 
initially saw here and therefore I guess unless s/o supports solution 1 
or 3, nothing would be worth to add for no 2.

In the light of this script surviving the release of 1.10 I'd though 
suggest to add the known issue as a comment to the top of the file:

# Note: This script has a hardcoded check for a 1.7 WC format. It won't work
# with 1.8+ WCs.
# As stated in the  exception it's unfinished and not ready for use.

Regards,
Stefan

Re: detach.py script isn't updated for 1.8/1.9

Posted by Philip Martin <ph...@wandisco.com>.
Stefan <lu...@gmx.de> writes:

> 2. add some documentation to the script to point out it's an
> experiment and can be used as a starting point, if someone needs the
> functionality and cannot use a different approach

When run the only thing the script does is print:

  Exception: This script is unfinished and not ready to be used on live data.
      Trust us.

I don't really see how we could make it clearer.

-- 
Philip Martin
WANdisco

Re: detach.py script isn't updated for 1.8/1.9

Posted by Stefan <lu...@gmx.de>.
Hi,
> Stefan Sperling <st...@elego.de> writes:
>
>> On Mon, Aug 17, 2015 at 11:03:12AM +0100, Philip Martin wrote:
>>> The script was an experiment that was never finished.
> I was wrong, the script does handle SQLite indices as it copies the
> entire schema.  The main problem is we don't really know how well it
> works or exactly what has to change to update it.
>
>> Why don't we just remove it?
> It was an experiment and it got forgotten.
Thanks for the insight, Philip.

So I guess the question remains, whether it should be removed or not and 
if it is removed whether it should also be removed from 1.8 and 1.9.

I can just provide some thoughts from the users point of view here, in 
case u want to take that into account for ur decision:
The script as it stands right now is not usable with any of the three 
versions (1.8, 1.9, 1.10). It simply doesn't work without modification 
on the WC. Therefore to a user it looks like it's bugged.

That leaves it with the single usage of acting as some means of 
documentation for someone to approach the use-case to detach part of a WC.
Given that there is no other way to do this with the core SVN version, 
it would not be unreasonable to keep that script for this purpose.

So guess there would be three options to go:
1. make the detach-script compatible with 1.8/1.9 and provide this in a 
bugfix release
2. add some documentation to the script to point out it's an experiment 
and can be used as a starting point, if someone needs the functionality 
and cannot use a different approach
3. drop the script

Regards,
Stefan

Re: detach.py script isn't updated for 1.8/1.9

Posted by Philip Martin <ph...@wandisco.com>.
Stefan Sperling <st...@elego.de> writes:

> On Mon, Aug 17, 2015 at 11:03:12AM +0100, Philip Martin wrote:
>> The script was an experiment that was never finished.

I was wrong, the script does handle SQLite indices as it copies the
entire schema.  The main problem is we don't really know how well it
works or exactly what has to change to update it.

> Why don't we just remove it?

It was an experiment and it got forgotten.

-- 
Philip Martin
WANdisco

Re: detach.py script isn't updated for 1.8/1.9

Posted by Stefan Sperling <st...@elego.de>.
On Mon, Aug 17, 2015 at 11:03:12AM +0100, Philip Martin wrote:
> The script was an experiment that was never finished.

Why don't we just remove it?

Re: detach.py script isn't updated for 1.8/1.9

Posted by Philip Martin <ph...@wandisco.com>.
Stefan <lu...@gmx.de> writes:

> Would it be possible to fix/update that script so it will also be
> usable with 1.8/1.9 WCs?

Unlikely.  Getting the script to handle the client-size move tracking
that is recorded in 1.8 would be complicated.  The script will only run
if you remove the "This script is unfinished" message and it is true
that support for 1.7 is not complete, e.g. no support for SQLite
indices.  The script was an experiment that was never finished.

-- 
Philip Martin
WANdisco