You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Phil Pinkerton <pc...@gmail.com> on 2009/10/01 09:57:35 UTC

Request file size attribute be added to svnlook

Although I know you can pipe svnlook to "wc -c" to obtain file size I 
think it would be great to just use "svnlook filesize" I am always 
receiving requests to limit files size commits and I typically use a 
pre-commit hook script. From time to time we like to audit the 
repositories for extremely large files. We have set rules for the users 
and try to avoid enforcing them via hook scripts, but do to space 
restraints it is necessary.

It would be nice to be able to script "svnlook filesize " to create 
reports and enforce local rules.

thanks

Phil

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2402426

Re: Request file size attribute be added to svnlook

Posted by Phil Pinkerton <pc...@gmail.com>.
On Tue, Oct 6, 2009 at 1:15 PM, C. Michael Pilato <cm...@collab.net>wrote:

> Phil Pinkerton wrote:
> > Is there a preferred method for applying the patch to the current main.c
> > file ?
>
> I'd personally opt for this route:
>
> $ cd /path/to/subversion/sources
> $ svn diff -c39805 http://svn.collab.net/repos/svn/trunk | patch -p0
>
> But that's just me.
>
> --
> C. Michael Pilato <cm...@collab.net>
> CollabNet   <>   www.collab.net   <>   Distributed Development On Demand
>
>
Thanks I used ( hope it works .. this way)

 patch -p0 < /svn/src/subversion-1.6.5/subversion/svnlook/main.c_patch
Looks like a unified context diff.
File to patch:  /svn/src/subversion-1.6.5/subversion/svnlook/main.c
Hunk #1 succeeded at 60 (offset 6 lines)
Hunk #2 succeeded at 203 (offset 6 lines)
Hunk #3 succeeded at 1308 (offset 42 lines)
Hunk #4 succeeded at 1842 (offset 28 lines)
done

-- 
" The fundamental principle here is that the justification for a physical
concept lies exclusively in its clear and unambiguous relation to the facts
that it can be experienced"   AE

Please Feed and Educate the Children... it's the least any of us can do.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2404239

Re: Request file size attribute be added to svnlook

Posted by "C. Michael Pilato" <cm...@collab.net>.
Phil Pinkerton wrote:
> Is there a preferred method for applying the patch to the current main.c
> file ?

I'd personally opt for this route:

$ cd /path/to/subversion/sources
$ svn diff -c39805 http://svn.collab.net/repos/svn/trunk | patch -p0

But that's just me.

-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2404210

Re: Request file size attribute be added to svnlook

Posted by Phil Pinkerton <pc...@gmail.com>.
On Tue, Oct 6, 2009 at 12:23 PM, C. Michael Pilato <cm...@collab.net>wrote:

> Phil Pinkerton wrote:
> > Outstanding !!  How do we update or patch our current Subversion 1.6.5
> > to include the additional Svnlook  "filesize" attribute ?
>
> You can get the patch here:
>
> http://svn.collab.net/viewvc/svn/trunk/subversion/svnlook/main.c?view=patch&r1=39805&r2=39804&pathrev=39805
>
> Just apply that to your Subversion sources, and rebuild.
>
> If you aren't building from source, you're out of luck and will need to
> wait
> for Subversion 1.7.0 to be released.
>
> --
> C. Michael Pilato <cm...@collab.net>
> CollabNet   <>   www.collab.net   <>   Distributed Development On Demand
>
>
We do build from source.

Is there a preferred method for applying the patch to the current main.c
file ?

-- 
" The fundamental principle here is that the justification for a physical
concept lies exclusively in its clear and unambiguous relation to the facts
that it can be experienced"   AE

Please Feed and Educate the Children... it's the least any of us can do.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2404202

Re: Request file size attribute be added to svnlook

Posted by "C. Michael Pilato" <cm...@collab.net>.
Phil Pinkerton wrote:
> Outstanding !!  How do we update or patch our current Subversion 1.6.5
> to include the additional Svnlook  "filesize" attribute ? 

You can get the patch here:
http://svn.collab.net/viewvc/svn/trunk/subversion/svnlook/main.c?view=patch&r1=39805&r2=39804&pathrev=39805

Just apply that to your Subversion sources, and rebuild.

If you aren't building from source, you're out of luck and will need to wait
for Subversion 1.7.0 to be released.

-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2404184

Re: Request file size attribute be added to svnlook

Posted by Phil Pinkerton <pc...@gmail.com>.
On Tue, Oct 6, 2009 at 11:54 AM, C. Michael Pilato <cm...@collab.net>wrote:

