subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From phi...@apache.org
Subject svn commit: r1330382 - in /subversion/trunk/subversion: svn/status.c tests/cmdline/stat_tests.py
Date Wed, 25 Apr 2012 16:15:30 GMT
Author: philip
Date: Wed Apr 25 16:15:29 2012
New Revision: 1330382

URL: http://svn.apache.org/viewvc?rev=1330382&view=rev
Log:
Fix issue 4167, 'svn st -u --xml' for items deleted from repository.

* subversion/svn/status.c
  (combined_repos_status): New.
  (svn_cl__print_status_xml): Print correct item status.

* subversion/tests/cmdline/stat_tests.py
  (status_in_xml): Extend.

Modified:
    subversion/trunk/subversion/svn/status.c
    subversion/trunk/subversion/tests/cmdline/stat_tests.py

Modified: subversion/trunk/subversion/svn/status.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/status.c?rev=1330382&r1=1330381&r2=1330382&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/status.c (original)
+++ subversion/trunk/subversion/svn/status.c Wed Apr 25 16:15:29 2012
@@ -87,6 +87,17 @@ combined_status(const svn_client_status_
   return new_status;
 }
 
+/* Return the combined repository STATUS as shown in 'svn status' based
+   on the repository node status and repository text status */
+static enum svn_wc_status_kind
+combined_repos_status(const svn_client_status_t *status)
+{
+  if (status->repos_node_status == svn_wc_status_modified)
+    return status->repos_text_status;
+
+  return status->repos_node_status;
+}
+
 /* Return the single character representation of the switched column
    status. */
 static char
@@ -509,7 +520,7 @@ svn_cl__print_status_xml(const char *cwd
     {
       svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "repos-status",
                             "item",
-                            generate_status_desc(status->repos_text_status),
+                            generate_status_desc(combined_repos_status(status)),
                             "props",
                             generate_status_desc(status->repos_prop_status),
                             NULL);

Modified: subversion/trunk/subversion/tests/cmdline/stat_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/stat_tests.py?rev=1330382&r1=1330381&r2=1330382&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/stat_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/stat_tests.py Wed Apr 25 16:15:29 2012
@@ -949,6 +949,22 @@ def status_in_xml(sbox):
 
   svntest.actions.run_and_verify_status_xml(expected_entries, file_path, '-u')
 
+  svntest.actions.run_and_verify_svn(None, None, [],
+                                     'rm', '-m', 'repo delete',
+                                     sbox.repo_url + '/A/B/E/alpha')
+
+  expected_entries = {sbox.ospath('A/B/E/alpha')
+                      : {'wcprops' : 'none',
+                         'wcitem' : 'normal',
+                         'wcrev' : '1',
+                         'crev' : '1',
+                         'author' : svntest.main.wc_author,
+                         'rprops' : 'none',
+                         'ritem' : 'deleted'}}
+
+  svntest.actions.run_and_verify_status_xml(expected_entries,
+                                            sbox.ospath('A/B/E/alpha'), '-u')
+
 #----------------------------------------------------------------------
 
 def status_ignored_dir(sbox):



Mime
View raw message