[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] '-p' shortcut to '--parents'

From: Kamesh Jayachandran <kamesh_at_collab.net>
Date: 2007-05-18 01:06:38 CEST

Hi All,

Find the attached patch and log.

With regards
Kamesh Jayachandran

[[[

Provide '-p' shortcut for '--parents'.

* subversion/svn/cl.h
  (svn_cl__longopt_t): Remove 'svn_cl__parents_opt'.
* subversion/svn/main.c
  (svn_cl__options): Register '-p' shortcut for '--parents'.
  (svn_cl__cmd_table): Register '-p' to be the allowable parameter to 'add',
   'copy', 'mkdir', 'move'.
  (main): Set 'opt_state.parents' for '-p' switch too.

Patch by: kameshj
]]]

Index: subversion/svn/cl.h
===================================================================
--- subversion/svn/cl.h (revision 25053)
+++ subversion/svn/cl.h (working copy)
@@ -84,8 +84,7 @@
   svn_cl__version_opt,
   svn_cl__xml_opt,
   svn_cl__keep_local_opt,
- svn_cl__with_revprop_opt,
- svn_cl__parents_opt
+ svn_cl__with_revprop_opt
 } svn_cl__longopt_t;
 
 
Index: subversion/svn/main.c
===================================================================
--- subversion/svn/main.c (revision 25053)
+++ subversion/svn/main.c (working copy)
@@ -202,7 +202,7 @@
                     N_("set revision property ARG in new revision\n"
                        " "
                        "using the name=value format")},
- {"parents", svn_cl__parents_opt, 0,
+ {"parents", 'p', 0,
                     N_("make and/or add intermediate directories")},
   {0, 0, 0, 0}
 };
@@ -248,7 +248,7 @@
      "usage: add PATH...\n"),
     {svn_cl__targets_opt, 'N', svn_cl__depth_opt, 'q', svn_cl__config_dir_opt,
      svn_cl__force_opt, svn_cl__no_ignore_opt, svn_cl__autoprops_opt,
- svn_cl__no_autoprops_opt, svn_cl__parents_opt} },
+ svn_cl__no_autoprops_opt, 'p'} },
 
   { "blame", svn_cl__blame, {"praise", "annotate", "ann"}, N_
     ("Output the content of specified files or\n"
@@ -343,7 +343,7 @@
      " URL -> WC: check out URL into WC, schedule for addition\n"
      " URL -> URL: complete server-side copy; used to branch & tag\n"
      " All the SRCs must be of the same type.\n"),
- {'r', 'q', svn_cl__parents_opt,
+ {'r', 'q', 'p',
      SVN_CL__LOG_MSG_OPTIONS, SVN_CL__AUTH_OPTIONS, svn_cl__config_dir_opt} },
 
   { "delete", svn_cl__delete, {"del", "remove", "rm"}, N_
@@ -560,7 +560,7 @@
      "\n"
      " In both cases, all the intermediate directories must already exist,\n"
      " unless the --parents option is given.\n"),
- {'q', svn_cl__parents_opt,
+ {'q', 'p',
      SVN_CL__LOG_MSG_OPTIONS, SVN_CL__AUTH_OPTIONS, svn_cl__config_dir_opt} },
 
   { "move", svn_cl__move, {"mv", "rename", "ren"}, N_
@@ -577,7 +577,7 @@
      " WC -> WC: move and schedule for addition (with history)\n"
      " URL -> URL: complete server-side rename.\n"
      " All the SRCs must be of the same type.\n"),
- {'r', 'q', svn_cl__force_opt, svn_cl__parents_opt,
+ {'r', 'q', svn_cl__force_opt, 'p',
      SVN_CL__LOG_MSG_OPTIONS, SVN_CL__AUTH_OPTIONS, svn_cl__config_dir_opt} },
 
   { "propdel", svn_cl__propdel, {"pdel", "pd"}, N_
@@ -1370,7 +1370,7 @@
         if (err != SVN_NO_ERROR)
           return svn_cmdline_handle_exit_error(err, pool, "svn: ");
         break;
- case svn_cl__parents_opt:
+ case 'p':
         opt_state.parents = TRUE;
         break;
       default:

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri May 18 01:06:36 2007

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.