钱海远(Nathan) wrote on Mon, 23 Mar 2020 05:30 +0000:
> The expected behaviour is: 'svnadmin dump' should include all properties.
>
> It happened in command : svnadmin dump --include .
>
> I organized the calling relationship of the function:
I can't reproduce that:
[[[
% lldb -- svnadmin dump r --include=/foo
⋮
(lldb) n
Process 10902 stopped
* thread #1, name = 'svnadmin', stop reason = step over
frame #0: 0x00007ffff7d9ba71
libsvn_repos-1.so.0`svn_repos_fs_revision_proplist(table_p=0x00007fffffffddf8,
repos=0x00007ffff765b4c0, rev=0,
authz_read_func=(libsvn_repos-1.so.0`dump_filter_authz_func at dump.c:1997),
authz_read_baton=0x00007fffffffdf70, pool=0x00007ffff54b6028) at fs-wrap.c:514
511 authz_read_func,
authz_read_baton,
512 pool));
513
-> 514 if (readability == svn_repos_revision_access_none)
515 {
516 /* Return an empty hash. */
517 *table_p = apr_hash_make(pool);
(lldb) p readability
(svn_repos_revision_access_level_t) $1 = svn_repos_revision_access_full
]]]
The value svn_repos_revision_access_full is correct, and indicates that
the line you patched won't be executed.
FWIW, the backtrace at that point:
[[[
(lldb) bt
* thread #1, name = 'svnadmin', stop reason = step over
* frame #0: 0x00007ffff7d9ba71
libsvn_repos-1.so.0`svn_repos_fs_revision_proplist(table_p=0x00007fffffffddf8,
repos=0x00007ffff765b4c0, rev=0,
authz_read_func=(libsvn_repos-1.so.0`dump_filter_authz_func at dump.c:1997),
authz_read_baton=0x00007fffffffdf70, pool=0x00007ffff54b6028) at fs-wrap.c:514
frame #1: 0x00007ffff7d93633
libsvn_repos-1.so.0`write_revision_record(stream=0x00007ffff54afbe0,
repos=0x00007ffff765b4c0, rev=0, include_revprops=1,
authz_func=(libsvn_repos-1.so.0`dump_filter_authz_func at dump.c:1997),
authz_baton=0x00007fffffffdf70, pool=0x00007ffff54b6028) at dump.c:1967
frame #2: 0x00007ffff7d92fd2
libsvn_repos-1.so.0`svn_repos_dump_fs4(repos=0x00007ffff765b4c0,
stream=0x00007ffff54afbe0, start_rev=0, end_rev=0, incremental=0, use_deltas=0,
include_revprops=1, include_changes=1,
notify_func=(svnadmin`repos_notify_handler at svnadmin.c:1055),
notify_baton=0x00007ffff54afc48, filter_func=(svnadmin`dump_filter_func at
svnadmin.c:1402), filter_baton=0x00007fffffffe128,
cancel_func=(libsvn_subr-1.so.0`check_cancel at cmdline.c:1659),
cancel_baton=0x0000000000000000, pool=0x00007ffff765b028) at dump.c:2116
frame #3: 0x0000000000406892
svnadmin`subcommand_dump(os=0x00007ffff765b188, baton=0x00007fffffffe3d8,
pool=0x00007ffff765b028) at svnadmin.c:1468
frame #4: 0x00000000004052d2
svnadmin`sub_main(exit_code=0x00007fffffffe524, argc=4,
argv=0x00007fffffffe628, pool=0x00007ffff765b028) at svnadmin.c:3314
frame #5: 0x0000000000403d02 svnadmin`main(argc=4, argv=0x00007fffffffe628)
at svnadmin.c:3347
frame #6: 0x00007ffff743209b
libc.so.6`__libc_start_main(main=(svnadmin`main at svnadmin.c:3333), argc=4,
argv=0x00007fffffffe628, init=<unavailable>, fini=<unavailable>,
rtld_fini=<unavailable>, stack_end=0x00007fffffffe618) at libc-start.c:308
frame #7: 0x0000000000403bba svnadmin`_start + 42
(lldb)
]]]
That's with 1.13. I don't have 1.10 handy; however, I expect the
same is true in 1.10.
> I was very sure this will make a malformed dump when it work with include.
I expect the dump will load successfully, but TIAS.
Daniel
>
> Best Regards!
> Haiyuan Qian
> R & D Management Group
> Hangzhou Hikvision Digital Technology Co.,Ltd
> No.555 Qianmo Road, Binjiang District, Hangzhou 310052, China
> M (86)18969199712
>
> 本邮件及其附件含有海康威视公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件!
> This e-mail and its attachments contain confidential information from
> HIKVISION, which is intended only for the person or entity whose address is
> listed above. Any use of the information contained herein in any way
> (including, but not limited to, total or partial disclosure, reproduction, or
> dissemination) by persons other than the intended recipient(s) is
> prohibited. If you receive this e-mail in error, please notify the sender by
> phone or email immediately and delete it!
>
>
> -----邮件原件-----
> 发件人: Daniel Shahaf <[email protected]>
> 发送时间: 2020年3月22日 1:04
> 收件人: 钱海远(Nathan) <[email protected]>
> 抄送: [email protected]
> 主题: Re: Svnadmin dump with include will lost the svn:log in sometime
>
> 钱海远(Nathan) wrote on Sat, 21 Mar 2020 06:08 +0000:
> > I found the there is a BUG in subversion 1.10.6.
> >
> > Svnadmin dump with include will lost the svn:log in sometime.
> >
> > I was fix this issue several months ago , I forgot how to the issue
> > happened again. But I have a patch to fix this issue, the code was lost the
> > processing for SVN_PROP_REVISION_LOG.
> >
> > If there is no svn:log in the dump file , the load will be fail.
>
> Let's take these issues one at a time. The expected behaviour is:
>
> 1. 'svnadmin dump' should include all properties.
>
> 2. 'svnadmin load' should succeed even when svn:log is missing.
>
> Now, to your patch. First of all, the patch shouldn't affect svnadmin's
> behaviour in any way, because svnadmin doesn't enter the codepath your
> changed: that codepath is only used when authz is in effect, and svnadmin
> never does authz. (That's how #1 is implemented.) Did you perchance run
> 'svnrdump dump' instead? That'd explain why your patch had an effect.
>
> Next, omitting svn:log in the svn_repos_revision_partial_access case is not a
> bug; it's deliberately this way.
>
> If you can reproduce a case in which either #1 or #2 don't hold, that would
> be a bug. However, given that your patch had an effect, you are probably
> using some tool other than svnadmin. So, please quote the command lines you
> entered and the error messages they generated.
>
> ________________________________
> CONFIDENTIALITY NOTICE: This electronic message is intended to be viewed only
> by the individual or entity to whom it is addressed. It may contain
> information that is privileged, confidential and exempt from disclosure under
> applicable law. Any dissemination, distribution or copying of this
> communication is strictly prohibited without our prior permission. If the
> reader of this message is not the intended recipient, or the employee or
> agent responsible for delivering the message to the intended recipient, or if
> you have received this communication in error, please notify us immediately
> by return e-mail and delete the original message and any copies of it from
> your computer system. For further information about Hikvision company. please
> see our website at www.hikvision.com<http://www.hikvision.com>
>