You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Konstantin Kolinko <kn...@gmail.com> on 2011/10/03 13:50:30 UTC

Re: Purging pristines

2011/7/28 Daniel Shahaf <da...@elego.de>:
> Julian Foad wrote on Thu, Jul 28, 2011 at 10:09:28 +0100:
>> On Mon, 2011-07-25, Daniel Shahaf wrote:
>> > I've noticed several times that 'svn cleanup' trims down the
>> > .svn/pristine/ hierarchy:
>> [...]
>> > Are pristines purged at other times?
>>
>> No.
>>
>> >   If not, should we release-note
>> > a recommendation to run 'cleanup' periodically?
>>
>> Yes.
>>
>
> r1151946.
>
>> And IMO we should work on purging unused pristines automatically, for
>> 1.7.x if possible.
>>

Continuing this thread from end of July...

1. There is no issue in issue tracker for this problem (purging unused
pristines).
and Release notes say "see issue #XXX"

2. The problem is worse than it seemed:
svn cleanup  does not help for complex wcs, because it does not
recurse into externals!

If I use TortoiseSVN 1.7, there is a checkbox  "[x] Include externals"
n this command and it is checked on by default.

But in the command line client there is no support for that: neither
it does recurse automatically, nor it has options to enable recursion
(it does not support --depth argument or anything like
--exclude-externals, --include-externals).

This cleanup issue is known but is treated as enhancement and is unscheduled:
http://subversion.tigris.org/issues/show_bug.cgi?id=2325

It is a nightmare to have to list all my dir externals explicitly to
run cleanup on them.


3. Note, that the space wasted by unused pristines is not proportional
to change size, but proportional to (number of changed files) *
(average size of a file). It grows fast.


I am running nightly build built from 1.7.x branch by TortoiseSVN,
svn, version 1.7.0-dev (under development)
   compiled Sep 28 2011, 00:15:41

Best regards,
Konstantin Kolinko

Re: Purging pristines

Posted by Julian Foad <ju...@wandisco.com>.
Daniel Shahaf wrote:
> Do we need to add an 'svn cleanup --include-externals' flag?  It's an
> API change so if we need it we need to add it now.

I suggest that although the issue is annoying it's not critical enough
to hold up 1.7.0, and we should be making the WC management code delete
its unused pristines automatically in a point release soon so we do not
need to make 'cleanup' recurse into externals.

- Julian



Re: Purging pristines

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Do we need to add an 'svn cleanup --include-externals' flag?  It's an
API change so if we need it we need to add it now.

Konstantin Kolinko wrote on Mon, Oct 03, 2011 at 15:50:30 +0400:
> 2. The problem is worse than it seemed:
> svn cleanup  does not help for complex wcs, because it does not
> recurse into externals!
> 
> 
> 3. Note, that the space wasted by unused pristines is not proportional
> to change size, but proportional to (number of changed files) *
> (average size of a file). It grows fast.

Re: Purging pristines

Posted by Philip Martin <ph...@wandisco.com>.
"Bert Huijben" <be...@qqmail.nl> writes:

>> -----Original Message-----
>> From: Philip Martin [mailto:philip.martin@wandisco.com]
>> 
>> It's not hard if you have some sort of shell programming language, look
>> for lines starting X in the output of 'svn st --ignore-externals' and
>> run cleanup on the paths in those lines.  I suppose it's harder to do
>> that sort of thing on Windows than Unix.
>
> That assumes that directory externals are directly below versioned
> directories, which doesn't have to be the case.

In that case run 'svn status' and look for lines "Performing status on
external item" and run cleanup on the paths in those lines.

-- 
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com

RE: Purging pristines

Posted by Bert Huijben <be...@qqmail.nl>.

> -----Original Message-----
> From: Philip Martin [mailto:philip.martin@wandisco.com]
> Sent: maandag 3 oktober 2011 14:33
> To: Konstantin Kolinko
> Cc: dev
> Subject: Re: Purging pristines
> 
> Konstantin Kolinko <kn...@gmail.com> writes:
> 
> > It is a nightmare to have to list all my dir externals explicitly to
> > run cleanup on them.
> 
> It's not hard if you have some sort of shell programming language, look
> for lines starting X in the output of 'svn st --ignore-externals' and
> run cleanup on the paths in those lines.  I suppose it's harder to do
> that sort of thing on Windows than Unix.

That assumes that directory externals are directly below versioned
directories, which doesn't have to be the case.

	Bert 


Re: Purging pristines

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Konstantin Kolinko wrote on Mon, Oct 03, 2011 at 17:27:16 +0400:
> 2011/10/3 Philip Martin <ph...@wandisco.com>:
> > Konstantin Kolinko <kn...@gmail.com> writes:
> >
> >> It is a nightmare to have to list all my dir externals explicitly to
> >> run cleanup on them.
> >
> > It's not hard if you have some sort of shell programming language, look
> > for lines starting X in the output of 'svn st --ignore-externals' and
> > run cleanup on the paths in those lines.  I suppose it's harder to do
> > that sort of thing on Windows than Unix.
> >
> 
> Yes, I am mostly on Windows.
> 
> I know how to do tricks, but it is harder to teach users that they
> have to use shell programming here.

Easy workaround: include a shell/batch script in the root of trunk that
runs cleanup for all externals in trunk.

Re: Purging pristines

Posted by Konstantin Kolinko <kn...@gmail.com>.
2011/10/3 Philip Martin <ph...@wandisco.com>:
> Konstantin Kolinko <kn...@gmail.com> writes:
>
>> It is a nightmare to have to list all my dir externals explicitly to
>> run cleanup on them.
>
> It's not hard if you have some sort of shell programming language, look
> for lines starting X in the output of 'svn st --ignore-externals' and
> run cleanup on the paths in those lines.  I suppose it's harder to do
> that sort of thing on Windows than Unix.
>

Yes, I am mostly on Windows.

I know how to do tricks, but it is harder to teach users that they
have to use shell programming here.


2011/10/3 Daniel Shahaf <d....@daniel.shahaf.name>:
> Do we need to add an 'svn cleanup --include-externals' flag?  It's an
> API change so if we need it we need to add it now.

I personally would prefer that svn cleanup recursed into externals automatically
(as does svn up etc,)  and to have "--exclude-externals" flag.

TortoiseSVN already has this recursing feature, so either it is already in API,
or Stefan has implemented a clever workaround around it.


Best regards,
Konstantin Kolinko

Re: Purging pristines

Posted by Philip Martin <ph...@wandisco.com>.
Konstantin Kolinko <kn...@gmail.com> writes:

> It is a nightmare to have to list all my dir externals explicitly to
> run cleanup on them.

It's not hard if you have some sort of shell programming language, look
for lines starting X in the output of 'svn st --ignore-externals' and
run cleanup on the paths in those lines.  I suppose it's harder to do
that sort of thing on Windows than Unix.

-- 
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com