Author: julianfoad
Date: Fri Jul 21 13:48:58 2017
New Revision: 1802597
URL: http://svn.apache.org/viewvc?rev=1802597&view=rev
Log:
On the 'shelve-checkpoint3' branch: catch up with 'shelve' branch.
Modified:
subversion/branches/shelve-checkpoint3/ (props changed)
subversion/branches/shelve-checkpoint3/subversion/libsvn_client/shelve.c
subversion/branches/shelve-checkpoint3/subversion/svn/shelve-cmd.c
Propchange: subversion/branches/shelve-checkpoint3/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jul 21 13:48:58 2017
@@ -75,7 +75,8 @@
/subversion/branches/revprop-cache:1298521-1326293
/subversion/branches/revprop-caching-ng:1620597,1620599
/subversion/branches/revprop-packing:1143907,1143971,1143997,1144017,1144499,1144568,1146145
-/subversion/branches/shelve:1802593
+/subversion/branches/shelve:1802592-1802596
+/subversion/branches/shelve-checkpoint:1801970
/subversion/branches/subtree-mergeinfo:876734-878766
/subversion/branches/svn-auth-x509:1603509-1655900
/subversion/branches/svn-info-detail:1660035-1662618
Modified:
subversion/branches/shelve-checkpoint3/subversion/libsvn_client/shelve.c
URL:
http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint3/subversion/libsvn_client/shelve.c?rev=1802597&r1=1802596&r2=1802597&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint3/subversion/libsvn_client/shelve.c
(original)
+++ subversion/branches/shelve-checkpoint3/subversion/libsvn_client/shelve.c
Fri Jul 21 13:48:58 2017
@@ -314,7 +314,7 @@ svn_client_shelves_list(apr_hash_t **dir
SVN_ERR(svn_wc__get_shelves_dir(&shelves_dir, ctx->wc_ctx, local_abspath,
scratch_pool, scratch_pool));
- SVN_ERR(svn_io_get_dirents3(dirents, shelves_dir, TRUE /*only_check_type*/,
+ SVN_ERR(svn_io_get_dirents3(dirents, shelves_dir, FALSE /*only_check_type*/,
result_pool, scratch_pool));
/* Remove non-shelves */
Modified: subversion/branches/shelve-checkpoint3/subversion/svn/shelve-cmd.c
URL:
http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint3/subversion/svn/shelve-cmd.c?rev=1802597&r1=1802596&r2=1802597&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint3/subversion/svn/shelve-cmd.c
(original)
+++ subversion/branches/shelve-checkpoint3/subversion/svn/shelve-cmd.c Fri Jul
21 13:48:58 2017
@@ -51,21 +51,36 @@ get_shelf_name(const char **shelf_name,
/* Display a list of shelves */
static svn_error_t *
shelves_list(const char *local_abspath,
+ svn_boolean_t diffstat,
svn_client_ctx_t *ctx,
- apr_pool_t *pool)
+ apr_pool_t *scratch_pool)
{
apr_hash_t *dirents;
apr_hash_index_t *hi;
- SVN_ERR(svn_client_shelves_list(&dirents, local_abspath, ctx, pool, pool));
+ SVN_ERR(svn_client_shelves_list(&dirents, local_abspath,
+ ctx, scratch_pool, scratch_pool));
- for (hi = apr_hash_first(pool, dirents); hi; hi = apr_hash_next(hi))
+ for (hi = apr_hash_first(scratch_pool, dirents); hi; hi = apr_hash_next(hi))
{
const char *name = apr_hash_this_key(hi);
+ svn_io_dirent2_t *dirent = apr_hash_this_val(hi);
+ int age = (apr_time_now() - dirent->mtime) / 1000000 / 60;
- if (strstr(name, ".patch"))
+ if (! strstr(name, ".patch"))
+ continue;
+
+ printf("%-30s %6d mins old %10ld bytes\n",
+ name, age, (long)dirent->filesize);
+
+ if (diffstat)
{
- printf("%s\n", name);
+ char *path = svn_path_join_many(scratch_pool,
+ local_abspath, ".svn/shelves", name,
+ SVN_VA_NULL);
+
+ system(apr_psprintf(scratch_pool, "diffstat %s 2> /dev/null", path));
+ printf("\n");
}
}
@@ -94,7 +109,9 @@ svn_cl__shelve(apr_getopt_t *os,
if (os->ind < os->argc)
return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, 0, NULL);
- SVN_ERR(shelves_list(local_abspath, ctx, pool));
+ SVN_ERR(shelves_list(local_abspath,
+ ! opt_state->quiet /*diffstat*/,
+ ctx, pool));
return SVN_NO_ERROR;
}
@@ -192,7 +209,7 @@ svn_cl__shelves(apr_getopt_t *os,
return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, 0, NULL);
SVN_ERR(svn_dirent_get_absolute(&local_abspath, "", pool));
- SVN_ERR(shelves_list(local_abspath, ctx, pool));
+ SVN_ERR(shelves_list(local_abspath, TRUE /*diffstat*/, ctx, pool));
return SVN_NO_ERROR;
}