You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2011/12/19 19:49:43 UTC

svn commit: r1220893 [19/19] - in /subversion/branches/fs-py: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ build/win32/ contrib/client-side/emacs/ contrib/server-side/mod_dontdothat/ notes/ subversion/bindings/javahl/native/ s...

Modified: subversion/branches/fs-py/tools/dev/benchmarks/suite1/benchmark.py
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/tools/dev/benchmarks/suite1/benchmark.py?rev=1220893&r1=1220892&r2=1220893&view=diff
==============================================================================
--- subversion/branches/fs-py/tools/dev/benchmarks/suite1/benchmark.py (original)
+++ subversion/branches/fs-py/tools/dev/benchmarks/suite1/benchmark.py Mon Dec 19 18:49:34 2011
@@ -141,7 +141,7 @@ class Timings:
     return '\n'.join(s)
 
 
-  def compare_to(self, other):
+  def compare_to(self, other, verbose):
     def do_div(a, b):
       if b:
         return float(a) / float(b)
@@ -170,7 +170,10 @@ class Timings:
                % (' ' * len(TOTAL_RUN), selftotal, selfname))
 
 
-    s.append('      min              max              avg         operation')
+    if not verbose:
+      s.append('      avg         operation')
+    else:
+      s.append('      min              max              avg         operation')
 
     names = sorted(self.timings.keys())
 
@@ -182,23 +185,18 @@ class Timings:
       min_me, max_me, avg_me = self.min_max_avg(name)
       min_other, max_other, avg_other = other.min_max_avg(name)
 
