You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Julian Foad <ju...@apache.org> on 2019/01/28 17:09:33 UTC
Re: [PATCH] Add '--include' and '--exclude' options to 'svnadmin dump'
Ping! Sergey or anyone, are you able to investigate this?
Julian Foad wrote on 2018-11-30:
> Hello Sergey!
>
> Your patch was filed as issue #4729
> https://issues.apache.org/jira/browse/SVN-4729
> and released in Subversion 1.10
>
> https://subversion.apache.org/docs/release-notes/1.10.html#dump-include-exclude
>
> A user has reported a problem with this feature.
> https://issues.apache.org/jira/browse/SVN-4760
>
> It looks like when the source of a copied directory is excluded, it is
> only adding the directory itself and not adding the directory's
> contents. That sounds to me like a bug -- it is not the behaviour I
> would expect.
>
> I see that the regression tests only test with an empty source directory.
> subversion/tests/cmdline/svnadmin_tests.py : dump_exclude_copysource() etc.
>
> Are you able to investigate this?
>
> --
> - Julian
>
>
> Sergey Raevskiy wrote on 2016-10-12:
> > I've attached a patch that adds '--include/--exclude' options to 'svnadmin
> > dump'. These options work similarly to 'svndumpfilter include/exclude'
> > but provide proper handling of 'copy from' paths.
> > [...]
Re: [PATCH] Add '--include' and '--exclude' options to 'svnadmin dump'
Posted by Sergey Raevskiy <Se...@visualsvn.com>.
Great!
I have tried to make a patch to fix #4672, but it didn't work
right away. Going to look again later.
On Mon, Feb 18, 2019 at 1:39 PM Julian Foad <ju...@apache.org> wrote:
>
> Thank you, Sergey! Committed and proposed for backport.
>
> A similar (but not the same) problem exists with copies in "svnrdump dump":
> https://issues.apache.org/jira/browse/SVN-4672 "Fix svnrdump to handle subtree references"
>
> Would you be interested in investigating that one too? It would be good if "svnrdump dump" could re-use the same solution as "svnadmin dump".
>
> - Julian
Re: [PATCH] Add '--include' and '--exclude' options to 'svnadmin dump'
Posted by Julian Foad <ju...@apache.org>.
Thank you, Sergey! Committed and proposed for backport.
A similar (but not the same) problem exists with copies in "svnrdump dump":
https://issues.apache.org/jira/browse/SVN-4672 "Fix svnrdump to handle subtree references"
Would you be interested in investigating that one too? It would be good if "svnrdump dump" could re-use the same solution as "svnadmin dump".
- Julian
Re: [PATCH] Add '--include' and '--exclude' options to 'svnadmin dump'
Posted by Sergey Raevskiy <Se...@visualsvn.com>.
Hello!
After some investigation I realized that PATH passed by repos
layer to AUTHZ_FUNC is not guaranted to be canonical. In fact, when
path is under copied directory (as in #4760) it does not contain
leading slash. This causes ary_prefix_match() function to ignore
those paths, since it requires canonical path.
I've attached patch with fix.
Log message:
[[[
Follow-up to r1811992: Canonicalize PATH before passing it to the FILTER_FUNC.
In some cases (e.g. for nodes under copied directories) PATH passed by
repos layer to AUTHZ_FUNC may be non-canonical (missing leading '/'). This
causes FILTER_FUNC implemented in svnadmin to wrongly report PATH as "not
included".
This fixes #4760.
* subversion/libsvn_repos/dump.c
(dump_filter_authz_func): Canonicalize PATH before passing it
to the FILTER_FUNC. Add comment.
* subversion/tests/cmdline/svnadmin_tests.py
(dump_include_copied_directory): New.
(test_list): Add new test to table.
Patch by: sergey.raevskiy{_AT_}visualsvn.com
]]]
On Fri, Feb 8, 2019 at 6:27 PM Julian Foad <ju...@apache.org> wrote:
>
> Sergey Raevskiy wrote:
> > > Ping! Sergey or anyone, are you able to investigate this?
> >
> > Hello!
> >
> > Sorry for the late reply. I'm plannig to investigate this in short time.
>
> That's good to hear! Thank you.
>
> If you need any help, please ask here or in the #svn-dev IRC channel. I'm sure we'll be happy to help as much as we can.
>
> --
> - Julian
>
>
> > > Julian Foad wrote on 2018-11-30:
> > > > https://issues.apache.org/jira/browse/SVN-4729
> [...]
> > > > A user has reported a problem with this feature.
> > > > https://issues.apache.org/jira/browse/SVN-4760
> > > >
> > > > It looks like when the source of a copied directory is excluded, it is
> > > > only adding the directory itself and not adding the directory's
> > > > contents. That sounds to me like a bug -- it is not the behaviour I
> > > > would expect.
> > > >
> > > > I see that the regression tests only test with an empty source directory.
> > > > subversion/tests/cmdline/svnadmin_tests.py : dump_exclude_copysource() etc.
Re: [PATCH] Add '--include' and '--exclude' options to 'svnadmin dump'
Posted by Julian Foad <ju...@apache.org>.
Sergey Raevskiy wrote:
> > Ping! Sergey or anyone, are you able to investigate this?
>
> Hello!
>
> Sorry for the late reply. I'm plannig to investigate this in short time.
That's good to hear! Thank you.
If you need any help, please ask here or in the #svn-dev IRC channel. I'm sure we'll be happy to help as much as we can.
--
- Julian
> > Julian Foad wrote on 2018-11-30:
> > > https://issues.apache.org/jira/browse/SVN-4729
[...]
> > > A user has reported a problem with this feature.
> > > https://issues.apache.org/jira/browse/SVN-4760
> > >
> > > It looks like when the source of a copied directory is excluded, it is
> > > only adding the directory itself and not adding the directory's
> > > contents. That sounds to me like a bug -- it is not the behaviour I
> > > would expect.
> > >
> > > I see that the regression tests only test with an empty source directory.
> > > subversion/tests/cmdline/svnadmin_tests.py : dump_exclude_copysource() etc.
Re: [PATCH] Add '--include' and '--exclude' options to 'svnadmin dump'
Posted by Sergey Raevskiy <Se...@visualsvn.com>.
> Ping! Sergey or anyone, are you able to investigate this?
Hello!
Sorry for the late reply. I'm plannig to investigate this in short time.
On Mon, Jan 28, 2019 at 8:09 PM Julian Foad <ju...@apache.org> wrote:
>
> Ping! Sergey or anyone, are you able to investigate this?
>
>
> Julian Foad wrote on 2018-11-30:
> > Hello Sergey!
> >
> > Your patch was filed as issue #4729
> > https://issues.apache.org/jira/browse/SVN-4729
> > and released in Subversion 1.10
> >
> > https://subversion.apache.org/docs/release-notes/1.10.html#dump-include-exclude
> >
> > A user has reported a problem with this feature.
> > https://issues.apache.org/jira/browse/SVN-4760
> >
> > It looks like when the source of a copied directory is excluded, it is
> > only adding the directory itself and not adding the directory's
> > contents. That sounds to me like a bug -- it is not the behaviour I
> > would expect.
> >
> > I see that the regression tests only test with an empty source directory.
> > subversion/tests/cmdline/svnadmin_tests.py : dump_exclude_copysource() etc.
> >
> > Are you able to investigate this?
> >
> > --
> > - Julian
> >
> >
> > Sergey Raevskiy wrote on 2016-10-12:
> > > I've attached a patch that adds '--include/--exclude' options to 'svnadmin
> > > dump'. These options work similarly to 'svndumpfilter include/exclude'
> > > but provide proper handling of 'copy from' paths.
> > > [...]