subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1437001 - in /subversion/trunk/subversion/tests/cmdline: entries-dump.c svntest/main.py svntest/wc.py
Date Tue, 22 Jan 2013 15:42:29 GMT
Author: rhuijben
Date: Tue Jan 22 15:42:28 2013
New Revision: 1437001

URL: http://svn.apache.org/viewvc?rev=1437001&view=rev
Log:
* subversion/tests/cmdline/entries-dump.c
  (tree_dump_dir): Dump using the relative path to avoid problems with the
    path already stored in the access baton.

* subversion/tests/cmdline/svntest/main.py
  (run_entriesdump_tree): New function, wrapping the new --tree-dump feature
    of the entries-dump tool.

* subversion/tests/cmdline/svntest/wc.py
  (from_entries): Use run_entriesdump_tree to reduce the number of invocations
    of entries-dump by the number of directories in a working copy.

Modified:
    subversion/trunk/subversion/tests/cmdline/entries-dump.c
    subversion/trunk/subversion/tests/cmdline/svntest/main.py
    subversion/trunk/subversion/tests/cmdline/svntest/wc.py

Modified: subversion/trunk/subversion/tests/cmdline/entries-dump.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/entries-dump.c?rev=1437001&r1=1437000&r2=1437001&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/entries-dump.c (original)
+++ subversion/trunk/subversion/tests/cmdline/entries-dump.c Tue Jan 22 15:42:28 2013
@@ -280,7 +280,7 @@ tree_dump_dir(const char *local_abspath,
     path = local_abspath;
 
   printf("entries = {}\n");
-  SVN_ERR(entries_dump(local_abspath, bt->adm_access, scratch_pool));
+  SVN_ERR(entries_dump(path, bt->adm_access, scratch_pool));
 
   printf("dirs['%s'] = entries\n", path);
   return SVN_NO_ERROR;

Modified: subversion/trunk/subversion/tests/cmdline/svntest/main.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svntest/main.py?rev=1437001&r1=1437000&r2=1437001&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svntest/main.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svntest/main.py Tue Jan 22 15:42:28 2013
@@ -727,6 +727,23 @@ def run_entriesdump_subdirs(path):
                                                         0, False, None, '--subdirs', path)
   return map(lambda line: line.strip(), filter_dbg(stdout_lines))
 
+def run_entriesdump_tree(path):
+  """Run the entries-dump helper, returning a dict of a dict of Entry objects."""
+  # use spawn_process rather than run_command to avoid copying all the data
+  # to stdout in verbose mode.
+  exit_code, stdout_lines, stderr_lines = spawn_process(entriesdump_binary,
+                                                        0, False, None,
+                                                        '--tree-dump', path)
+  if exit_code or stderr_lines:
+    ### report on this? or continue to just skip it?
+    return None
+
+  class Entry(object):
+    pass
+  dirs = { }
+  exec(''.join(filter_dbg(stdout_lines)))
+  return dirs
+
 def run_atomic_ra_revprop_change(url, revision, propname, skel, want_error):
   """Run the atomic-ra-revprop-change helper, returning its exit code, stdout,
   and stderr.  For HTTP, default HTTP library is used."""

Modified: subversion/trunk/subversion/tests/cmdline/svntest/wc.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svntest/wc.py?rev=1437001&r1=1437000&r2=1437001&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svntest/wc.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svntest/wc.py Tue Jan 22 15:42:28 2013
@@ -663,21 +663,14 @@ class State:
     desc = { }
     dot_svn = svntest.main.get_admin_name()
 
-    for dirpath in svntest.main.run_entriesdump_subdirs(base):
+    dump_data = svntest.main.run_entriesdump_tree(base)
 
-      if base == '.' and dirpath != '.':
-        dirpath = '.' + os.path.sep + dirpath
+    if not dump_data:
+      # Probably 'svn status' run on an actual only node
+      # ### Improve!
+      return cls('', desc)
 
-      entries = svntest.main.run_entriesdump(dirpath)
-      if entries is None:
-        continue
-
-      if dirpath == '.':
-        parent = ''
-      elif dirpath.startswith('.' + os.sep):
-        parent = to_relpath(dirpath[2:])
-      else:
-        parent = to_relpath(dirpath)
+    for parent, entries in sorted(dump_data.items()):
 
       parent_url = entries[''].url
 



Mime
View raw message