> C. Michael Pilato wrote:
> > C. Michael Pilato wrote:
> >> Julian Foad wrote:
> >>> Phil Pinkerton wrote:
> >>>> Although I know you can pipe svnlook to "wc -c" to obtain file size I
> >>>> think it would be great to just use "svnlook filesize"
> >>> [...]
> >>>
> >>> That sounds like a reasonable enhancement - to be able to get file-size
> >>> info out of 'svnlook'. It sounds like a relatively bite-sized
> >>> development. Are you, or is anyone you know, in a position to help do
> >>> it? We would be glad to help (point you in the right direction, review,
> >>> etc.).
> >> Agree about the bite-sized-ness:  we have FS APIs for fetching the sizes
> of
> >> files in both revisions and uncommitted transactions.
> >
> > Tracking this request in issue #3509:
> > http://subversion.tigris.org/issues/show_bug.cgi?id=3509
>
> ... and completed.
>
> --
> C. Michael Pilato <cm...@collab.net>
> CollabNet   <>   www.collab.net   <>   Distributed Development On Demand
>
>
Outstanding !!  How do we update or patch our current Subversion 1.6.5 to
include the additional Svnlook  "filesize" attribute ?

-- 
" The fundamental principle here is that the justification for a physical
concept lies exclusively in its clear and unambiguous relation to the facts
that it can be experienced"   AE

Please Feed and Educate the Children... it's the least any of us can do.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2404177

Re: Request file size attribute be added to svnlook

Posted by "C. Michael Pilato" <cm...@collab.net>.
C. Michael Pilato wrote:
> C. Michael Pilato wrote:
>> Julian Foad wrote:
>>> Phil Pinkerton wrote:
>>>> Although I know you can pipe svnlook to "wc -c" to obtain file size I 
>>>> think it would be great to just use "svnlook filesize"
>>> [...]
>>>
>>> That sounds like a reasonable enhancement - to be able to get file-size
>>> info out of 'svnlook'. It sounds like a relatively bite-sized
>>> development. Are you, or is anyone you know, in a position to help do
>>> it? We would be glad to help (point you in the right direction, review,
>>> etc.).
>> Agree about the bite-sized-ness:  we have FS APIs for fetching the sizes of
>> files in both revisions and uncommitted transactions.
> 
> Tracking this request in issue #3509:
> http://subversion.tigris.org/issues/show_bug.cgi?id=3509

... and completed.

-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2404166

Re: Request file size attribute be added to svnlook

Posted by "C. Michael Pilato" <cm...@collab.net>.
C. Michael Pilato wrote:
> Julian Foad wrote:
>> Phil Pinkerton wrote:
>>> Although I know you can pipe svnlook to "wc -c" to obtain file size I 
>>> think it would be great to just use "svnlook filesize"
>> [...]
>>
>> That sounds like a reasonable enhancement - to be able to get file-size
>> info out of 'svnlook'. It sounds like a relatively bite-sized
>> development. Are you, or is anyone you know, in a position to help do
>> it? We would be glad to help (point you in the right direction, review,
>> etc.).
> 
> Agree about the bite-sized-ness:  we have FS APIs for fetching the sizes of
> files in both revisions and uncommitted transactions.

Tracking this request in issue #3509:
http://subversion.tigris.org/issues/show_bug.cgi?id=3509

-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2404153

Re: Request file size attribute be added to svnlook

Posted by "C. Michael Pilato" <cm...@collab.net>.
Julian Foad wrote:
> Phil Pinkerton wrote:
>> Although I know you can pipe svnlook to "wc -c" to obtain file size I 
>> think it would be great to just use "svnlook filesize"
> [...]
> 
> That sounds like a reasonable enhancement - to be able to get file-size
> info out of 'svnlook'. It sounds like a relatively bite-sized
> development. Are you, or is anyone you know, in a position to help do
> it? We would be glad to help (point you in the right direction, review,
> etc.).

Agree about the bite-sized-ness:  we have FS APIs for fetching the sizes of
files in both revisions and uncommitted transactions.

-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2403651

Re: Request file size attribute be added to svnlook

Posted by Julian Foad <ju...@wandisco.com>.
Phil Pinkerton wrote:
> Although I know you can pipe svnlook to "wc -c" to obtain file size I 
> think it would be great to just use "svnlook filesize"
[...]

That sounds like a reasonable enhancement - to be able to get file-size
info out of 'svnlook'. It sounds like a relatively bite-sized
development. Are you, or is anyone you know, in a position to help do
it? We would be glad to help (point you in the right direction, review,
etc.).

- Julian

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2402538