subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From phi...@apache.org
Subject svn commit: r1571992 - /subversion/trunk/subversion/svnadmin/svnadmin.c
Date Wed, 26 Feb 2014 10:30:07 GMT
Author: philip
Date: Wed Feb 26 10:30:07 2014
New Revision: 1571992

URL: http://svn.apache.org/r1571992
Log:
* subversion/svnadmin/svnadmin.c
  (subcommand_lslocks): Enable cancellation for 'svnadmin lslocks', use
   an iteration pool.

Modified:
    subversion/trunk/subversion/svnadmin/svnadmin.c

Modified: subversion/trunk/subversion/svnadmin/svnadmin.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnadmin/svnadmin.c?rev=1571992&r1=1571991&r2=1571992&view=diff
==============================================================================
--- subversion/trunk/subversion/svnadmin/svnadmin.c (original)
+++ subversion/trunk/subversion/svnadmin/svnadmin.c Wed Feb 26 10:30:07 2014
@@ -2031,6 +2031,7 @@ subcommand_lslocks(apr_getopt_t *os, voi
   const char *fs_path = "/";
   apr_hash_t *locks;
   apr_hash_index_t *hi;
+  apr_pool_t *iterpool = svn_pool_create(pool);
 
   SVN_ERR(svn_opt__args_to_target_array(&targets, os,
                                         apr_array_make(pool, 0,
@@ -2055,20 +2056,24 @@ subcommand_lslocks(apr_getopt_t *os, voi
       svn_lock_t *lock = svn__apr_hash_index_val(hi);
       int comment_lines = 0;
 
-      cr_date = svn_time_to_human_cstring(lock->creation_date, pool);
+      svn_pool_clear(iterpool);
+
+      SVN_ERR(check_cancel(NULL));
+
+      cr_date = svn_time_to_human_cstring(lock->creation_date, iterpool);
 
       if (lock->expiration_date)
-        exp_date = svn_time_to_human_cstring(lock->expiration_date, pool);
+        exp_date = svn_time_to_human_cstring(lock->expiration_date, iterpool);
 
       if (lock->comment)
         comment_lines = svn_cstring_count_newlines(lock->comment) + 1;
 
-      SVN_ERR(svn_cmdline_printf(pool, _("Path: %s\n"), path));
-      SVN_ERR(svn_cmdline_printf(pool, _("UUID Token: %s\n"), lock->token));
-      SVN_ERR(svn_cmdline_printf(pool, _("Owner: %s\n"), lock->owner));
-      SVN_ERR(svn_cmdline_printf(pool, _("Created: %s\n"), cr_date));
-      SVN_ERR(svn_cmdline_printf(pool, _("Expires: %s\n"), exp_date));
-      SVN_ERR(svn_cmdline_printf(pool,
+      SVN_ERR(svn_cmdline_printf(iterpool, _("Path: %s\n"), path));
+      SVN_ERR(svn_cmdline_printf(iterpool, _("UUID Token: %s\n"), lock->token));
+      SVN_ERR(svn_cmdline_printf(iterpool, _("Owner: %s\n"), lock->owner));
+      SVN_ERR(svn_cmdline_printf(iterpool, _("Created: %s\n"), cr_date));
+      SVN_ERR(svn_cmdline_printf(iterpool, _("Expires: %s\n"), exp_date));
+      SVN_ERR(svn_cmdline_printf(iterpool,
                                  Q_("Comment (%i line):\n%s\n\n",
                                     "Comment (%i lines):\n%s\n\n",
                                     comment_lines),
@@ -2076,6 +2081,8 @@ subcommand_lslocks(apr_getopt_t *os, voi
                                  lock->comment ? lock->comment : ""));
     }
 
+  svn_pool_destroy(iterpool);
+
   return SVN_NO_ERROR;
 }
 



Mime
View raw message