subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 钱海远(Nathan) <>
Subject 答复: Svnadmin dump with include can not dump the subdir into add when it's parent path was a branch
Date Mon, 23 Mar 2020 05:11:12 GMT
Yes, I think so. It's just for include. It's not a very good patch, I think , sorry for this

And it has a known issue , it will include the parent node path , this is a problem. I made
another program to delete parent node.

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 <>
发送时间: 2020年3月22日 1:35
收件人: 钱海远(Nathan) <>
主题: Re: Svnadmin dump with include can not dump the subdir into add when it's parent path
was a branch

[moving to dev@; please remove users@ from replies]

钱海远(Nathan) wrote on Sat, 21 Mar 2020 06:12 +0000:
> I found the there is a BUG in subversion 1.10.6.
> Svnadmin dump with include can not dump the subdir into add when it's parent path was
a branch:
> 1. 1、/A was copy from/XX , revision was 50, it the first revision of /A; 2. 2、There
is a subdir named /A/subdir, and several files and dir under /A/subdir; 3. 3、Try to run
“svnadmin dump /data/repos_root  --include /A/subdir >a” . The expected dump file will
include /A/subdir(revision 50) into add. But in fact there was nothing.
> 4. 4、I was try to fix this bug in the svnadmin.c  , a function named ary_prefix_match.
If the change list is the parent dir for include path, it return true. Then the dump file
will include /A/subdir and it's subdir or subfile into add , but regrettably, the dump file
will also include /A into add.

钱海远(Nathan) wrote on Sat, 21 Mar 2020 06:12 +0000:
> --- C:/Users/QIANHA~1/AppData/Local/Temp/svnadmin.c-rev30397.svn001.tmp.c____ ____ 25
11:51:32 2020
> +++ C:/Users/QIANHA~1/AppData/Local/Temp/svnadmin.c-rev30398.svn000.tmp.c____ ____ 21
12:58:58 2020
> @@ -1297,3 +1297,3 @@ ary_prefix_match(const apr_array_header_t *pfxlist
> -      if (path_len < pfx_len)
> -        continue;
> -      if (strncmp(path, pfx, pfx_len) == 0
> +      /*if (path_len < pfx_len)
> +        continue;*/
> +      if ((strncmp(path, pfx, pfx_len) == 0
> @@ -1300,0 +1301,3 @@ ary_prefix_match(const apr_array_header_t
> *pfxlist
> +        || (strncmp(pfx,path, path_len) == 0
> +          && (path_len == 1 || path[path_len] == '\0' || path[path_len] == '/'))
> +        )

Thanks for the patch.  I don't see any obvious problems with this approach.  However, the
patch as it stands causes a regression:

W: /home/daniel/src/svn/t1/./subversion/libsvn_repos/load.c:667,
W: /home/daniel/src/svn/t1/./subversion/libsvn_repos/load-fs-vtable.c:718,
W: /home/daniel/src/svn/t1/./subversion/libsvn_repos/load-fs-vtable.c:591,
W: /home/daniel/src/svn/t1/./subversion/libsvn_fs/fs-loader.c:1482,
W: /home/daniel/src/svn/t1/./subversion/libsvn_fs_fs/tree.c:2524,
W: /home/daniel/src/svn/t1/./subversion/libsvn_fs_fs/tree.c:1145: (apr_err=SVN_ERR_FS_NOT_FOUND)
W: svnadmin: E160013: File not found: transaction '0-0', path '/A/B/F'
W: CWD: /tmp/svn/subversion/tests/cmdline
W: EXCEPTION: Failure: Command failed: "/tmp/svn/subversion/svnadmin/svnadmin load --quiet
svn-test-work/repositories/svnadmin_tests-60-1"; exit code 1 Traceback (most recent call last):
  File "/home/daniel/src/svn/t1/subversion/tests/cmdline/svntest/", line 1931, in run
    rc =
  File "/home/daniel/src/svn/t1/subversion/tests/cmdline/svntest/", line 178, in
    result = self.func(sandbox)
  File "/home/daniel/src/svn/t1/subversion/tests/cmdline/", line 3510, in
    load_and_verify_dumpstream(sbox2, None, [], None, False, dump)
  File "/home/daniel/src/svn/t1/subversion/tests/cmdline/", line 304, in
    'load', '--quiet', sbox.repo_dir, *varargs)
  File "/home/daniel/src/svn/t1/subversion/tests/cmdline/svntest/", line 666, in run_command_stdin
    '"; exit code ' + str(exit_code))
svntest.Failure: Command failed: "/tmp/svn/subversion/svnadmin/svnadmin load --quiet svn-test-work/repositories/svnadmin_tests-60-1";
exit code 1
FAIL: 60: svnadmin dump with excluded paths ]]]

So, I guess the new condition should be applied to --include's but not to --exclude's?



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<>

View raw message