Return-Path: X-Original-To: apmail-subversion-commits-archive@minotaur.apache.org Delivered-To: apmail-subversion-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 44CD517867 for ; Mon, 13 Oct 2014 15:54:41 +0000 (UTC) Received: (qmail 42824 invoked by uid 500); 13 Oct 2014 15:54:41 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 42788 invoked by uid 500); 13 Oct 2014 15:54:41 -0000 Mailing-List: contact commits-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@subversion.apache.org Delivered-To: mailing list commits@subversion.apache.org Received: (qmail 42778 invoked by uid 99); 13 Oct 2014 15:54:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Oct 2014 15:54:40 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Oct 2014 15:54:17 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 2F19523889BB; Mon, 13 Oct 2014 15:54:16 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1631446 - /subversion/trunk/subversion/svnadmin/svnadmin.c Date: Mon, 13 Oct 2014 15:54:16 -0000 To: commits@subversion.apache.org From: philip@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20141013155416.2F19523889BB@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: philip Date: Mon Oct 13 15:54:15 2014 New Revision: 1631446 URL: http://svn.apache.org/r1631446 Log: Followup to r1631435: add '--transaction' support to 'svnadmin delrevprop'. * subversion/svnadmin/svnadmin.c (cmd_table): Add 't' to delrevprop, tweak text for setrevprop and delrevprop. (subcommand_setrevprop): Tweak error message. (subcommand_delrevprop): Sanity check the new option. 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=1631446&r1=1631445&r2=1631446&view=diff ============================================================================== --- subversion/trunk/subversion/svnadmin/svnadmin.c (original) +++ subversion/trunk/subversion/svnadmin/svnadmin.c Mon Oct 13 15:54:15 2014 @@ -358,14 +358,16 @@ static const svn_opt_subcommand_desc2_t } }, {"delrevprop", subcommand_delrevprop, {0}, N_ - ("usage: svnadmin delrevprop REPOS_PATH -r REVISION NAME\n\n" - "Delete the property NAME on revision REVISION. Use\n" - "--use-pre-revprop-change-hook/--use-post-revprop-change-hook to trigger\n" - "the revision property-related hooks (for example, if you want an email\n" - "notification sent from your post-revprop-change hook).\n\n" + ("usage: 1. svnadmin delrevprop -r REVISION REPOS_PATH NAME\n" + " 2. svnadmin delrevprop -t TXN REPOS_PATH NAME\n\n" + "1. Delete the property NAME on revision REVISION.\n\n" + "Use --use-pre-revprop-change-hook/--use-post-revprop-change-hook to\n" + "trigger the revision property-related hooks (for example, if you want\n" + "an email notification sent from your post-revprop-change hook).\n\n" "NOTE: Revision properties are not versioned, so this command will\n" - "irreversibly destroy the previous value of the property.\n"), - {'r', svnadmin__use_pre_revprop_change_hook, + "irreversibly destroy the previous value of the property.\n\n" + "2. Delete the property NAME on transaction TXN.\n"), + {'r', 't', svnadmin__use_pre_revprop_change_hook, svnadmin__use_post_revprop_change_hook} }, {"deltify", subcommand_deltify, {0}, N_ @@ -497,13 +499,15 @@ static const svn_opt_subcommand_desc2_t {'r', svnadmin__bypass_hooks} }, {"setrevprop", subcommand_setrevprop, {0}, N_ - ("usage: svnadmin setrevprop REPOS_PATH -r REVISION NAME FILE\n\n" - "Set the property NAME on revision REVISION to the contents of FILE. Use\n" - "--use-pre-revprop-change-hook/--use-post-revprop-change-hook to trigger\n" - "the revision property-related hooks (for example, if you want an email\n" - "notification sent from your post-revprop-change hook).\n\n" + ("usage: 1. svnadmin setrevprop -r REVISION REPOS_PATH FILE\n" + " 2. svnadmin setrevprop -t TXN REPOS_PATH FILE\n\n" + "1. Set the property NAME on revision REVISION to the contents of FILE.\n\n" + "Use --use-pre-revprop-change-hook/--use-post-revprop-change-hook to\n" + "trigger the revision property-related hooks (for example, if you want\n" + "an email notification sent from your post-revprop-change hook).\n\n" "NOTE: Revision properties are not versioned, so this command will\n" - "overwrite the previous value of the property.\n"), + "overwrite the previous value of the property.\n\n" + "2. Set the property NAME on transaction TXN to the contents of FILE.\n"), {'r', 't', svnadmin__use_pre_revprop_change_hook, svnadmin__use_post_revprop_change_hook} }, @@ -1685,7 +1689,7 @@ subcommand_setrevprop(apr_getopt_t *os, if (opt_state->use_pre_revprop_change_hook || opt_state->use_post_revprop_change_hook) return svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL, - _("calling hooks is incompatible with " + _("Calling hooks is incompatible with " "--transaction (-t)")); } else if (opt_state->start_revision.kind != svn_opt_revision_number) @@ -2369,7 +2373,21 @@ subcommand_delrevprop(apr_getopt_t *os, SVN_ERR(parse_args(&args, os, 1, 1, pool)); prop_name = APR_ARRAY_IDX(args, 0, const char *); - if (opt_state->start_revision.kind != svn_opt_revision_number) + if (opt_state->txn_id) + { + if (opt_state->start_revision.kind != svn_opt_revision_unspecified + || opt_state->end_revision.kind != svn_opt_revision_unspecified) + return svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL, + _("--revision (-r) and --transaction (-t) " + "are mutually exclusive")); + + if (opt_state->use_pre_revprop_change_hook + || opt_state->use_post_revprop_change_hook) + return svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL, + _("Calling hooks is incompatible with " + "--transaction (-t)")); + } + else if (opt_state->start_revision.kind != svn_opt_revision_number) return svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL, _("Missing revision")); else if (opt_state->end_revision.kind != svn_opt_revision_unspecified)