You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by cm...@apache.org on 2010/06/30 22:32:15 UTC

svn commit: r959426 - in /subversion/trunk/subversion/svn: main.c status.c

Author: cmpilato
Date: Wed Jun 30 20:32:15 2010
New Revision: 959426

URL: http://svn.apache.org/viewvc?rev=959426&view=rev
Log:
Finish issue #3002: "svn st -v" output includes undocumented hyphen.

* subversion/svn/status.c
  (print_status): Consistently display '-' for the working revision of
    a copied item.

* subversion/svn/main.c
  (svn_cl__cmd_table): Document the meaning of the '-' and '?' codes
    in 'svn status' output.

Modified:
    subversion/trunk/subversion/svn/main.c
    subversion/trunk/subversion/svn/status.c

Modified: subversion/trunk/subversion/svn/main.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/main.c?rev=959426&r1=959425&r2=959426&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/main.c (original)
+++ subversion/trunk/subversion/svn/main.c Wed Jun 30 20:32:15 2010
@@ -1051,11 +1051,17 @@ const svn_opt_subcommand_desc2_t svn_cl_
      "      ' ' the working copy is up to date\n"
      "\n"
      "  Remaining fields are variable width and delimited by spaces:\n"
-     "    The working revision (with -u or -v)\n"
+     "    The working revision (with -u or -v; '-' if the item is copied)\n"
      "    The last committed revision and last committed author (with -v)\n"
      "    The working copy path is always the final field, so it can\n"
      "      include spaces.\n"
      "\n"
+     "  The presence of a question mark ('?') where a working revision, last\n"
+     "  committed revision, or last committed author was expected indicates\n"
+     "  that the information is unknown or irrelevant given the state of the\n"
+     "  item (for example, when the item is the result of a copy operation).\n"
+     "  The question mark serves as a visual placeholder to facilitate parsing.\n"
+     "\n"
      "  Example output:\n"
      "    svn status wc\n"
      "     M     wc/bar.c\n"
@@ -1064,13 +1070,13 @@ const svn_opt_subcommand_desc2_t svn_cl_
      "    svn status -u wc\n"
      "     M           965    wc/bar.c\n"
      "           *     965    wc/foo.c\n"
-     "    A  +         965    wc/qax.c\n"
+     "    A  +           -    wc/qax.c\n"
      "    Status against revision:   981\n"
      "\n"
      "    svn status --show-updates --verbose wc\n"
      "     M           965       938 kfogel       wc/bar.c\n"
      "           *     965       922 sussman      wc/foo.c\n"
-     "    A  +         965       687 joe          wc/qax.c\n"
+     "    A  +           -       687 joe          wc/qax.c\n"
      "                 965       687 joe          wc/zig.c\n"
      "    Status against revision:   981\n"
      "\n"

Modified: subversion/trunk/subversion/svn/status.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/status.c?rev=959426&r1=959425&r2=959426&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/status.c (original)
+++ subversion/trunk/subversion/svn/status.c Wed Jun 30 20:32:15 2010
@@ -191,18 +191,16 @@ print_status(const char *path,
          ### we'll just maintain the old behavior. */
       if (! status->versioned)
         working_rev = "";
+      else if (status->copied)
+        working_rev = "-";
       else if (! SVN_IS_VALID_REVNUM(status->revision))
         {
-          if (status->copied)
-            working_rev = "-";
-          else if (node_status == svn_wc_status_added
-              || node_status == svn_wc_status_replaced)
+          if (node_status == svn_wc_status_added ||
+              node_status == svn_wc_status_replaced)
             working_rev = "0";
           else
             working_rev = " ? ";
         }
-      else if (status->copied)
-        working_rev = "-";
       else
         working_rev = apr_psprintf(pool, "%ld", status->revision);