You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2018/09/17 16:48:54 UTC

svn commit: r1841091 - in /subversion/trunk: subversion/svn/svn.c subversion/tests/cmdline/shelf_tests.py tools/client-side/bash_completion

Author: julianfoad
Date: Mon Sep 17 16:48:54 2018
New Revision: 1841091

URL: http://svn.apache.org/viewvc?rev=1841091&view=rev
Log:
Fix SVN-4776: Shelving: remove non-x-prefixed command aliases.

Remove the non-x-prefixed aliases such as 'svn shelve', leaving only the
'svn x-shelve' form, because this feature is experimental and the command-
line syntax for it is not yet stable.

* subversion/svn/svn.c
  Remove the non-x-prefixed aliases of shelving subcommands.

* subversion/tests/cmdline/shelf_tests.py
  Change all shelving subcommands to the x-prefixed forms.

* tools/client-side/bash_completion
  (_svn): Change all shelving subcommands to the x-prefixed forms.

Modified:
    subversion/trunk/subversion/svn/svn.c
    subversion/trunk/subversion/tests/cmdline/shelf_tests.py
    subversion/trunk/tools/client-side/bash_completion

Modified: subversion/trunk/subversion/svn/svn.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/svn.c?rev=1841091&r1=1841090&r2=1841091&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/svn.c (original)
+++ subversion/trunk/subversion/svn/svn.c Mon Sep 17 16:48:54 2018
@@ -1953,7 +1953,7 @@ const svn_opt_subcommand_desc3_t svn_cl_
     )},
     { 'q' } },
 
