You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2017/10/12 21:02:39 UTC

svn commit: r1812050 - in /subversion/trunk: CHANGES subversion/svnadmin/svnadmin.c subversion/svndumpfilter/svndumpfilter.c tools/client-side/bash_completion

Author: julianfoad
Date: Thu Oct 12 21:02:39 2017
New Revision: 1812050

URL: http://svn.apache.org/viewvc?rev=1812050&view=rev
Log:
Tweak the help and add Bash completion for 'svnadmin dump include/exclude'.

A follow-up to r1811992.

* CHANGES
  Note this enhancement.

* subversion/svnadmin/svnadmin.c
  (options_table): Document the '--pattern' glob syntax, like r1783741 did
    for svndumpfilter.
  (cmd_table): Say more about exclude/include in the help for 'dump'.
  (ary_prefix_match): Note that this...

* subversion/svndumpfilter/svndumpfilter.c
  (ary_prefix_match): ... and this are duplicates.

* tools/client-side/bash_completion
  (_svnadmin): Add the --exclude, --include and --pattern options.

Modified:
    subversion/trunk/CHANGES
    subversion/trunk/subversion/svnadmin/svnadmin.c
    subversion/trunk/subversion/svndumpfilter/svndumpfilter.c
    subversion/trunk/tools/client-side/bash_completion

Modified: subversion/trunk/CHANGES
URL: http://svn.apache.org/viewvc/subversion/trunk/CHANGES?rev=1812050&r1=1812049&r2=1812050&view=diff
==============================================================================
--- subversion/trunk/CHANGES (original)
+++ subversion/trunk/CHANGES Thu Oct 12 21:02:39 2017
@@ -13,6 +13,7 @@ the 1.9 release:  https://subversion.apa
     * svnbench: Show wall-clock time when done (r1703383)
     * svnbench: Show number of bytes transferred across the network (r1710586)
     * svnbench: Actually evaluate the '--with-no-revprops' option (r1709593)
+    * New 'svnadmin dump' options to include/exclude paths (r1811992)
     * New 'svnadmin load-revprops' subcommand (r1694191)
     * New 'svnadmin dump-revprops' subcommand (r1694225)
     * New '--no-flush-to-disk' option for 'svnadmin load' (r1736357, -7357)

Modified: subversion/trunk/subversion/svnadmin/svnadmin.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnadmin/svnadmin.c?rev=1812050&r1=1812049&r2=1812050&view=diff
==============================================================================
--- subversion/trunk/subversion/svnadmin/svnadmin.c (original)
+++ subversion/trunk/subversion/svnadmin/svnadmin.c Thu Oct 12 21:02:39 2017
@@ -289,7 +289,10 @@ static const apr_getopt_option_t options
      N_("filter out nodes without given prefix(es) from dump")},
 
     {"pattern", svnadmin__glob, 0,
-     N_("treat the path prefixes as file glob patterns")},
+     N_("treat the path prefixes as file glob patterns.\n"
+        "                             Glob special characters are '*' '?' '[]' and '\\'.\n"
+        "                             Character '/' is not treated specially, so\n"
+        "                             pattern /*/foo matches paths /a/foo and /a/b/foo.") },
 
     {NULL}
   };
@@ -347,7 +350,11 @@ static const svn_opt_subcommand_desc2_t
     "only the paths changed in that revision; otherwise it will describe\n"
     "every path present in the repository as of that revision.  (In either\n"
     "case, the second and subsequent revisions, if any, describe only paths\n"
-    "changed in those revisions.)\n"),
+    "changed in those revisions.)\n"
+    "\n"
+    "Using --exclude or --include gives results equivalent to authz-based\n"
+    "path exclusions. In particular, when the source of a copy source is\n"
+    "excluded, the copy is transformed into an add (unlike in 'svndumpfilter').\n"),
   {'r', svnadmin__incremental, svnadmin__deltas, 'q', 'M', 'F',
    svnadmin__exclude, svnadmin__include, svnadmin__glob },
   {{'F', N_("write to file ARG instead of stdout")}} },
@@ -1275,6 +1282,7 @@ get_dump_range(svn_revnum_t *lower,
  * Return TRUE if any prefix is a prefix of PATH (matching whole path
  * components); FALSE otherwise.
  * PATH starts with a '/', as do the (const char *) paths in PREFIXES. */
+/* This function is a duplicate of svndumpfilter.c:ary_prefix_match(). */
 static svn_boolean_t
 ary_prefix_match(const apr_array_header_t *pfxlist, const char *path)
 {

Modified: subversion/trunk/subversion/svndumpfilter/svndumpfilter.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svndumpfilter/svndumpfilter.c?rev=1812050&r1=1812049&r2=1812050&view=diff
==============================================================================
--- subversion/trunk/subversion/svndumpfilter/svndumpfilter.c (original)
+++ subversion/trunk/subversion/svndumpfilter/svndumpfilter.c Thu Oct 12 21:02:39 2017
@@ -109,6 +109,7 @@ write_propdel_to_stringbuf(svn_stringbuf
  * Return TRUE if any prefix is a prefix of PATH (matching whole path
  * components); FALSE otherwise.
  * PATH starts with a '/', as do the (const char *) paths in PREFIXES. */
+/* This function is a duplicate of svnadmin.c:ary_prefix_match(). */
 static svn_boolean_t
 ary_prefix_match(const apr_array_header_t *pfxlist, const char *path)
 {

Modified: subversion/trunk/tools/client-side/bash_completion
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/client-side/bash_completion?rev=1812050&r1=1812049&r2=1812050&view=diff
==============================================================================
--- subversion/trunk/tools/client-side/bash_completion (original)
+++ subversion/trunk/tools/client-side/bash_completion Thu Oct 12 21:02:39 2017
@@ -1115,7 +1115,7 @@ _svnadmin ()
 	# options that require a parameter
 	# note: continued lines must end '|' continuing lines must start '|'
 	optsParam="-r|--revision|--parent-dir|--fs-type|-M|--memory-cache-size"
-	optsParam="$optsParam|-F|--file"
+	optsParam="$optsParam|-F|--file|--exclude|--include"
 
 	# if not typing an option, or if the previous option required a
 	# parameter, then fallback on ordinary filename expansion
@@ -1138,7 +1138,8 @@ _svnadmin ()
 		;;
 	dump)
 		cmdOpts="-r --revision --incremental -q --quiet --deltas \
-		         -M --memory-cache-size -F --file"
+		         -M --memory-cache-size -F --file \
+		         --exclude --include --pattern"
 		;;
 	freeze)
 		cmdOpts="-F --file"