tags:

views:

226

answers:

2

I've been attempting to run svnadmin pack on repos that were originally created with SVN 1.6. However, I see no output to suggest the command is doing anything. Is it the case that shard packing occurs automatically for native 1.6 repos (as opposed to on-demand for upgraded repos)? The output I expect to see is:

$ svnadmin pack /var/svn/repos
Packing shard 0...done.
Packing shard 1...done.
Packing shard 2...done.
…
Packing shard 34...done.
Packing shard 35...done.
Packing shard 36...done.
$

However I'm just seeing:

$ svnadmin pack /var/svn/repos
$

The repo that I'm trying to pack has 16 revisions, and I'm using it as a test repo with a view to packing other repos with > 1000 revs

+2  A: 

Packing only works on groups of 1000 revisions (or whatever your shard size is). If you've only got 16 revisions, the shard is still active and can't be packed.

Once you've got >1000 revisions, you can pack up the first shard.

After 2000 revisions, you can pack up the next shard, and so on.

A more complete description is available in this part of the release notes.

Oh, and to actually answer your question, it's not automatic, you'll need to run "svnadmin pack" manually each time you want to pack the old, full shards that haven't been packed yet.

Jim T
A: 

My interpretation of the documentation, specifically this line

Subversion can pack existing sharded repositories which have been upgraded to the 1.6 filesystem format (emphasis mine)

is that you only need to run pack on repositories that were created pre-1.6. So I think pack will have no effect on your native 1.6 repository.

Michael Hackner
The short answer is no. I've just checked this by creating a new repository and adding 1400 revisions to it (randomly generated and committed with svn ci). Listing the db/revs/0 directory reveals all the files in all their glory. After packing, we get a 0.pack file instead.
Jim T