subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Sperling <s...@elego.de>
Subject Re: svndumpfilter does not exclude some files
Date Mon, 15 Oct 2012 10:18:46 GMT
On Mon, Oct 15, 2012 at 05:40:42PM +0800, Jason Heeris wrote:
> On 15 October 2012 17:30, Stefan Sperling <stsp@elego.de> wrote:
> > The square brackets are wildcard syntax saying "match any of the characters
> > listed within the brackets". This is part of the syntax of the fnmatch()
> > standard C function
> 
> Oh, that makes sense now. That's not the first time I've been bitten
> by using square brackets in my filenames, but oh well.
> 

Another possibly slightly unclear aspect of prefix matching (i.e.
without --pattern) is that only entire path components are matched.

That is, if you use this prefix:

 /specs/[01234]

A file called '/specs/1 foo bar.pdf' won't match, but any file within
a directory called '/specs/[01234]/'  would match, as would the file
literally called '/specs/[01234]'. In all these cases the square brackets
don't carry special meaning because the --pattern option isn't used.

> It might be good to document that a bit better though, I don't think
> it's in the SVN book or the help text.

I agree!

Please feel free to make suggestions. You can send us your proposed
changes with relatively little effort.

To enhance the help text, check out a copy of Subversion's trunk
from https://svn.apache.org/repos/asf/subversion/trunk and edit
the appropriate section of the file subversion/svndumpfilter/main.c.
Then run 'svn diff' on the working copy, redirect the output to a file,
and send this file as an attachment to the dev@ list. See for details:
http://subversion.apache.org/docs/community-guide/general.html#patches

If editing C source code is too technical, feel free to simply send an
edited version of the output of 'svndumpfilter help exclude'.
You can redirect the output to a file for editing purposes:
  svndumpfilter help exclude > help-exclude.txt
Somebody else can then embed these changes in the C source files.

The SVNbook has a separate web site with instructions for contributors,
see: http://svnbook.org

To get you started, here's a help text snippet I wrote to describe
fnmatch-style pattern matching in the help text of 'svn log' for a
new --search option in Subversion 1.8. Something similar could be done
for 'svndumpfilter help exclude' and 'svndumpfilter help include'.

log: Show the log messages for a set of revision(s) and/or path(s).
usage: 1. log [PATH][@REV]
       2. log URL[@REV] [PATH...]

  [... Some help text omitted here ...]

  If the --search option is used, log messages are displayed only if the
  provided search pattern matches any of the author, date, log message
  text (unless --quiet is used), or, if the --verbose option is also
  provided, a changed path.
  The search pattern may include "glob syntax" wildcards:
      ?      matches any single character
      *      matches a sequence of arbitrary characters
      [abc]  matches any of the characters listed inside the brackets
  If multiple --search options are provided, a log message is shown if
  it matches any of the provided search patterns. If the --search-and
  option is used, that option's argument is combined with the pattern
  from the previous --search or --search-and option, and a log message
  is shown only if it matches the combined search pattern.
  If --limit is used in combination with --search, --limit restricts the
  number of log messages searched, rather than restricting the output
  to a particular number of matching log messages.

Mime
View raw message