开发者

svn revision size in bytes

Is there a way to tell how big a SVN revision is?

I d开发者_开发问答on't mean in a hook, but after the fact (e.g. with svnlook?). I need the (rough) size in bytes, including any binary files that may have been added/changed.


If you mean "By how much did it increase the size of my repository?", and you have access to the server, and you are using FSFS, and you haven't packed your repository, then there is a way:

Let's assume you're looking for the "size" of revision 12345. Inside your repository's directory you'll find the subdirectory db. Here's a picture:

    repository/
        db/
            revs/
                12/
                    12345   <----+
            revprops/            | add together the sizes of these two
                12/              | files.
                    12345   <----+


Starting with Subversion 1.13 you can use the svnadmin rev-size command to find out the size of a revision. This command works both for packed and unpacked revisions.

  • New 'svnadmin rev-size' command to report revision size (r1857624)

Here is an example:

C:\Repositories>svnadmin rev-size MyRepo2 -r 1234
        4616 bytes in revision 1234

Here is a built-in help:

rev-size: usage: svnadmin rev-size REPOS_PATH -r REVISION

Print the total size in bytes of the representation on disk of
revision REVISION.

The size includes revision properties and excludes FSFS indexes.

Valid options:
  -r [--revision] ARG      : specify revision number ARG (or X:Y range)
  -q [--quiet]             : print only the size and a newline
  -M [--memory-cache-size] ARG : size of the extra in-memory cache in MB used to
                             minimize redundant operations. Default: 16.
                             [used for FSFS repositories only]

(Use '-v' to show global and experimental options.)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