-  { "x-shelf-diff", svn_cl__shelf_diff, {"shelf-diff"}, {N_(
+  { "x-shelf-diff", svn_cl__shelf_diff, {0}, {N_(
      "Show shelved changes as a diff.\n"
      "usage: x-shelf-diff SHELF [VERSION]\n"
      "\n"), N_(
@@ -1968,7 +1968,7 @@ const svn_opt_subcommand_desc3_t svn_cl_
     {opt_summarize},
   },
 
-  { "x-shelf-drop", svn_cl__shelf_drop, {"shelf-drop"}, {N_(
+  { "x-shelf-drop", svn_cl__shelf_drop, {0}, {N_(
      "Delete a shelf.\n"
      "usage: x-shelf-drop SHELF [PATH ...]\n"
      "\n"), N_(
@@ -1980,7 +1980,7 @@ const svn_opt_subcommand_desc3_t svn_cl_
     )},
   },
 
-  { "x-shelf-list", svn_cl__shelf_list, {"shelf-list", "shelves"}, {N_(
+  { "x-shelf-list", svn_cl__shelf_list, {"x-shelves"}, {N_(
      "List shelves.\n"
      "usage: x-shelf-list [PATH ...]\n"
      "\n"), N_(
@@ -1994,7 +1994,7 @@ const svn_opt_subcommand_desc3_t svn_cl_
     {'q', 'v'}
   },
 
-  { "x-shelf-list-by-paths", svn_cl__shelf_list_by_paths, {"shelf-list-by-paths"}, {N_(
+  { "x-shelf-list-by-paths", svn_cl__shelf_list_by_paths, {0}, {N_(
      "List which shelf affects each path.\n"
      "usage: x-shelf-list-by-paths [PATH...]\n"
      "\n"), N_(
@@ -2005,7 +2005,7 @@ const svn_opt_subcommand_desc3_t svn_cl_
     )},
   },
 
-  { "x-shelf-log", svn_cl__shelf_log, {"shelf-log"}, {N_(
+  { "x-shelf-log", svn_cl__shelf_log, {0}, {N_(
      "Show the versions of a shelf.\n"
      "usage: x-shelf-log SHELF [PATH...]\n"
      "\n"), N_(
@@ -2018,7 +2018,7 @@ const svn_opt_subcommand_desc3_t svn_cl_
     {'q', 'v'}
   },
 
-  { "x-shelf-save", svn_cl__shelf_save, {"shelf-save"}, {N_(
+  { "x-shelf-save", svn_cl__shelf_save, {0}, {N_(
      "Copy local changes onto a new version of a shelf.\n"
      "usage: x-shelf-save SHELF [PATH...]\n"
      "\n"), N_(
@@ -2036,7 +2036,7 @@ const svn_opt_subcommand_desc3_t svn_cl_
     }
   },
 
-  { "x-shelve", svn_cl__shelf_shelve, {"shelve"}, {N_(
+  { "x-shelve", svn_cl__shelf_shelve, {0}, {N_(
      "Move local changes onto a shelf.\n"
      "usage: x-shelve [--keep-local] SHELF [PATH...]\n"
      "\n"), N_(
@@ -2065,7 +2065,7 @@ const svn_opt_subcommand_desc3_t svn_cl_
      SVN_CL__LOG_MSG_OPTIONS,
     } },
 
-  { "x-unshelve", svn_cl__shelf_unshelve, {"unshelve"}, {N_(
+  { "x-unshelve", svn_cl__shelf_unshelve, {0}, {N_(
      "Copy shelved changes back into the WC.\n"
      "usage: x-unshelve [--drop] [SHELF [VERSION]]\n"
      "\n"), N_(

Modified: subversion/trunk/subversion/tests/cmdline/shelf_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/shelf_tests.py?rev=1841091&r1=1841090&r2=1841091&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/shelf_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/shelf_tests.py Mon Sep 17 16:48:54 2018
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-#  shelve_tests.py:  testing shelving
+#  shelf_tests.py:  testing shelving
 #
 #  Subversion is a tool for revision control.
 #  See http://subversion.apache.org for more information.
@@ -111,12 +111,12 @@ def shelve_unshelve_verify(sbox, modifie
 
   if cannot_shelve:
     svntest.actions.run_and_verify_svn(None, '.* could not be shelved.*',
-                                       'shelve', 'foo')
+                                       'x-shelve', 'foo')
     return
 
   # Shelve; check there are no longer any modifications
   svntest.actions.run_and_verify_svn(None, [],
-                                     'shelve', 'foo')
+                                     'x-shelve', 'foo')
   check_wc_state(wc_dir, virginal_state)
 
   # List; ensure the shelf is listed
@@ -124,11 +124,11 @@ def shelve_unshelve_verify(sbox, modifie
     [r'foo\s*version \d+.*',
      r' ',
     ])
-  svntest.actions.run_and_verify_svn(expected_output, [], 'shelves')
+  svntest.actions.run_and_verify_svn(expected_output, [], 'x-shelves')
 
   # Unshelve; check the original modifications are here again
   svntest.actions.run_and_verify_svn(None, [],
-                                     'unshelve', 'foo')
+                                     'x-unshelve', 'foo')
   check_wc_state(wc_dir, modified_state)
 
 #----------------------------------------------------------------------
@@ -273,14 +273,14 @@ def save_revert_restore(sbox, modifier1,
 
   # Save a checkpoint; check nothing changed
   svntest.actions.run_and_verify_svn(None, [],
-                                     'shelf-save', 'foo')
+                                     'x-shelf-save', 'foo')
   check_wc_state(wc_dir, modified_state1)
 
   # Modify again; remember the state; save a checkpoint
   modifier2(sbox)
   modified_state2 = get_wc_state(wc_dir)
   svntest.actions.run_and_verify_svn(None, [],
-                                     'shelf-save', 'foo')
+                                     'x-shelf-save', 'foo')
   check_wc_state(wc_dir, modified_state2)
 
   # Revert
@@ -290,7 +290,7 @@ def save_revert_restore(sbox, modifier1,
 
   # Restore; check the original modifications are here again
   svntest.actions.run_and_verify_svn(None, [],
-                                     'unshelve', 'foo', '1')
+                                     'x-unshelve', 'foo', '1')
   check_wc_state(wc_dir, modified_state1)
 
   os.chdir(was_cwd)
@@ -351,7 +351,7 @@ def unshelve_refuses_if_conflicts(sbox):
 
   # Shelve; check there are no longer any local mods
   svntest.actions.run_and_verify_svn(None, [],
-                                     'shelve', 'foo')
+                                     'x-shelve', 'foo')
   check_wc_state(wc_dir, initial_state)
 
   # Make a different local mod that will conflict with the shelf
@@ -360,7 +360,7 @@ def unshelve_refuses_if_conflicts(sbox):
 
   # Try to unshelve; check it fails with an error about a conflict
   svntest.actions.run_and_verify_svn(None, '.*[Cc]onflict.*',
-                                     'unshelve', 'foo')
+                                     'x-unshelve', 'foo')
   # Check nothing changed in the attempt
   check_wc_state(wc_dir, modified_state2)
 
@@ -462,13 +462,13 @@ def shelve_with_log_message(sbox):
   sbox.simple_add_text('New file', 'f')
   log_message = 'Log message for foo'
   svntest.actions.run_and_verify_svn(None, [],
-                                     'shelve', 'foo', '-m', log_message)
+                                     'x-shelve', 'foo', '-m', log_message)
   expected_output = svntest.verify.RegexListOutput(
     ['foo .*',
      ' ' + log_message
     ])
   svntest.actions.run_and_verify_svn(expected_output, [],
-                                     'shelf-list')
+                                     'x-shelf-list')
 
   os.chdir(was_cwd)
 
@@ -518,7 +518,7 @@ def shelf_status(sbox):
   run_and_verify_status(sbox.wc_dir, expected_status)
 
   svntest.actions.run_and_verify_svn(None, [],
-                                     'shelve', 'foo')
+                                     'x-shelve', 'foo')
   run_and_verify_shelf_status(sbox.wc_dir, expected_status, shelf='foo')
 
   os.chdir(was_cwd)
@@ -603,17 +603,17 @@ def list_shelves(sbox):
 
   # an empty list
   svntest.actions.run_and_verify_svn([], [],
-                                     'shelf-list', '-q')
+                                     'x-shelf-list', '-q')
 
   # make two shelves
   sbox.simple_append('A/mu', 'appended mu text')
   svntest.actions.run_and_verify_svn(None, [],
-                                     'shelf-save', 'foo')
+                                     'x-shelf-save', 'foo')
   sbox.simple_append('A/mu', 'appended more text')
   svntest.actions.run_and_verify_svn(None, [],
-                                     'shelf-save', 'foo', '-m', 'log msg')
+                                     'x-shelf-save', 'foo', '-m', 'log msg')
   svntest.actions.run_and_verify_svn(None, [],
-                                     'shelf-save', 'bar', '-m', 'log msg')
+                                     'x-shelf-save', 'bar', '-m', 'log msg')
 
   # We don't check for time-ordering of the shelves. If we want to do so, we
   # would need to sleep for timestamps to differ, between creating them.
@@ -621,7 +621,7 @@ def list_shelves(sbox):
   # a quiet list
   expected_out = svntest.verify.UnorderedRegexListOutput(['foo', 'bar'])
   svntest.actions.run_and_verify_svn(expected_out, [],
-                                     'shelf-list', '-q')
+                                     'x-shelf-list', '-q')
 
   # a detailed list
   expected_out = svntest.verify.UnorderedRegexListOutput(['foo .* 1 path.*',
@@ -629,7 +629,7 @@ def list_shelves(sbox):
                                                           'bar .* 1 path.*',
                                                           ' log msg'])
   svntest.actions.run_and_verify_svn(expected_out, [],
-                                     'shelf-list')
+                                     'x-shelf-list')
 
   os.chdir(was_cwd)
 
@@ -668,7 +668,7 @@ def refuse_to_shelve_conflict(sbox):
     r'      >   not shelved'])
   svntest.actions.run_and_verify_svn(expected_out,
                                      '.* 1 path could not be shelved',
-                                     'shelf-save', 'foo')
+                                     'x-shelf-save', 'foo')
 
   os.chdir(was_cwd)
 
@@ -695,7 +695,7 @@ def unshelve_with_merge(sbox, setup, mod
 
   # Shelve; check there are no longer any modifications
   svntest.actions.run_and_verify_svn(None, [],
-                                     'shelve', 'foo')
+                                     'x-shelve', 'foo')
   check_wc_state(wc_dir, initial_state)
 
   # Make a different change, with which we shall merge
@@ -705,7 +705,7 @@ def unshelve_with_merge(sbox, setup, mod
 
   # Unshelve; check the expected result of the merge
   svntest.actions.run_and_verify_svn(None, [],
-                                     'unshelve', 'foo')
+                                     'x-unshelve', 'foo')
   tweak_expected_state(modified_state)
   check_wc_state(wc_dir, modified_state)
 
@@ -892,7 +892,7 @@ def run_and_verify_shelf_diff_summarize(
 
   exit_code, output, errput = svntest.actions.run_and_verify_svn(
                                 None, [],
-                                'shelf-diff', '--summarize', shelf, *args)
+                                'x-shelf-diff', '--summarize', shelf, *args)
 
   actual = svntest.tree.build_tree_from_diff_summarize(output)
 
@@ -930,7 +930,7 @@ def shelf_diff_simple(sbox):
   modified_state = get_wc_state(wc_dir)
 
   svntest.actions.run_and_verify_svn(None, [],
-                                     'shelf-save', 'foo')
+                                     'x-shelf-save', 'foo')
 
   # basic svn-style diff
   expected_output = make_diff_header('A/mu', 'revision 2', 'working copy') + [
@@ -940,7 +940,7 @@ def shelf_diff_simple(sbox):
                     ] + make_diff_prop_header('A/mu') \
                     + make_diff_prop_modified('p1', 'v', 'changed')
   svntest.actions.run_and_verify_svn(expected_output, [],
-                                     'shelf-diff', 'foo')
+                                     'x-shelf-diff', 'foo')
 
   # basic summary diff
   expected_diff = svntest.wc.State(wc_dir, {

Modified: subversion/trunk/tools/client-side/bash_completion
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/client-side/bash_completion?rev=1841091&r1=1841090&r2=1841091&view=diff
==============================================================================
--- subversion/trunk/tools/client-side/bash_completion (original)
+++ subversion/trunk/tools/client-side/bash_completion Mon Sep 17 16:48:54 2018
@@ -248,8 +248,8 @@ _svn()
 	cmds="$cmds patch propdel pdel propedit pedit propget pget proplist"
 	cmds="$cmds plist propset pset relocate resolve resolved revert status"
 	cmds="$cmds switch unlock update upgrade"
-	cmds="$cmds shelf-list-by-paths shelf-diff shelf-drop shelf-list shelf-log shelf-save"
-	cmds="$cmds shelve shelves unshelve"
+	cmds="$cmds x-shelf-diff x-shelf-drop x-shelf-list x-shelf-list-by-paths"
+	cmds="$cmds x-shelf-log x-shelf-save x-shelve x-shelves x-unshelve"
 
 	# help options have a strange command status...
 	local helpOpts='--help -h'
@@ -1024,34 +1024,34 @@ _svn()
 	upgrade)
 		cmdOpts="$qOpts $pOpts"
 		;;
-	shelf-list-by-paths)
+	x-shelf-list-by-paths)
 		cmdOpts="$pOpts"
 		;;
-	shelf-diff)
+	x-shelf-diff)
 		cmdOpts="$pOpts --summarize"
 		;;
-	shelf-drop)
+	x-shelf-drop)
 		cmdOpts="$pOpts"
 		;;
-	shelf-list|shelves)
+	x-shelf-list|x-shelves)
 		cmdOpts="$qOpts $pOpts"
 		;;
-	shelf-log)
+	x-shelf-log)
 		cmdOpts="$qOpts $pOpts"
 		;;
-	shelf-save)
+	x-shelf-save)
 		cmdOpts="--dry-run \
                          --depth --targets $cOpts \
                          $mOpts \
                          $qOpts $pOpts"
 		;;
-	shelve)
+	x-shelve)
 		cmdOpts="--keep-local --dry-run \
                          --depth --targets $cOpts \
                          $mOpts \
                          $qOpts $pOpts"
 		;;
-	unshelve)
+	x-unshelve)
 		cmdOpts="--drop --dry-run \
                          $qOpts $pOpts"
 		;;