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

Re: Add -c option to merge

From: Alan Barrett <apb_at_cequrux.com>
Date: 2005-10-25 21:42:17 CEST

On Tue, 25 Oct 2005, Alan Barrett wrote:
> A similar option for "svn diff" would be nice.

The following untested patch adds some documentation and adds
'c' to the allowed options for "svn diff".

=== subversion/clients/cmdline/main.c
==================================================================
--- subversion/clients/cmdline/main.c (revision 18414)
+++ subversion/clients/cmdline/main.c (local)
@@ -277,8 +277,8 @@
   
   { "diff", svn_cl__diff, {"di"},
     N_("Display the differences between two paths.\n"
- "usage: 1. diff [-r N[:M]] [TARGET[@REV]...]\n"
- " 2. diff [-r N[:M]] --old=OLD-TGT[@OLDREV] "
+ "usage: 1. diff [-c M|-r N[:M]] [TARGET[@REV]...]\n"
+ " 2. diff [-c M|-r N[:M]] --old=OLD-TGT[@OLDREV] "
        "[--new=NEW-TGT[@NEWREV]] \\\n"
        " [PATH...]\n"
        " 3. diff OLD-URL[@OLDREV] NEW-URL[@NEWREV]\n"
@@ -292,6 +292,7 @@
        " must be specified. M defaults to the current working version if "
        "any\n"
        " TARGET is a working copy path, otherwise it defaults to HEAD.\n"
+ " The \"-c M\" option is equivalent to \"-r N:M\" where N = M-1.\n"
        "\n"
        " 2. Display the differences between OLD-TGT as it was seen in OLDREV "
        "and\n"
@@ -303,14 +304,15 @@
        "URL[@REV]. \n"
        " NEW-TGT defaults to OLD-TGT if not specified. -r N makes OLDREV "
        "default\n"
- " to N, -r N:M makes OLDREV default to N and NEWREV default to M.\n"
+ " to N, -r N:M makes OLDREV default to N and NEWREV default to M,\n"
+ " -c M makes OLDREV default to M-1 and NEWREV default to M.\n"
        "\n"
        " 3. Shorthand for 'svn diff --old=OLD-URL[@OLDREV] "
        "--new=NEW-URL[@NEWREV]'\n"
        "\n"
        " Use just 'svn diff' to display local modifications in "
        "a working copy.\n"),
- {'r', svn_cl__old_cmd_opt, svn_cl__new_cmd_opt, 'N',
+ {'r', 'c', svn_cl__old_cmd_opt, svn_cl__new_cmd_opt, 'N',
      svn_cl__diff_cmd_opt, 'x', svn_cl__no_diff_deleted,
      svn_cl__notice_ancestry_opt, svn_cl__force_opt, SVN_CL__AUTH_OPTIONS,
      svn_cl__config_dir_opt} },
@@ -445,7 +447,7 @@
     N_("Apply the differences between two sources to a working copy path.\n"
        "usage: 1. merge sourceURL1[@N] sourceURL2[@M] [WCPATH]\n"
        " 2. merge sourceWCPATH1@N sourceWCPATH2@M [WCPATH]\n"
- " 3. merge -r N:M SOURCE[@REV] [WCPATH]\n"
+ " 3. merge [-c M|-r N:M] SOURCE[@REV] [WCPATH]\n"
        "\n"
        " 1. In the first form, the source URLs are specified at revisions\n"
        " N and M. These are the two sources to be compared. The "
@@ -461,13 +463,14 @@
        " 3. In the third form, SOURCE can be a URL, or working copy item\n"
        " in which case the corresponding URL is used. This URL in\n"
        " revision REV is compared as it existed between revisions N and \n"
- " M. If REV is not specified, HEAD is assumed.\n"
+ " M. If REV is not specified, HEAD is assumed. The \"-c M\"\n"
+ " option is equivalent to \"-r N:M\" where N = M-1.\n"
        "\n"
        " WCPATH is the working copy path that will receive the changes.\n"
        " If WCPATH is omitted, a default value of '.' is assumed, unless\n"
        " the sources have identical basenames that match a file within '.':\n"
        " in which case, the differences will be applied to that file.\n"),
- {'r', 'N', 'q', 'c', svn_cl__force_opt, svn_cl__dry_run_opt,
+ {'r', 'c', 'N', 'q', svn_cl__force_opt, svn_cl__dry_run_opt,
      svn_cl__merge_cmd_opt, svn_cl__ignore_ancestry_opt,
      SVN_CL__AUTH_OPTIONS, svn_cl__config_dir_opt} },
   

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Oct 25 21:59:34 2005

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.