-      s.append('%-16s %-16s %-16s  %s' % (
-                 '%7.2f|%+7.3f' % (
-                     do_div(min_me, min_other),
-                     do_diff(min_me, min_other)
-                   ),
-
-                 '%7.2f|%+7.3f' % (
-                     do_div(max_me, max_other),
-                     do_diff(max_me, max_other)
-                   ),
-
-                 '%7.2f|%+7.3f' % (
-                     do_div(avg_me, avg_other),
-                     do_diff(avg_me, avg_other)
-                   ),
+      avg_str = '%7.2f|%+7.3f' % (do_div(avg_me, avg_other),
+                                  do_diff(avg_me, avg_other))
 
-                 name))
+      if not verbose:
+        s.append('%-16s  %s' % (avg_str, name))
+      else:
+        min_str = '%7.2f|%+7.3f' % (do_div(min_me, min_other),
+                                    do_diff(min_me, min_other))
+        max_str = '%7.2f|%+7.3f' % (do_div(max_me, max_other),
+                                    do_diff(max_me, max_other))
+
+        s.append('%-16s %-16s %-16s  %s' % (min_str, max_str, avg_str, name))
 
     s.extend([
       '(legend: "1.23|+0.45" means: slower by factor 1.23 and by 0.45 seconds;',
@@ -296,6 +294,9 @@ def up(*args):
 def st(*args):
   return svn('status', *args)
 
+def info(*args):
+  return svn('info', *args)
+
 _chars = [chr(x) for x in range(ord('a'), ord('z') +1)]
 
 def randstr(len=8):
@@ -444,6 +445,7 @@ def run(levels, spread, N):
         ci(wc)
         up(wc)
         st(wc)
+        info('-R', wc)
 
         trunk_url = file_url + '/trunk'
         branch_url = file_url + '/branch'
@@ -453,6 +455,7 @@ def run(levels, spread, N):
 
         up(wc)
         st(wc)
+        info('-R', wc)
 
         svn('checkout', trunk_url, wc2)
         st(wc2)
@@ -465,6 +468,7 @@ def run(levels, spread, N):
         svn('switch', branch_url, wc2)
         modify_tree(wc2, 0.5)
         st(wc2)
+        info('-R', wc2)
         ci(wc2)
         up(wc2)
         up(wc)
@@ -477,10 +481,12 @@ def run(levels, spread, N):
 
         svn('merge', '--accept=postpone', trunk_url, wc2)
         st(wc2)
+        info('-R', wc2)
         svn('resolve', '--accept=mine-conflict', wc2)
         st(wc2)
         svn('resolved', '-R', wc2)
         st(wc2)
+        info('-R', wc2)
         ci(wc2)
         up(wc2)
         up(wc)
@@ -542,11 +548,12 @@ def cmd_compare(path1, path2):
   t1 = read_from_file(path1)
   t2 = read_from_file(path2)
 
-  print t1.summary()
-  print '---'
-  print t2.summary()
-  print '---'
-  print t2.compare_to(t1)
+  if options.verbose:
+    print t1.summary()
+    print '---'
+    print t2.summary()
+    print '---'
+  print t2.compare_to(t1, options.verbose)
 
 def cmd_combine(dest, *paths):
   total = Timings('--version');

Modified: subversion/branches/fs-py/tools/dev/benchmarks/suite1/cronjob
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/tools/dev/benchmarks/suite1/cronjob?rev=1220893&r1=1220892&r2=1220893&view=diff
==============================================================================
--- subversion/branches/fs-py/tools/dev/benchmarks/suite1/cronjob (original)
+++ subversion/branches/fs-py/tools/dev/benchmarks/suite1/cronjob Mon Dec 19 18:49:34 2011
@@ -22,8 +22,14 @@
 # This is the cronjob as run on our ASF box aka svn-qavm.
 # It uses neels' mad bash script magic called 'pat' to update and
 # build the latest trunk, invokes a benchmark and sends as mail.
+#
+# A word on 'pat': this is a grown-out-of-proportions bash script that holds
+# all the small and large tasks that I do while developing on Subversion.
+# While it works for me, it's not particularly beautifully coded --
+# wouldn't publish it in Subversion's trunk, but if you want to find out
+# what it does: http://hofmeyr.de/pat/
 
-#EMAILS=your@email.addresses
+#EMAILS=your@ema.il add@ress.es
 EMAILS=""
 
 if [ "$USER" = "neels" ]; then
@@ -52,14 +58,14 @@ if [ "$?" -ne "0" ]; then
   echo "$subject"
 else
 
-  rev="$(svn info /home/neels/pat/trunk/src | grep Revision)"
+  rev="$(/home/neels/pat/stable/prefix/bin/svn info /home/neels/pat/trunk/src | grep Revision)"
   if [ -z "$rev" ]; then
     subject="Working copy problem."
     echo "$subject" > "$results"
     echo "$subject"
   else
 
-    /home/neels/bin/pat remake
+    NONMAINTAINER=1 /home/neels/bin/pat remake
     if [ "$?" -ne "0" ]; then
       subject="Failed to build $rev."
       echo "$subject" > "$results"

Modified: subversion/branches/fs-py/tools/dev/benchmarks/suite1/run
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/tools/dev/benchmarks/suite1/run?rev=1220893&r1=1220892&r2=1220893&view=diff
==============================================================================
--- subversion/branches/fs-py/tools/dev/benchmarks/suite1/run (original)
+++ subversion/branches/fs-py/tools/dev/benchmarks/suite1/run Mon Dec 19 18:49:34 2011
@@ -18,17 +18,10 @@
 # under the License.
 
 # Where are the svn binaries you want to benchmark?
-if [ "$USER" = "neels" ]; then
-  SVN_A_NAME="1.7.x"
-  SVN_A="$HOME/pat/bench/prefix/bin/svn"
-  SVN_B_NAME="trunk"
-  SVN_B="$HOME/pat/trunk/prefix/bin/svn"
-else
-  SVN_A_NAME="1.6"
-  SVN_A="$HOME/src/svn-1.6.x/subversion/svn/svn"
-  SVN_B_NAME="trunk"
-  SVN_B="$HOME/src/svn/subversion/svn/svn"
-fi
+SVN_A_NAME="1.7.x"
+SVN_A="$HOME/pat/bench/prefix/bin/svn"
+SVN_B_NAME="trunk"
+SVN_B="$HOME/pat/trunk/prefix/bin/svn"
 
 benchmark="$PWD/benchmark.py"
 
@@ -44,13 +37,8 @@ batch(){
   spread="$2"
   N="$3"
   pre="${levels}x${spread}_"
-  echo
-  echo "---------------------------------------------------------------------"
-  echo
-  echo "Results for dir levels: $levels  spread: $spread"
   "$benchmark" "--svn=$SVN_A" run "${pre}$SVN_A_NAME" $levels $spread $N >/dev/null
   "$benchmark" "--svn=$SVN_B" run "${pre}$SVN_B_NAME" $levels $spread $N >/dev/null
-  "$benchmark" compare "${pre}$SVN_A_NAME" "${pre}$SVN_B_NAME"
 }
 
 N=6
@@ -75,22 +63,49 @@ cs=100
 {
 started="$(date)"
 echo "Started at $started"
-echo ""
+
+echo "
+*Disclaimer:* this tests only file://-URL access on a GNU/Linux VM.
+This is intended to measure changes in performance of the local working
+copy layer, *only*. These results are *not* generally true for everyone."
 
 batch $al $as $N
 batch $bl $bs $N
 batch $cl $cs $N
 
-echo ""
-echo =========================================================================
-echo ""
 "$benchmark" combine "total_$SVN_A_NAME" *x*"_$SVN_A_NAME" >/dev/null
 "$benchmark" combine "total_$SVN_B_NAME" *x*"_$SVN_B_NAME" >/dev/null
 
-echo "comparing averaged totals..."
+echo ""
+echo "Averaged-total results across all runs:"
+echo "---------------------------------------"
+echo ""
 "$benchmark" compare "total_$SVN_A_NAME" "total_$SVN_B_NAME"
 
 echo ""
+echo ""
+echo "Above totals split into separate <dir-levels>x<dir-spread> runs:"
+echo "----------------------------------------------------------------"
+echo ""
+
+for pre in "${al}x${as}_" "${bl}x${bs}_" "${cl}x${cs}_"; do
+  "$benchmark" compare "${pre}$SVN_A_NAME" "${pre}$SVN_B_NAME"
+  echo ""
+done
+
+echo ""
+echo ""
+echo "More detail:"
+echo "------------"
+echo ""
+
+for pre in "${al}x${as}_" "${bl}x${bs}_" "${cl}x${cs}_" "total_"; do
+  "$benchmark" compare -v "${pre}$SVN_A_NAME" "${pre}$SVN_B_NAME"
+  echo ""
+  echo ""
+done
+
+echo ""
 echo "Had started at $started,"
 echo "       done at $(date)"
 pwd

Modified: subversion/branches/fs-py/tools/dev/unix-build/Makefile.svn
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/tools/dev/unix-build/Makefile.svn?rev=1220893&r1=1220892&r2=1220893&view=diff
==============================================================================
--- subversion/branches/fs-py/tools/dev/unix-build/Makefile.svn (original)
+++ subversion/branches/fs-py/tools/dev/unix-build/Makefile.svn Mon Dec 19 18:49:34 2011
@@ -1352,7 +1352,8 @@ endif
 
 .PHONY: libpath
 libpath:
-	@echo export LD_LIBRARY_PATH=$(LD_LIBRARY_PATH):$$LD_LIBRARY_PATH
+	@echo export LD_LIBRARY_PATH="$(LD_LIBRARY_PATH):$$LD_LIBRARY_PATH" \
+		"PYTHONPATH=$(SVN_PREFIX)/lib/svn-python"
 
 .PHONY: start-svnserve stop-svnserve start-httpd stop-httpd
 

Modified: subversion/branches/fs-py/tools/dist/backport.pl
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/tools/dist/backport.pl?rev=1220893&r1=1220892&r2=1220893&view=diff
==============================================================================
--- subversion/branches/fs-py/tools/dist/backport.pl (original)
+++ subversion/branches/fs-py/tools/dist/backport.pl Mon Dec 19 18:49:34 2011
@@ -68,12 +68,12 @@ sub merge {
 
   if ($entry{branch}) {
     # NOTE: This doesn't escape the branch into the pattern.
-    $pattern = printf '^ [*] %s branch\|Branch:\n *%s', $entry{branch}, $entry{branch};
+    $pattern = sprintf '\V\(%s branch\|branches\/%s\|Branch:\n *%s\)', $entry{branch}, $entry{branch}, $entry{branch};
     $mergeargs = "--reintegrate $BRANCHES/$entry{branch}";
     print $logmsg_fh "Reintergrate the $entry{header}:";
     print $logmsg_fh "";
   } elsif (@{$entry{revisions}}) {
-    $pattern = 'r' . $entry{revisions}->[0];
+    $pattern = '^ [*] \V' . 'r' . $entry{revisions}->[0];
     $mergeargs = join " ", (map { "-c$_" } @{$entry{revisions}}), '^/subversion/trunk';
     if (@{$entry{revisions}} > 1) {
       print $logmsg_fh "Merge the $entry{header} from trunk:";
@@ -88,7 +88,6 @@ sub merge {
   print $logmsg_fh $_ for @{$entry{entry}};
   close $logmsg_fh or die "Can't close $logmsg_filename: $!";
 
-  $pattern = '\V'.$pattern;
   my $script = <<"EOF";
 #!/bin/sh
 set -e
@@ -96,7 +95,7 @@ $SVN diff > $backupfile
 $SVN revert -R .
 $SVN up
 $SVN merge $mergeargs
-$VIM -e -s -n -N -i NONE -u NONE -c '/^ [*] $pattern/normal! dap' -c wq $STATUS
+$VIM -e -s -n -N -i NONE -u NONE -c '/$pattern/normal! dap' -c wq $STATUS
 if $WET_RUN; then
   $SVN commit -F $logmsg_filename
 else
@@ -109,8 +108,7 @@ EOF
   $script .= <<"EOF" if $entry{branch};
 reinteg_rev=\`$SVN info $STATUS | sed -ne 's/Last Changed Rev: //p'\`
 if $WET_RUN; then
-  $SVN rm $BRANCHES/$entry{branch}\
-          -m "Remove the '$entry{branch}' branch, reintegrated in r\$reinteg_rev."
+  $SVN rm $BRANCHES/$entry{branch} -m "Remove the '$entry{branch}' branch, reintegrated in r\$reinteg_rev."
 else
   echo "Removing reintegrated '$entry{branch}' branch"
 fi
@@ -205,11 +203,13 @@ sub main {
   usage, exit 0 if @ARGV;
   usage, exit 1 unless -r $STATUS;
 
+  my $sawapproved;
   @ARGV = $STATUS;
   while (<>) {
     my @lines = split /\n/;
 
     # Section header?
+    next unless $sawapproved ||= /^Approved changes/;
     print "\n\n=== $lines[0]" and next if $lines[0] =~ /^[A-Z].*:$/i;
 
     # Backport entry?

Modified: subversion/branches/fs-py/tools/dist/dist.sh
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/tools/dist/dist.sh?rev=1220893&r1=1220892&r2=1220893&view=diff
==============================================================================
--- subversion/branches/fs-py/tools/dist/dist.sh (original)
+++ subversion/branches/fs-py/tools/dist/dist.sh Mon Dec 19 18:49:34 2011
@@ -265,15 +265,14 @@ ver_minor=`echo $VERSION | cut -d '.' -f
 ver_patch=`echo $VERSION | cut -d '.' -f 3`
 
 vsn_file="$DISTPATH/subversion/include/svn_version.h"
-
-if [ "$VERSION" != "trunk" ]; then
+if [ "$VERSION" != "trunk" ] && [ "$VERSION" != "nightly" ]; then
   sed \
-   -e "/#define *SVN_VER_MAJOR/s/[0-9]\\+/$ver_major/" \
-   -e "/#define *SVN_VER_MINOR/s/[0-9]\\+/$ver_minor/" \
-   -e "/#define *SVN_VER_PATCH/s/[0-9]\\+/$ver_patch/" \
+   -e "/#define *SVN_VER_MAJOR/s/[0-9][0-9]*/$ver_major/" \
+   -e "/#define *SVN_VER_MINOR/s/[0-9][0-9]*/$ver_minor/" \
+   -e "/#define *SVN_VER_PATCH/s/[0-9][0-9]*/$ver_patch/" \
    -e "/#define *SVN_VER_TAG/s/\".*\"/\" ($VER_TAG)\"/" \
    -e "/#define *SVN_VER_NUMTAG/s/\".*\"/\"$VER_NUMTAG\"/" \
-   -e "/#define *SVN_VER_REVISION/s/[0-9]\\+/$REVISION/" \
+   -e "/#define *SVN_VER_REVISION/s/[0-9][0-9]*/$REVISION/" \
     < "$vsn_file" > "$vsn_file.tmp"
 else
   # Don't munge the version number if we are creating a nightly trunk tarball
@@ -283,7 +282,6 @@ else
    -e "/#define *SVN_VER_REVISION/s/[0-9]\\+/$REVISION/" \
     < "$vsn_file" > "$vsn_file.tmp"
 fi
-
 mv -f "$vsn_file.tmp" "$vsn_file"
 
 echo "Creating svn_version.h.dist, for use in tagging matching tarball..."

Propchange: subversion/branches/fs-py/tools/server-side/mod_dontdothat/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Dec 19 18:49:34 2011
@@ -0,0 +1,2 @@
+*.slo
+.libs

Modified: subversion/branches/fs-py/tools/server-side/svnauthz-validate.c
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/tools/server-side/svnauthz-validate.c?rev=1220893&r1=1220892&r2=1220893&view=diff
==============================================================================
--- subversion/branches/fs-py/tools/server-side/svnauthz-validate.c (original)
+++ subversion/branches/fs-py/tools/server-side/svnauthz-validate.c Mon Dec 19 18:49:34 2011
@@ -40,10 +40,12 @@ main(int argc, const char **argv)
   svn_authz_t *authz;
   const char *authz_file;
 
-  if (argc <= 1)
+  if (argc != 2 && argc != 4 && argc != 5)
     {
-      printf("Usage:  %s PATH \n\n", argv[0]);
-      printf("Loads the authz file at PATH and validates its syntax. \n"
+      printf("Usage:  %s FILE [USER PATH [REPOS_NAME]]\n\n", argv[0]);
+      printf("Loads the authz file at FILE and validates its syntax.\n"
+             "Optionally reports the access available to USER for PATH in\n"
+             "repository REPOS_NAME.\n"
              "Returns:\n"
              "    0   when syntax is OK.\n"
              "    1   when syntax is invalid.\n"
@@ -62,6 +64,31 @@ main(int argc, const char **argv)
   /* Read the access file and validate it. */
   err = svn_repos_authz_read(&authz, authz_file, TRUE, pool);
 
+  if (!err && (argc == 4 || argc == 5))
+    {
+      const char *user = argv[2], *path = argv[3];
+      const char *repos = argc == 5 ? argv[4] : "";
+      svn_boolean_t read_access, write_access;
+
+      if (path[0] != '/')
+        path = apr_pstrcat(pool, "/", path, NULL);
+
+      err = svn_repos_authz_check_access(authz, repos, path, user,
+                                         svn_authz_write, &write_access,
+                                         pool);
+      if (!write_access && !err)
+        err = svn_repos_authz_check_access(authz, repos, path, user,
+                                           svn_authz_read, &read_access,
+                                           pool);
+      if (!err)
+        printf("user '%s' has %s access to '%s'%s%s\n",
+               user,
+               write_access ? "rw" : read_access ? "r" : "no",
+               path,
+               repos[0] ? "in repository " : "",
+               repos);
+    }
+
   svn_pool_destroy(pool);
 
   if (err)

Modified: subversion/branches/fs-py/tools/server-side/svnpredumpfilter.py
URL: http://svn.apache.org/viewvc/subversion/branches/fs-py/tools/server-side/svnpredumpfilter.py?rev=1220893&r1=1220892&r2=1220893&view=diff
==============================================================================
--- subversion/branches/fs-py/tools/server-side/svnpredumpfilter.py (original)
+++ subversion/branches/fs-py/tools/server-side/svnpredumpfilter.py Mon Dec 19 18:49:34 2011
@@ -33,6 +33,7 @@ log -vq' when run against the root of th
 will be filtered by a user with universal read access to the
 repository's data.  Do not use the --use-merge-history (-g) or
 --stop-on-copy when generating this revision log stream.
+Use the default ordering of revisions (that is, '-r HEAD:0').
 
 Return errorcode 0 if there are no additional dependencies found, 1 if
 there were; any other errorcode indicates a fatal error.