[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: How does one get a the size of a file?

From: Matt England <mengland_at_mengland.net>
Date: 2005-10-04 03:22:36 CEST

Ok, I just finishing hacking my way through WebSVN to get it to download
files (instead of dirs) correctly such that web browsers know the size of
the file during the download (via the Content-length header) so that
progress can be shown, etc.

There was an awful lot of hacking to be done to accomplish this, since
given there is no 'svnlook size' command.

Further, it would be awfully nice to see, in the WebSVN directory listings,
a size of the currently-displayed revision of each file (just like any good
dir listing should have). A 'svnlook size' command is really the only
feasible way to do this one.

So...this ('svnlook size') seems like it would be one of the easier things
to implement. Any takers?

For what it's worth, I'd paid (or am about to pay if I can get off my butt
and paypal him) Dale Hirt money for the RepoMerge.py work he did; I can pay
nominal amounts if someone can provide me a svn 1.2.3 patch that supports
something like 'svnlook svn' so I can use it in WebSVN.

Thanks in advance for any help,

-Matt

At 10/3/2005 01:11 PM, Matt England wrote:
>How does one get a the size of a file before checking it out?
>
>It sure would be nice to know the size from the repo metadata before
>checking it out so that I can fix the automation in WebSVN (I'm fixing
>it's scripts right now for a variety of things since I didn't hear from
>their developers on their list per my issues) such that I can put a
>"header("Content-Length: $size");" php line in their code to tell the
>web-browser how big the file is while it's download...
>
>...so that uses can see their download progress of big files (otherwise
>users have little idea how fast their connection is going and sometimes
>how long the download will take, etc).

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Oct 4 03:24:19 2005

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.