On Tue, Aug 21, 2012 at 01:05:29PM -0700, Galen Seitz wrote:
> Hi,
>
> I'm seeing what appears to me to be inconsistent or undocumented
> behavior when using the --targets option of svndumpfilter. If I want
> to remove a given path, the following works as expected:
> $ svndumpfilter exclude --drop-empty-revs path/to/delete < in > out
>
> This also works:
> $ cat > foo
> path/to/delete
> $ svndumpfilter exclude --drop-empty-revs `cat foo` < in > out
>
> However, if I use the same file with the --targets option, the
> specified path is not deleted:
> $ svndumpfilter exclude --drop-empty-revs --targets foo < in > out
>
> After some experimentation, I discovered that when using the --targets
> option, the leading slash on the path is required. This works:
> $ cat > foo
> /path/to/delete
> $ svndumpfilter exclude --drop-empty-revs --targets foo < in > out
>
> If the requirement for the leading slash is the intended behavior, it
> would be helpful if this were documented. I didn't see any mention of
> it in my searches.
This smells like a bug. Prefixes passed from the command line get
a slash prepended if they don't have it. But the same isn't done
for targets listed in the targets file, probably because this was
overlooked when the --targets option was implemented.
This shouldn't be hard to fix. Please file an issue if you have
time to do so (see http://subversion.apache.org/reporting-issues.html).
> As a side note, the documentation for
> svndumpfilter isn't clear as to the preferred position for options.
> svndumpfilter exclude PATH_PREFIX...
> Should they appear before or after the subcommand? They appear to
> work in either position.
To annoy die-hard unix fans SVN option switches work _anywhere_ on
the command line. This is a deliberate difference to CVS. E.g. the -d
option in CVS means different things depending on where it appears.
Having unique option names was a design goal of SVN's command line
interface, to prevent ambiguity and to allow options to appear anywhere.
Received on 2012-08-22 00:00:53 CEST