subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1426830 - in /subversion/trunk/subversion: libsvn_wc/diff_editor.c tests/cmdline/diff_tests.py
Date Sat, 29 Dec 2012 20:53:39 GMT
Author: rhuijben
Date: Sat Dec 29 20:53:39 2012
New Revision: 1426830

URL: http://svn.apache.org/viewvc?rev=1426830&view=rev
Log:
Resolve issue #3797, by making sure the repository only versions of nodes are
not marked as already diffed locally.

This issue appears to be introduced by me in r1097806 (1.7), but this same
issue is also reported to against Subversion 1.6.

* subversion/libsvn_wc/diff_editor.c
  (add_directory,
   add_file): Don't store 'added' nodes as already compared, because adds are
     handled as repository only.

* subversion/tests/cmdline/diff_tests.py
  (diff_preexisting_rev_against_local_add): Remove XFail marker.

Modified:
    subversion/trunk/subversion/libsvn_wc/diff_editor.c
    subversion/trunk/subversion/tests/cmdline/diff_tests.py

Modified: subversion/trunk/subversion/libsvn_wc/diff_editor.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/diff_editor.c?rev=1426830&r1=1426829&r2=1426830&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/diff_editor.c (original)
+++ subversion/trunk/subversion/libsvn_wc/diff_editor.c Sat Dec 29 20:53:39 2012
@@ -1288,11 +1288,10 @@ add_directory(const char *path,
                       dir_pool);
   *child_baton = db;
 
-  /* Add this path to the parent directory's list of elements that
-     have been compared. */
-  apr_hash_set(pb->compared, apr_pstrdup(pb->pool, db->path),
-               APR_HASH_KEY_STRING, "");
-
+  /* Issue #3797: Don't add this filename to the parent directory's list of
+     elements that have been compared, to show local additions via the local
+     diff. The repository node is unrelated from the working copy version
+     (similar to not-present in the working copy) */
 
   return SVN_NO_ERROR;
 }
@@ -1438,10 +1437,10 @@ add_file(const char *path,
   fb = make_file_baton(path, TRUE, pb, file_pool);
   *file_baton = fb;
 
-  /* Add this filename to the parent directory's list of elements that
-     have been compared. */
-  apr_hash_set(pb->compared, apr_pstrdup(pb->pool, path),
-               APR_HASH_KEY_STRING, "");
+  /* Issue #3797: Don't add this filename to the parent directory's list of
+     elements that have been compared, to show local additions via the local
+     diff. The repository node is unrelated from the working copy version
+     (similar to not-present in the working copy) */
 
   return SVN_NO_ERROR;
 }

Modified: subversion/trunk/subversion/tests/cmdline/diff_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/diff_tests.py?rev=1426830&r1=1426829&r2=1426830&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/diff_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/diff_tests.py Sat Dec 29 20:53:39 2012
@@ -3352,7 +3352,6 @@ def diff_url_against_local_mods(sbox):
 #----------------------------------------------------------------------
 # Diff against old revision of the parent directory of a removed and
 # locally re-added file.
-@XFail()
 @Issue(3797)
 def diff_preexisting_rev_against_local_add(sbox):
   "diff -r1 of dir with removed-then-readded file"



Mime
View raw message