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

Re: [PATCH] 'hotcopy' chokes

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Mon, 23 Feb 2009 18:25:47 +0200 (Jerusalem Standard Time)

Hyrum K. Wright wrote on Mon, 23 Feb 2009 at 09:46 -0600:
>
> On Feb 21, 2009, at 5:44 AM, Daniel Shahaf wrote:
>
> > On my mirror of the repos, I see:
> >
> > % svnadmin hotcopy svn svn2
> > svnadmin: Source 'svn\db\revs\1000.pack' is not a directory
> >
> >
> > A quick look suggests that the fix (a follow-up to my r35523) might be
> >
> > [[[
> > Index: fs_fs.c
> > ===================================================================
> > --- fs_fs.c (revision 36028)
> > +++ fs_fs.c (working copy)
> > @@ -1448,7 +1448,8 @@
> > /* First, copy packed shards. */
> > for (rev = 0; rev < min_unpacked_rev; rev += max_files_per_dir)
> > {
> > - const char *packed_shard = apr_psprintf(iterpool, "%ld.pack", rev);
> > + const char *packed_shard = apr_psprintf(iterpool, "%ld.pack",
> > + rev / max_files_per_dir);
> > const char *src_subdir_packed_shard;
> > src_subdir_packed_shard = svn_path_join(src_subdir, packed_shard,
> > pool);
> >
> > ]]]
>
> The patch looks reasonable, but I haven't tested it either. Is there some
> unit test which tickles this bug?
>

There isn't; I committed r35523 as part of making sure that 'make check'
passes when packing is enabled [1]. However, if you have a repository
with shard_size == 4 and min_unpacked_rev >= 8, the bug should reproduce.

Daniel

[1] All combinations I tried passed, with one exception: svnadmin_tests 12
and 17 failed if packing was enabled via -DPACK_AFTER_EVERY_COMMIT
(r35524) instead of via the --fsfs-{packing,sharding} arguments to the
Python tests.

> -Hyrum

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1215378
Received on 2009-02-23 17:26:06 CET

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

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