You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2019/02/12 09:12:04 UTC

svn commit: r1853424 - /subversion/branches/shelving-v3/subversion/libsvn_client/shelf.c

Author: julianfoad
Date: Tue Feb 12 09:12:04 2019
New Revision: 1853424

URL: http://svn.apache.org/viewvc?rev=1853424&view=rev
Log:
On the 'shelving-v3' branch: don't include unversioned files in count of changed paths.

* subversion/libsvn_client/shelf.c
  (shelf_status_walk): Tweak a comment.
  (shelf_copy_base): Be sure to remove all unversioned files.

Modified:
    subversion/branches/shelving-v3/subversion/libsvn_client/shelf.c

Modified: subversion/branches/shelving-v3/subversion/libsvn_client/shelf.c
URL: http://svn.apache.org/viewvc/subversion/branches/shelving-v3/subversion/libsvn_client/shelf.c?rev=1853424&r1=1853423&r2=1853424&view=diff
==============================================================================
--- subversion/branches/shelving-v3/subversion/libsvn_client/shelf.c (original)
+++ subversion/branches/shelving-v3/subversion/libsvn_client/shelf.c Tue Feb 12 09:12:04 2019
@@ -458,7 +458,7 @@ shelf_status_walk(svn_client__shelf_vers
                            FALSE /*get_all*/,
                            TRUE /*no_ignore*/,
                            FALSE /*ignore_text_mods*/,
-                           NULL /*ignore_patterns*/,
+                           NULL /*ignore_patterns: use the defaults*/,
                            shelf_status_visitor, &baton,
                            NULL, NULL, /*cancellation*/
                            scratch_pool);
@@ -1033,14 +1033,19 @@ shelf_copy_base(svn_client__shelf_versio
                              FALSE /*added_keep_local*/,
                              ctx, scratch_pool));
   SVN_DBG(("revert4: remove unversioned"));
-  /* ### Work around the bug in "revert added-keep-local=false".
-         (We could do other clean-ups here too, but that's not the point.) */
+  /* Remove all unversioned nodes (including "ignored" ones) because they
+     are not part of the base state and must not show up in "status".
+     ### This also works around a bug in "revert added-keep-local=false" by
+         removing unversioned files that "revert" may have left behind.
+     (We could do other clean-ups here too, but that's not the point, as
+     this is not the proper way to copy the base, just an initial
+     implementation to get us started.) */
   SVN_ERR(svn_client_vacuum(new_shelf_version->files_dir_abspath,
                             TRUE /*remove_unversioned*/,
-                            FALSE /*remove_ignored*/,
+                            TRUE /*remove_ignored*/,
                             FALSE /*fix_timestamps */,
                             FALSE /*vacuum_pristines*/,
-                            FALSE /*include_externals*/,
+                            TRUE /*include_externals*/,
                             ctx, scratch_pool));
   SVN_DBG(("cp-base: done"));
   return SVN_NO_ERROR;