kfogel@collab.net wrote:
> Julian Foad <julianfoad@btopenworld.com> writes:
>
>> /* ### Perhaps the option should be named "--rev-prop" instead?
>> Generally, we do include the hyphen; the only reason not to
>> here is that in code and emails we almost always refer to
>> them as "revprops", like with "wcprops". So this
>> inconsistency is justified in the name of consistency. How
>> distressingly typical. Thoughts? :-) */
>> {"revprop", svn_cl__revprop_opt, 0,
>> "operate on a revision property (use with -r)"},
>>
>>Please can we change it to --rev-prop for the users' sake?
>
> No objection here, though afterwards I'll be the one who's constantly
> getting it wrong. But that's okay, someone has to pay the price :-).
Should I leave "--revprop" as a synonym for "--rev-prop" for the time being? I probably should, because scripts like propchange-email.pl will need to be updated accordingly. (I can update the master copy in the source tree, but not the copy running on tigris.org.)
Grepping through, the other related thing is the name "{pre,post}-revprop-change"; should I put the extra hyphen in there too? Perhaps not.
Or should I forget the whole idea? I've written and tested the patch (including keeping "--revprop" as an obolete synonym), so can commit easily if you're still happy with the idea.
- Julian
Rename "--revprop" to "--rev-prop" for consistency with other options.
* doc/book/book/ch06.xml
* doc/book/book/ch08.xml
* subversion/clients/cmdline/cl.h
* subversion/clients/cmdline/main.c (main)
* subversion/tests/clients/cmdline/prop_tests.py (revprop_change)
* tools/client-side/bash_completion (_svn)
* tools/hook-scripts/propchange-email.pl.in
Index: subversion/clients/cmdline/cl.h
===================================================================
Index: doc/book/book/ch06.xml
===================================================================
--- doc/book/book/ch06.xml (revision 7543)
+++ doc/book/book/ch06.xml (working copy)
@@ -769,7 +769,7 @@
<para>Remember those unversioned revision properties? You can
modify those, too, with the <command>svn</command> program.
- Simply add the <option>--revprop</option> command-line
+ Simply add the <option>--rev-prop</option> command-line
parameter, and specify the revision whose property you wish
to modify. Since revisions are global, you don't need to
specify a path in this case as long as you are positioned in
@@ -780,11 +780,11 @@
<para>Fixing spelling errors, grammatical gotchas, and
<quote>just-plain-wrongness</quote> in commit log
messages is perhaps the most common use-case for the
- <option>--revprop</option> option.</para>
+ <option>--rev-prop</option> option.</para>
</footnote></para>
<screen>
-$ svn propset svn:log '* button.c: Fix a compiler warning.' -r11 --revprop
+$ svn propset svn:log '* button.c: Fix a compiler warning.' -r11 --rev-prop
property `svn:log' set on repository revision '11'
$
</screen>
Index: doc/book/book/ch08.xml
===================================================================
--- doc/book/book/ch08.xml (revision 7543)
+++ doc/book/book/ch08.xml (working copy)
@@ -341,7 +341,7 @@
</varlistentry>
<varlistentry>
- <term><option>--revprop</option></term>
+ <term><option>--rev-prop</option></term>
<listitem>
<para>Operates on a revision property instead of a
Subversion property specific to a file or directory.
@@ -2244,7 +2244,7 @@
<refsect1>
<title>Synopsis</title>
<programlisting>svn propdel PROPNAME [PATH...]</programlisting>
- <programlisting>svn propdel PROPNAME --revprop -r REV [URL]</programlisting>
+ <programlisting>svn propdel PROPNAME --rev-prop -r REV [URL]</programlisting>
</refsect1>
<refsect1>
<title>Description</title>
@@ -2277,7 +2277,7 @@
--quiet (-q)
--recursive (-R)
--revision (-r) REV
---revprop
+--rev-prop
</screen>
</refsect1>
@@ -2295,7 +2295,7 @@
<para>Delete a revision property:</para>
<screen>
-$ svn propdel --revprop -r 26 release-date
+$ svn propdel --rev-prop -r 26 release-date
property `release-date' deleted from repository revision '26'
</screen>
@@ -2311,7 +2311,7 @@
<refsect1>
<title>Synopsis</title>
<programlisting>svn propedit PROPNAME PATH...</programlisting>
- <programlisting>svn propedit PROPNAME --revprop -r REV [URL]</programlisting>
+ <programlisting>svn propedit PROPNAME --rev-prop -r REV [URL]</programlisting>
</refsect1>
<refsect1>
<title>Description</title>
@@ -2342,7 +2342,7 @@
<screen>
--revision (-r) REV
---revprop
+--rev-prop
--encoding ENC
</screen>
</refsect1>
@@ -2374,7 +2374,7 @@
<refsect1>
<title>Synopsis</title>
<programlisting>svn propget PROPNAME [PATH...]</programlisting>
- <programlisting>svn propget PROPNAME --revprop -r REV [URL]</programlisting>
+ <programlisting>svn propget PROPNAME --rev-prop -r REV [URL]</programlisting>
</refsect1>
<refsect1>
<title>Description</title>
@@ -2409,7 +2409,7 @@
<screen>
--recursive (-R)
--revision (-r) REV
---revprop
+--rev-prop
</screen>
</refsect1>
@@ -2429,7 +2429,7 @@
<para>The same goes for a revision property:</para>
<screen>
-$ svn propget svn:log --revprop -r 20
+$ svn propget svn:log --rev-prop -r 20
Began journal.
</screen>
@@ -2445,7 +2445,7 @@
<refsect1>
<title>Synopsis</title>
<programlisting>svn proplist [PATH...]</programlisting>
- <programlisting>svn proplist --revprop -r REV [URL]</programlisting>
+ <programlisting>svn proplist --rev-prop -r REV [URL]</programlisting>
</refsect1>
<refsect1>
<title>Description</title>
@@ -2478,7 +2478,7 @@
--verbose (-v)
--recursive (-R)
--revision (-r) REV
---revprop
+--rev-prop
</screen>
</refsect1>
@@ -2520,7 +2520,7 @@
<refsect1>
<title>Synopsis</title>
<programlisting>svn propset PROPNAME [PROPVAL | -F VALFILE] PATH...</programlisting>
- <programlisting>svn propset PROPNAME --revprop -r REV [PROPVAL | -F VALFILE] [URL]</programlisting>
+ <programlisting>svn propset PROPNAME --rev-prop -r REV [PROPVAL | -F VALFILE] [URL]</programlisting>
</refsect1>
<refsect1>
@@ -2563,7 +2563,7 @@
--revision (-r) REV
--targets FILENAME
--recursive (-R)
---revprop
+--rev-prop
--encoding ENC
</screen>
</refsect1>
@@ -2596,11 +2596,11 @@
<para>If you made a mistake in a log message for a
particular revision and want to change it, use
- <option>--revprop</option> and set svn:log to the new
+ <option>--rev-prop</option> and set svn:log to the new
log message:</para>
<screen>
-$ svn propset --revprop -r 25 svn:log "Journaled about trip to New York."
+$ svn propset --rev-prop -r 25 svn:log "Journaled about trip to New York."
property `svn:log' set on repository revision '25'
</screen>
@@ -2608,7 +2608,7 @@
provide a URL.</para>
<screen>
-$ svn propset --revprop -r 26 svn:log "Document nap." http://svn.red-bean.com/repos
+$ svn propset --rev-prop -r 26 svn:log "Document nap." http://svn.red-bean.com/repos
property `svn:log' set on repository revision '25'
</screen>
@@ -3832,7 +3832,7 @@
<para>You might think that this sounds remarkably like the
kind of thing that you can do by using <command>svn
- propset --revprop</command> to set the
+ propset --rev-prop</command> to set the
<literal>svn:log</literal> property on a revision. While
it does, in fact, accomplish the same end result (changing
the log message), <command>setlog</command> does not run
Index: subversion/clients/cmdline/cl.h
===================================================================
--- subversion/clients/cmdline/cl.h (revision 7543)
+++ subversion/clients/cmdline/cl.h (working copy)
@@ -61,6 +61,7 @@
svn_cl__no_diff_deleted,
svn_cl__dry_run_opt,
svn_cl__relocate_opt,
+ svn_cl__revprop_OLD_opt,
svn_cl__revprop_opt,
svn_cl__diff_cmd_opt,
svn_cl__merge_cmd_opt,
Index: subversion/clients/cmdline/main.c
===================================================================
--- subversion/clients/cmdline/main.c (revision 7543)
+++ subversion/clients/cmdline/main.c (working copy)
@@ -112,15 +112,10 @@
"use ARG as external editor"},
{"old", svn_cl__old_cmd_opt, 1, "use ARG as the older target"},
{"new", svn_cl__new_cmd_opt, 1, "use ARG as the newer target"},
-
- /* ### Perhaps the option should be named "--rev-prop" instead?
- Generally, we do include the hyphen; the only reason not to
- here is that in code and emails we almost always refer to
- them as "revprops", like with "wcprops". So this
- inconsistency is justified in the name of consistency. How
- distressingly typical. Thoughts? :-) */
- {"revprop", svn_cl__revprop_opt, 0,
+ {"rev-prop", svn_cl__revprop_opt, 0,
"operate on a revision property (use with -r)"},
+ {"revprop", svn_cl__revprop_OLD_opt, 0,
+ "(obsolete synonym for --rev-prop)"},
{"relocate", svn_cl__relocate_opt, 0,
"relocate via URL-rewriting"},
{"config-dir", svn_cl__config_dir_opt, 1,
@@ -406,28 +401,28 @@
{ "propdel", svn_cl__propdel, {"pdel", "pd"},
"Remove PROPNAME from files, dirs, or revisions.\n"
"usage: 1. propdel PROPNAME [PATH...]\n"
- " 2. propdel PROPNAME --revprop -r REV [URL]\n"
+ " 2. propdel PROPNAME --rev-prop -r REV [URL]\n"
"\n"
" 1. Removes versioned props in working copy.\n"
" 2. Removes unversioned remote prop on repos revision.\n",
{'q', 'R', 'r', svn_cl__revprop_opt, SVN_CL__AUTH_OPTIONS,
- svn_cl__config_dir_opt} },
+ svn_cl__config_dir_opt, svn_cl__revprop_OLD_opt} },
{ "propedit", svn_cl__propedit, {"pedit", "pe"},
"Edit property PROPNAME with $EDITOR on targets.\n"
"usage: 1. propedit PROPNAME PATH...\n"
- " 2. propedit PROPNAME --revprop -r REV [URL]\n"
+ " 2. propedit PROPNAME --rev-prop -r REV [URL]\n"
"\n"
" 1. Edits versioned props in working copy.\n"
" 2. Edits unversioned remote prop on repos revision.\n",
{'r', svn_cl__revprop_opt, SVN_CL__AUTH_OPTIONS,
svn_cl__encoding_opt, svn_cl__editor_cmd_opt, svn_cl__force_opt,
- svn_cl__config_dir_opt} },
+ svn_cl__config_dir_opt, svn_cl__revprop_OLD_opt} },
{ "propget", svn_cl__propget, {"pget", "pg"},
"Print value of PROPNAME on files, dirs, or revisions.\n"
"usage: 1. propget PROPNAME [PATH...]\n"
- " 2. propget PROPNAME --revprop -r REV [URL]\n"
+ " 2. propget PROPNAME --rev-prop -r REV [URL]\n"
"\n"
" 1. Prints versioned prop in working copy.\n"
" 2. Prints unversioned remote prop on repos revision.\n"
@@ -439,22 +434,22 @@
" the --strict option to disable these beautifications (useful,\n"
" for example, when redirecting binary property values to a file).\n",
{'R', 'r', svn_cl__revprop_opt, svn_cl__strict_opt,
- SVN_CL__AUTH_OPTIONS, svn_cl__config_dir_opt} },
+ SVN_CL__AUTH_OPTIONS, svn_cl__config_dir_opt, svn_cl__revprop_OLD_opt} },
{ "proplist", svn_cl__proplist, {"plist", "pl"},
"List all properties on files, dirs, or revisions.\n"
"usage: 1. proplist [PATH...]\n"
- " 2. proplist --revprop -r REV [URL]\n"
+ " 2. proplist --rev-prop -r REV [URL]\n"
"\n"
" 1. Lists versioned props in working copy.\n"
" 2. Lists unversioned remote props on repos revision.\n",
{'v', 'R', 'r', 'q', svn_cl__revprop_opt, SVN_CL__AUTH_OPTIONS,
- svn_cl__config_dir_opt} },
+ svn_cl__config_dir_opt, svn_cl__revprop_OLD_opt} },
{ "propset", svn_cl__propset, {"pset", "ps"},
"Set PROPNAME to PROPVAL on files, dirs, or revisions.\n"
"usage: 1. propset PROPNAME [PROPVAL | -F VALFILE] PATH...\n"
- " 2. propset PROPNAME --revprop -r REV [PROPVAL | -F VALFILE] [URL]\n"
+ " 2. propset PROPNAME --rev-prop -r REV [PROPVAL | -F VALFILE] [URL]\n"
"\n"
" 1. Creates a versioned, local propchange in working copy.\n"
" 2. Creates an unversioned, remote propchange on repos revision.\n"
@@ -487,7 +482,7 @@
" foo/bar -r 1234 http://example.com/repos/zag\n",
{'F', 'q', 'r', svn_cl__targets_opt, 'R', svn_cl__revprop_opt,
SVN_CL__AUTH_OPTIONS, svn_cl__encoding_opt, svn_cl__force_opt,
- svn_cl__config_dir_opt} },
+ svn_cl__config_dir_opt, svn_cl__revprop_OLD_opt} },
{ "resolved", svn_cl__resolved, {0},
"Remove 'conflicted' state on working copy files or directories.\n"
@@ -826,6 +821,7 @@
case svn_cl__dry_run_opt:
opt_state.dry_run = TRUE;
break;
+ case svn_cl__revprop_OLD_opt:
case svn_cl__revprop_opt:
opt_state.revprop = TRUE;
break;
Index: subversion/tests/clients/cmdline/prop_tests.py
===================================================================
--- subversion/tests/clients/cmdline/prop_tests.py (revision 7543)
+++ subversion/tests/clients/cmdline/prop_tests.py (working copy)
@@ -686,11 +686,11 @@
os.chmod(hook, 0755)
svntest.actions.run_and_verify_svn(None, None, [],
- 'propset', '--revprop', '-r', '0',
+ 'propset', '--rev-prop', '-r', '0',
'cash-sound', 'cha-ching!', sbox.wc_dir)
svntest.actions.run_and_verify_svn(None, None, [],
- 'propget', '--revprop', '-r', '0',
+ 'propget', '--rev-prop', '-r', '0',
'cash-sound', sbox.wc_dir)
#----------------------------------------------------------------------
Index: tools/client-side/bash_completion
===================================================================
--- tools/client-side/bash_completion (revision 7543)
+++ tools/client-side/bash_completion (working copy)
@@ -116,21 +116,21 @@
cmdOpts="$mOpts $rOpts $qOpts --force --editor-cmd $pOpts"
;;
propdel|pdel|pd)
- cmdOpts="$qOpts -R --recursive $rOpts --revprop $pOpts"
+ cmdOpts="$qOpts -R --recursive $rOpts --rev-prop $pOpts"
;;
propedit|pedit|pe)
- cmdOpts="$rOpts --revprop --encoding --editor-cmd $pOpts \
+ cmdOpts="$rOpts --rev-prop --encoding --editor-cmd $pOpts \
--force"
;;
propget|pget|pg)
- cmdOpts="-R --recursive $rOpts --revprop --strict $pOpts"
+ cmdOpts="-R --recursive $rOpts --rev-prop --strict $pOpts"
;;
proplist|plist|pl)
- cmdOpts="-v --verbose -R --recursive $rOpts --revprop $qOpts \
+ cmdOpts="-v --verbose -R --recursive $rOpts --rev-prop $qOpts \
$pOpts"
;;
propset|pset|ps)
- cmdOpts="-F --file $qOpts --targets -R --recursive --revprop \
+ cmdOpts="-F --file $qOpts --targets -R --recursive --rev-prop \
--encoding $pOpts $rOpts --force"
;;
resolved)
Index: tools/hook-scripts/propchange-email.pl.in
===================================================================
--- tools/hook-scripts/propchange-email.pl.in (revision 7543)
+++ tools/hook-scripts/propchange-email.pl.in (working copy)
@@ -212,7 +212,7 @@
# Get the new property value svn.
my $repos_url = 'file://' . &abs_path($repos);
-my @svnlines = &read_from_process($svn, 'propget', '--revprop', '-r', $rev,
+my @svnlines = &read_from_process($svn, 'propget', '--rev-prop', '-r', $rev,
$propname, $repos_url);
# Figure out what directories have changed using svnlook. This is
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Oct 28 02:16:23 2003