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

答复: Svnadmin dump with include will lost the svn:log in sometime

From: Nathan <qianhaiyuan_at_hikvision.com>
Date: Mon, 23 Mar 2020 05:30:14 +0000

Hi, Daniel ,

The expected behaviour is: 'svnadmin dump' should include all properties.

It happened in command : svnadmin dump --include . I was very sure this will make a malformed dump when it work with include.

I organized the calling relationship of the function:

1. svnadmin.c
static svn_error_t *
subcommand_dump(apr_getopt_t *os, void *baton, apr_pool_t *pool)
{
...
SVN_ERR(svn_repos_dump_fs4(repos, out_stream, lower, upper,
                             opt_state->incremental, opt_state->use_deltas,
                             TRUE, TRUE,
                             !opt_state->quiet ? repos_notify_handler : NULL,
                             feedback_stream,
                             filter_baton.prefixes ? dump_filter_func : NULL,
                             &filter_baton,
                             check_cancel, NULL, pool));
...
}

2. dump.c
line 2003 svn_repos_dump_fs4
line 2109 write_revision_record
line 1945 svn_repos_fs_revision_proplist
{
...
  if (include_revprops)
    {
      SVN_ERR(svn_repos_fs_revision_proplist(&props, repos, rev,
                                             authz_func, authz_baton, pool));
...
}

3. fs-wrap.c
svn_error_t *
svn_repos_fs_revision_proplist(apr_hash_t **table_p,
                               svn_repos_t *repos,
                               svn_revnum_t rev,
                               svn_repos_authz_func_t authz_read_func,
                               void *authz_read_baton,
                               apr_pool_t *pool)
{
....in this case.
}

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 <d.s_at_daniel.shahaf.name>
发送时间: 2020年3月22日 1:04
收件人: 钱海远(Nathan) <qianhaiyuan_at_hikvision.com>
抄送: users_at_subversion.apache.org
主题: 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>
Received on 2020-03-23 06:30:33 CET

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.