subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1671164 - in /subversion/trunk/subversion/svn: status-cmd.c svn.c
Date Fri, 03 Apr 2015 21:27:47 GMT
Author: rhuijben
Date: Fri Apr  3 21:27:46 2015
New Revision: 1671164

URL: http://svn.apache.org/r1671164
Log:
Allow passing a revision to 'svn status', to allow retrieving a remote
status against a revision different than HEAD.

This exposes a feature we have had at the api level since <= 1.0.

* subversion/svn/status-cmd.c
  (svn_cl__status): Use revision when passed.

* subversion/svn/svn.c
  (svn_cl__cmd_table): Allow passing 'r' to svn status.

Modified:
    subversion/trunk/subversion/svn/status-cmd.c
    subversion/trunk/subversion/svn/svn.c

Modified: subversion/trunk/subversion/svn/status-cmd.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/status-cmd.c?rev=1671164&r1=1671163&r2=1671164&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/status-cmd.c (original)
+++ subversion/trunk/subversion/svn/status-cmd.c Fri Apr  3 21:27:46 2015
@@ -288,8 +288,11 @@ svn_cl__status(apr_getopt_t *os,
 
   SVN_ERR(svn_cl__check_targets_are_local_paths(targets));
 
-  /* We want our -u statuses to be against HEAD. */
-  rev.kind = svn_opt_revision_head;
+  /* We want our -u statuses to be against HEAD by default. */
+  if (opt_state->start_revision.kind == svn_opt_revision_unspecified)
+    rev.kind = svn_opt_revision_head;
+  else
+    rev = opt_state->start_revision;
 
   sb.had_print_error = FALSE;
 

Modified: subversion/trunk/subversion/svn/svn.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/svn.c?rev=1671164&r1=1671163&r2=1671164&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/svn.c (original)
+++ subversion/trunk/subversion/svn/svn.c Fri Apr  3 21:27:46 2015
@@ -1638,8 +1638,8 @@ const svn_opt_subcommand_desc2_t svn_cl_
      "    !     C wc/qaz.c\n"
      "          >   local missing, incoming edit upon update\n"
      "    D       wc/qax.c\n"),
-    { 'u', 'v', 'N', opt_depth, 'q', opt_no_ignore, opt_incremental, opt_xml,
-      opt_ignore_externals, opt_changelist},
+    { 'u', 'v', 'N', opt_depth, 'r', 'q', opt_no_ignore, opt_incremental,
+      opt_xml, opt_ignore_externals, opt_changelist},
     {{'q', N_("don't print unversioned items")}} },
 
   { "switch", svn_cl__switch, {"sw"}, N_



Mime
View raw message