[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: The unadd, undelete methods and the client README.

From: Mo DeJong <supermo_at_bayarea.net>
Date: 2001-09-18 03:45:28 CEST

On 17 Sep 2001 15:26:48 -0500
cmpilato@collab.net wrote:

> Mo DeJong <supermo@bayarea.net> writes:

> > That certainly sounds like something revert should do. That wou
> > provide the current undelete functionality but it would not give us
> > the ability to do a `snv undelete dir` on a directory delete that
> > has already been committed.
>
> Dude, that deleted dir is in revision history. Now, I don't know how
> easy/hard it would be resurrect that directory *and preserve its
> versioned history*, but simply recreating it is a one-line shell
> command (up'ing to an old version, stripping SVN/ subdirs, add
> --recursing that bad boy, and committing). And I think I just saw
> someone mail about `svn merge', which is certainly the way to go with
> this.
>
> If `revert' got smarter and `unadd' and `undelete' could die, I
> wouldn't lose a wink of sleep over that change. :-)

Well, both you and Philip blew a hole in my only argument for
keeping the undelete command. On that note, here is a patch
that removes all traces of those two commands. I am going to
attach and paste this patch just in case something goes wrong
since it is quite large.

cheers
Mo DeJong

2001-09-17 Mo DeJong <supermo@bayarea.net>

        Remove useless unadd and undelete subcomands.

        * subversion/include/svn_wc.h (svn_wc_unadd, svn_wc_undelete):
        * subversion/include/svn_client.h (svn_client_unadd, svn_client_undelete):
        * subversion/include/svn_pools.h (report_unadded_item,
        report_undeleted_item):
        * subversion/libsvn_wc/entries.c:
        * subversion/libsvn_wc/adm_ops.c (mark_tree_state,
        svn_wc_unadd, svn_wc_undelete):
        * subversion/libsvn_subr/svn_error.c (report_unadded_item,
        report_undeleted_item):
        * subversion/libsvn_client/delete.c (svn_client_undelete):
        * subversion/libsvn_client/add.c (svn_client_unadd):
        * subversion/bindings/java/jni/org/tigris/subversion/lib/WorkingCopy.java:
        * subversion/bindings/java/jni/org/tigris/subversion/lib/Client.java:
        * subversion/clients/cmdline/cl.h (svn_cl__unadd, svn_cl__undelete):
        * subversion/clients/cmdline/add-cmd.c (svn_cl__unadd):
        * subversion/clients/cmdline/delete-cmd.c (svn_cl__undelete):
        * subversion/clients/cmdline/feedback.c (report_unadded_item,
        report_undeleted_item):
        * subversion/clients/cmdline/main.c (unadd, undelete):
        * subversion/tests/clients/cmdline/schedule_tests.py:
        * doc/user/svn_for_cvs_users.txt:
        * doc/user/manual/adds.texi:

Index: ./subversion/include/svn_wc.h
===================================================================
--- ./subversion/include/SVN/text-base/svn_wc.h Mon Sep 17 10:42:14 2001
+++ ./subversion/include/svn_wc.h Mon Sep 17 17:45:08 2001
@@ -114,8 +114,6 @@
   svn_wc_schedule_add, /* Slated for addition */
   svn_wc_schedule_delete, /* Slated for deletion */
   svn_wc_schedule_replace, /* Slated for replacement (delete + add) */
- svn_wc_schedule_unadd, /* Slated for un-addition */
- svn_wc_schedule_undelete /* Slated for un-deletion */
 };
 
 enum svn_wc_existence_t
@@ -341,19 +339,6 @@
    caller should take care of that, if it cares. */
 svn_error_t *svn_wc_add_file (svn_stringbuf_t *file,
                               apr_pool_t *pool);
-
-/* Recursively un-mark a tree (beginning at a directory or a file
- PATH) for addition. */
-svn_error_t *svn_wc_unadd (svn_stringbuf_t *path,
- apr_pool_t *pool);
-
-/* Un-mark a PATH for deletion. If RECURSE is TRUE and PATH
- represents a directory, un-mark the entire tree under PATH for
- deletion. */
-svn_error_t *svn_wc_undelete (svn_stringbuf_t *path,
- svn_boolean_t recurse,
- apr_pool_t *pool);
-
 
 /* Remove entry NAME in PATH from revision control. NAME must be
    either a file or SVN_WC_ENTRY_THIS_DIR.
Index: ./subversion/include/svn_client.h
===================================================================
--- ./subversion/include/SVN/text-base/svn_client.h Mon Sep 10 09:52:05 2001
+++ ./subversion/include/svn_client.h Mon Sep 17 17:43:02 2001
@@ -247,22 +247,10 @@
                 svn_boolean_t recursive,
                 apr_pool_t *pool);
 
-
-svn_error_t *
-svn_client_unadd (svn_stringbuf_t *path,
- apr_pool_t *pool);
-
-
 svn_error_t *
 svn_client_delete (svn_stringbuf_t *path,
                    svn_boolean_t force,
                    apr_pool_t *pool);
-
-
-svn_error_t *
-svn_client_undelete (svn_stringbuf_t *path,
- svn_boolean_t recursive,
- apr_pool_t *pool);
 
 /* Import a tree, using optional pre- and post-commit hook editors
  * (BEFORE_EDITOR, BEFORE_EDIT_BATON / AFTER_EDITOR,
Index: ./subversion/include/svn_pools.h
===================================================================
--- ./subversion/include/SVN/text-base/svn_pools.h Mon Sep 10 09:52:03 2001
+++ ./subversion/include/svn_pools.h Mon Sep 17 17:36:00 2001
@@ -115,14 +115,8 @@
   /* Report items just scheduled for addition to revision control. */
   apr_status_t (*report_added_item) (const char *path, apr_pool_t *pool);
 
- /* Report items just un-scheduled for addition to revision control. */
- apr_status_t (*report_unadded_item) (const char *path, apr_pool_t *pool);
-
   /* Report items just scheduled for removal to revision control. */
   apr_status_t (*report_deleted_item) (const char *path, apr_pool_t *pool);
-
- /* Report items just un-scheduled for removal to revision control. */
- apr_status_t (*report_undeleted_item) (const char *path, apr_pool_t *pool);
 
   /* Generic human-readable we-think-it's-non-fatal warning. This
      function can parse STATUS and decide whether a "real" error
Index: ./subversion/libsvn_wc/entries.c
===================================================================
--- ./subversion/libsvn_wc/SVN/text-base/entries.c Mon Sep 10 17:16:48 2001
+++ ./subversion/libsvn_wc/entries.c Mon Sep 17 18:10:20 2001
@@ -762,10 +762,8 @@
       /* These are all valid states */
       break;
 
- case svn_wc_schedule_unadd:
- case svn_wc_schedule_undelete:
     default:
- /* These are all INvalid states */
+ /* This is an invalid state */
       return svn_error_createf
         (SVN_ERR_WC_CORRUPT, 0, NULL, pool,
          "Directory '%s' has an invalid schedule",
@@ -798,10 +796,8 @@
           /* These are all valid states */
           break;
 
- case svn_wc_schedule_unadd:
- case svn_wc_schedule_undelete:
         default:
- /* These are all INvalid states */
+ /* This is an invalid state */
           return svn_error_createf
             (SVN_ERR_WC_CORRUPT, 0, NULL, pool,
              "'%s' in directory '%s' has an invalid schedule",
@@ -1240,13 +1236,6 @@
            "fold_state_changes: Can't replace '%s' in deleted directory"
            "--try undeleting its parent directory first",
            name->data);
- if (*schedule == svn_wc_schedule_undelete)
- return
- svn_error_createf
- (SVN_ERR_WC_ENTRY_BOGUS_MERGE, 0, NULL, pool,
- "fold_state_changes: Can't undelete '%s' in deleted directory"
- "--try undeleting its parent directory first",
- name->data);
     }
 
   switch (entry->schedule)
@@ -1255,11 +1244,8 @@
       switch (*schedule)
         {
         case svn_wc_schedule_normal:
- case svn_wc_schedule_unadd:
- case svn_wc_schedule_undelete:
- /* There are all no-op cases. _normal is trivial, _unadd
- and _undelete might merit a warning, but whatever. Reset
- the schedule modification bit and move along. */
+ /* Normal is a trivial no-op case. Reset the
+ schedule modification bit and move along. */
           *modify_flags &= ~SVN_WC__ENTRY_MODIFY_SCHEDULE;
           return SVN_NO_ERROR;
 
@@ -1289,22 +1275,18 @@
         case svn_wc_schedule_normal:
         case svn_wc_schedule_add:
         case svn_wc_schedule_replace:
- case svn_wc_schedule_undelete:
           /* These are all no-op cases. Normal is obvious, as is add.
              Replace on an entry marked for addition breaks down to
              (add + (delete + add)), which resolves to just (add), and
              since this entry is already marked with (add), this too
- is a no-op. Undelete might merit a warning about
- undeleting stuff that isn't deleted, but we opt not to
- care. */
+ is a no-op. */
           *modify_flags &= ~SVN_WC__ENTRY_MODIFY_SCHEDULE;
           return SVN_NO_ERROR;
 
 
         case svn_wc_schedule_delete:
- case svn_wc_schedule_unadd:
- /* Not-yet-versioned item being deleted or un-added? Just
- remove the entry altogether. */
+ /* Not-yet-versioned item being deleted, Just
+ remove the entry. */
           apr_hash_set (entries, name->data, name->len, NULL);
           return SVN_NO_ERROR;
         }
@@ -1315,7 +1297,6 @@
         {
         case svn_wc_schedule_normal:
         case svn_wc_schedule_delete:
- case svn_wc_schedule_unadd:
           /* These are no-op cases. */
           *modify_flags &= ~SVN_WC__ENTRY_MODIFY_SCHEDULE;
           return SVN_NO_ERROR;
@@ -1333,13 +1314,7 @@
              (delete + (delete + add)), which might deserve a warning,
              but whatever. */
           return SVN_NO_ERROR;
-
 
- case svn_wc_schedule_undelete:
- /* Undeleting a to-be-deleted entry resets the schedule to
- 'normal'. */
- *schedule = svn_wc_schedule_normal;
- return SVN_NO_ERROR;
         }
       break;
 
@@ -1364,23 +1339,9 @@
         case svn_wc_schedule_delete:
           /* Deleting a to-be-replaced entry breaks down to ((delete +
              add) + delete) which resolves to a flat deletion. */
- case svn_wc_schedule_unadd:
- /* Unadding a to-be-replaced entry breaks down to ((delete +
- add) - add), which leaves just the deletion. */
           *schedule = svn_wc_schedule_delete;
           return SVN_NO_ERROR;
 
-
- case svn_wc_schedule_undelete:
- /* Despite the fact that the to-be-replaced state of this
- entry implies a deletion action, that's buried under an
- addition action. */
- return
- svn_error_createf
- (SVN_ERR_WC_ENTRY_BOGUS_MERGE, 0, NULL, pool,
- "fold_state_changes: Can't undelete '%s' marked for replacement"
- "--try unadding this entry first",
- name->data);
         }
       break;
 
Index: ./subversion/libsvn_wc/adm_ops.c
===================================================================
--- ./subversion/libsvn_wc/SVN/text-base/adm_ops.c Mon Sep 10 17:16:48 2001
+++ ./subversion/libsvn_wc/adm_ops.c Mon Sep 17 17:49:31 2001
@@ -356,8 +356,6 @@
 
 enum mark_tree_state {
   mark_tree_state_delete = 1,
- mark_tree_state_unadd,
- mark_tree_state_undelete
 };
 
 
@@ -374,17 +372,6 @@
   /* Read the entries file for this directory. */
   SVN_ERR (svn_wc_entries_read (&entries, dir, pool));
 
- /* Handle "this dir" for cases that need it handled before
- recursion. */
- if (state == mark_tree_state_undelete)
- SVN_ERR (svn_wc__entry_modify
- (dir, NULL,
- SVN_WC__ENTRY_MODIFY_SCHEDULE,
- SVN_INVALID_REVNUM, svn_node_dir,
- svn_wc_schedule_undelete,
- svn_wc_existence_normal,
- FALSE, 0, 0, NULL, pool, NULL));
-
   /* Mark each entry in the entries file. */
   for (hi = apr_hash_first (pool, entries); hi; hi = apr_hash_next (hi))
     {
@@ -436,45 +423,6 @@
             }
           break;
 
- case mark_tree_state_unadd:
- SVN_ERR (svn_wc__entry_modify
- (dir, basename,
- SVN_WC__ENTRY_MODIFY_SCHEDULE,
- SVN_INVALID_REVNUM, entry->kind,
- svn_wc_schedule_unadd,
- svn_wc_existence_normal,
- FALSE, 0, 0, NULL, subpool, NULL));
- if (fbtable)
- {
- apr_status_t apr_err;
-
- apr_err = fbtable->report_unadded_item (fullpath->data, pool);
- if (apr_err)
- return svn_error_createf
- (apr_err, 0, NULL, pool,
- "Error reporting unadded item `%s'", fullpath->data);
- }
- break;
-
- case mark_tree_state_undelete:
- SVN_ERR (svn_wc__entry_modify
- (dir, basename,
- SVN_WC__ENTRY_MODIFY_SCHEDULE,
- SVN_INVALID_REVNUM, entry->kind,
- svn_wc_schedule_undelete,
- svn_wc_existence_normal,
- FALSE, 0, 0, NULL, subpool, NULL));
- if (fbtable)
- {
- apr_status_t apr_err;
-
- apr_err = fbtable->report_undeleted_item (fullpath->data, pool);
- if (apr_err)
- return svn_error_createf
- (apr_err, 0, NULL, pool,
- "Error reporting undeleted item `%s'", fullpath->data);
- }
- break;
         }
 
       /* Reset FULLPATH to just hold this dir's name. */
@@ -493,14 +441,6 @@
               svn_wc_schedule_delete,
               svn_wc_existence_normal,
               FALSE, 0, 0, NULL, pool, NULL));
- if (state == mark_tree_state_unadd)
- SVN_ERR (svn_wc__entry_modify
- (dir, NULL,
- SVN_WC__ENTRY_MODIFY_SCHEDULE,
- SVN_INVALID_REVNUM, svn_node_dir,
- svn_wc_schedule_unadd,
- svn_wc_existence_normal,
- FALSE, 0, 0, NULL, pool, NULL));
 
   /* Destroy our per-iteration pool. */
   svn_pool_destroy (subpool);
@@ -715,132 +668,6 @@
 
 
 svn_error_t *
-svn_wc_unadd (svn_stringbuf_t *path,
- apr_pool_t *pool)
-{
- svn_wc_entry_t *entry;
- svn_stringbuf_t *dir, *basename;
-
- /* Get the entry for PATH */
- SVN_ERR (svn_wc_entry (&entry, path, pool));
- if (! entry)
- return svn_error_createf
- (SVN_ERR_WC_ENTRY_NOT_FOUND, 0, NULL, pool,
- "'%s' does not appear to be under revision control", path->data);
-
- if (entry->kind == svn_node_dir)
- {
- /* Recursively un-mark a whole tree for addition. */
- SVN_ERR (mark_tree (path, mark_tree_state_unadd, pool));
- }
-
- /* We need to un-mark this entry for addition in its parent's entries
- file, so we split off basename from the parent path, then fold in
- the addition of a delete flag. */
- svn_path_split (path, &dir, &basename, svn_path_local_style, pool);
- if (svn_path_is_empty (dir, svn_path_local_style))
- svn_stringbuf_set (dir, ".");
-
- SVN_ERR (svn_wc__entry_modify
- (dir, basename,
- SVN_WC__ENTRY_MODIFY_SCHEDULE,
- SVN_INVALID_REVNUM, svn_node_none,
- svn_wc_schedule_unadd,
- svn_wc_existence_normal,
- FALSE, 0, 0, NULL, pool, NULL));
-
- /* Now, call our client feedback function. */
- {
- svn_pool_feedback_t *fbtable = svn_pool_get_feedback_vtable (pool);
- if (fbtable)
- {
- apr_status_t apr_err;
-
- apr_err = fbtable->report_unadded_item (path->data, pool);
- if (apr_err)
- return svn_error_createf
- (apr_err, 0, NULL, pool,
- "Error reporting un-added item `%s'", path->data);
- }
- }
-
- return SVN_NO_ERROR;
-}
-
-
-/* Un-mark a PATH for deletion. If RECURSE is TRUE and PATH
- represents a directory, un-mark the entire tree under PATH for
- deletion. */
-svn_error_t *
-svn_wc_undelete (svn_stringbuf_t *path,
- svn_boolean_t recursive,
- apr_pool_t *pool)
-{
- svn_wc_entry_t *entry;
- svn_stringbuf_t *dir, *basename;
-
- /* Get the entry for PATH */
- SVN_ERR (svn_wc_entry (&entry, path, pool));
- if (! entry)
- return svn_error_createf
- (SVN_ERR_WC_ENTRY_NOT_FOUND, 0, NULL, pool,
- "'%s' does not appear to be under revision control", path->data);
-
- if (entry->kind == svn_node_dir)
- {
- if (recursive)
- {
- /* Recursively un-mark a whole tree for deletion. */
- SVN_ERR (mark_tree (path, mark_tree_state_undelete, pool));
- }
- else
- {
- /* Just mark the "this dir" entry for this directory. */
- SVN_ERR (svn_wc__entry_modify
- (path, NULL,
- SVN_WC__ENTRY_MODIFY_SCHEDULE,
- SVN_INVALID_REVNUM, svn_node_none,
- svn_wc_schedule_undelete,
- svn_wc_existence_normal,
- FALSE, 0, 0, NULL, pool, NULL));
- }
- }
-
- /* We need to un-mark this entry for deletion in its parent's entries
- file, so we split off basename from the parent path, then fold in
- the addition of a delete flag. */
- svn_path_split (path, &dir, &basename, svn_path_local_style, pool);
- if (svn_path_is_empty (dir, svn_path_local_style))
- svn_stringbuf_set (dir, ".");
-
- SVN_ERR (svn_wc__entry_modify
- (dir, basename,
- SVN_WC__ENTRY_MODIFY_SCHEDULE,
- SVN_INVALID_REVNUM, svn_node_none,
- svn_wc_schedule_undelete,
- svn_wc_existence_normal,
- FALSE, 0, 0, NULL, pool, NULL));
-
- /* Now, call our client feedback function. */
- {
- svn_pool_feedback_t *fbtable = svn_pool_get_feedback_vtable (pool);
- if (fbtable)
- {
- apr_status_t apr_err;
-
- apr_err = fbtable->report_undeleted_item (path->data, pool);
- if (apr_err)
- return svn_error_createf
- (apr_err, 0, NULL, pool,
- "Error reporting un-deleted item `%s'", path->data);
- }
- }
-
- return SVN_NO_ERROR;
-}
-
-
-svn_error_t *
 svn_wc_revert (svn_stringbuf_t *path,
                apr_pool_t *pool)
 {
Index: ./subversion/libsvn_subr/svn_error.c
===================================================================
--- ./subversion/libsvn_subr/SVN/text-base/svn_error.c Mon Sep 10 09:51:41 2001
+++ ./subversion/libsvn_subr/svn_error.c Mon Sep 17 17:51:54 2001
@@ -200,24 +200,12 @@
 }
 
 static apr_status_t
-report_unadded_item (const char *path, apr_pool_t *pool)
-{
- return APR_SUCCESS;
-}
-
-static apr_status_t
 report_deleted_item (const char *path, apr_pool_t *pool)
 {
   return APR_SUCCESS;
 }
 
 static apr_status_t
-report_undeleted_item (const char *path, apr_pool_t *pool)
-{
- return APR_SUCCESS;
-}
-
-static apr_status_t
 report_warning (apr_status_t status, const char *warning)
 {
   return APR_SUCCESS;
@@ -269,9 +257,7 @@
       /* Stuff it with default useless functions. */
       feedback_vtable->report_unversioned_item = report_unversioned_item;
       feedback_vtable->report_added_item = report_added_item;
- feedback_vtable->report_unadded_item = report_unadded_item;
       feedback_vtable->report_deleted_item = report_deleted_item;
- feedback_vtable->report_undeleted_item = report_undeleted_item;
       feedback_vtable->report_warning = report_warning;
       feedback_vtable->report_progress = report_progress;
 
Index: ./subversion/libsvn_client/delete.c
===================================================================
--- ./subversion/libsvn_client/SVN/text-base/delete.c Mon Sep 10 09:51:33 2001
+++ ./subversion/libsvn_client/delete.c Mon Sep 17 17:44:02 2001
@@ -61,22 +61,6 @@
   return SVN_NO_ERROR;
 }
 
-
-svn_error_t *
-svn_client_undelete (svn_stringbuf_t *path,
- svn_boolean_t recursive,
- apr_pool_t *pool)
-{
- svn_error_t *err;
-
- /* Mark the entry for deletion. */
- err = svn_wc_undelete (path, recursive, pool);
- if (err)
- return err;
-
- return SVN_NO_ERROR;
-}
-
 
 /*
  * local variables:
Index: ./subversion/libsvn_client/add.c
===================================================================
--- ./subversion/libsvn_client/SVN/text-base/add.c Mon Sep 10 09:51:32 2001
+++ ./subversion/libsvn_client/add.c Mon Sep 17 17:43:15 2001
@@ -146,21 +146,6 @@
   return SVN_NO_ERROR;
 }
 
-
-svn_error_t *
-svn_client_unadd (svn_stringbuf_t *path,
- apr_pool_t *pool)
-{
- svn_error_t *err;
-
- err = svn_wc_unadd (path, pool);
- if (err)
- return err;
-
- return SVN_NO_ERROR;
-}
-
-
 
 /*
  * local variables:
Index: ./subversion/bindings/java/jni/org/tigris/subversion/lib/WorkingCopy.java
===================================================================
--- ./subversion/bindings/java/jni/org/tigris/subversion/lib/SVN/text-base/WorkingCopy.java Mon Sep 10 09:51:27 2001
+++ ./subversion/bindings/java/jni/org/tigris/subversion/lib/WorkingCopy.java Mon Sep 17 17:32:18 2001
@@ -133,21 +133,6 @@
   public void addFile(String file) throws SubversionException;
 
   /**
- * Recursively un-mark a tree (beginning at a directory or a file
- * PATH) for addition.
- */
- public void unadd(String path) throws SubversionException;
-
- /**
- * Un-mark a PATH for deletion. If RECURSE is TRUE and PATH
- * represents a directory, un-mark the entire tree under PATH for
- * deletion.
- */
- public void undelete(String path, boolean recurse)
- throws SubversionException;
-
-
- /**
    * Remove entry NAME in PATH from revision control. NAME must be
    * either a file or SVN_WC_ENTRY_THIS_DIR.
    *
Index: ./subversion/bindings/java/jni/org/tigris/subversion/lib/Client.java
===================================================================
--- ./subversion/bindings/java/jni/org/tigris/subversion/lib/SVN/text-base/Client.java Mon Sep 10 09:51:29 2001
+++ ./subversion/bindings/java/jni/org/tigris/subversion/lib/Client.java Mon Sep 17 17:33:34 2001
@@ -85,12 +85,7 @@
 
   public void add(String path, boolean recursive) throws SubversionException;
 
- public void unAdd(String path) throws SubversionException;
-
   public void delete(String path, boolean force) throws SubversionException;
-
- public void unDelete(String path, boolean recursive)
- throws SubversionException;
 
   /**
    * Import a tree, using optional pre- and post-commit hook editors
Index: ./subversion/clients/cmdline/cl.h
===================================================================
--- subversion/clients/cmdline/SVN/text-base/cl.h Wed Sep 12 23:02:28 2001
+++ subversion/clients/cmdline/cl.h Mon Sep 17 17:31:04 2001
@@ -122 +130,0 @@
- svn_cl__unadd,
@@ -127 +134,0 @@
- svn_cl__undelete,
Index: ./subversion/clients/cmdline/add-cmd.c
===================================================================
--- ./subversion/clients/cmdline/SVN/text-base/add-cmd.c Mon Sep 10 09:51:10 2001
+++ ./subversion/clients/cmdline/add-cmd.c Mon Sep 17 17:31:04 2001
@@ -1,5 +1,5 @@
 /*
- * add-cmd.c -- Subversion add/unadd commands
+ * add-cmd.c -- Add command
  *
  * ====================================================================
  * Copyright (c) 2000-2001 CollabNet. All rights reserved.
@@ -67,33 +67,6 @@
 
   return SVN_NO_ERROR;
 }
-
-
-svn_error_t *
-svn_cl__unadd (apr_getopt_t *os,
- svn_cl__opt_state_t *opt_state,
- apr_pool_t *pool)
-{
- apr_array_header_t *targets;
- int i;
-
- targets = svn_cl__args_to_target_array (os, pool);
-
- if (targets->nelts)
- for (i = 0; i < targets->nelts; i++)
- {
- svn_stringbuf_t *target = ((svn_stringbuf_t **) (targets->elts))[i];
- SVN_ERR (svn_client_unadd (target, pool));
- }
- else
- {
- svn_cl__subcommand_help ("unadd", pool);
- return svn_error_create (SVN_ERR_CL_ARG_PARSING_ERROR, 0, 0, pool, "");
- }
-
- return SVN_NO_ERROR;
-}
-
 
 
 /*
Index: ./subversion/clients/cmdline/delete-cmd.c
===================================================================
--- ./subversion/clients/cmdline/SVN/text-base/delete-cmd.c Mon Sep 10 09:51:10 2001
+++ ./subversion/clients/cmdline/delete-cmd.c Mon Sep 17 17:31:04 2001
@@ -1,5 +1,5 @@
 /*
- * delete-cmd.c -- Delete/undelete commands
+ * delete-cmd.c -- Delete command
  *
  * ====================================================================
  * Copyright (c) 2000-2001 CollabNet. All rights reserved.
@@ -56,36 +56,6 @@
   else
     {
       svn_cl__subcommand_help ("delete", pool);
- return svn_error_create (SVN_ERR_CL_ARG_PARSING_ERROR, 0, 0, pool, "");
- }
-
- return SVN_NO_ERROR;
-}
-
-
-svn_error_t *
-svn_cl__undelete (apr_getopt_t *os,
- svn_cl__opt_state_t *opt_state,
- apr_pool_t *pool)
-{
- svn_error_t *err;
- apr_array_header_t *targets;
- int i;
- svn_boolean_t recursive = opt_state->recursive;
-
- targets = svn_cl__args_to_target_array (os, pool);
-
- if (targets->nelts)
- for (i = 0; i < targets->nelts; i++)
- {
- svn_stringbuf_t *target = ((svn_stringbuf_t **) (targets->elts))[i];
- err = svn_client_undelete (target, recursive, pool);
- if (err)
- return err;
- }
- else
- {
- svn_cl__subcommand_help ("undelete", pool);
       return svn_error_create (SVN_ERR_CL_ARG_PARSING_ERROR, 0, 0, pool, "");
     }
 
Index: ./subversion/clients/cmdline/feedback.c
===================================================================
--- ./subversion/clients/cmdline/SVN/text-base/feedback.c Mon Sep 10 09:51:11 2001
+++ ./subversion/clients/cmdline/feedback.c Mon Sep 17 17:44:36 2001
@@ -78,16 +78,6 @@
   return APR_SUCCESS;
 }
 
-
-static apr_status_t
-report_unadded_item (const char *path, apr_pool_t *pool)
-{
- printf ("- %s\n", path);
-
- return APR_SUCCESS;
-}
-
-
 static apr_status_t
 report_deleted_item (const char *path, apr_pool_t *pool)
 {
@@ -96,16 +86,6 @@
   return APR_SUCCESS;
 }
 
-
-static apr_status_t
-report_undeleted_item (const char *path, apr_pool_t *pool)
-{
- printf ("+ %s\n", path);
-
- return APR_SUCCESS;
-}
-
-
 static apr_status_t
 report_warning (apr_status_t status, const char *warning)
 {
@@ -137,9 +117,7 @@
 
   feedback_vtable->report_unversioned_item = report_unversioned_item;
   feedback_vtable->report_added_item = report_added_item;
- feedback_vtable->report_unadded_item = report_unadded_item;
   feedback_vtable->report_deleted_item = report_deleted_item;
- feedback_vtable->report_undeleted_item = report_undeleted_item;
   feedback_vtable->report_warning = report_warning;
   /* we're -not- overriding report_progress; we have no need for it
      yet. */
Index: ./subversion/clients/cmdline/main.c
===================================================================
--- ./subversion/clients/cmdline/SVN/text-base/main.c Wed Sep 12 23:02:57 2001
+++ ./subversion/clients/cmdline/main.c Mon Sep 17 17:31:04 2001
@@ -64,11 +64,6 @@
   { "ad", TRUE, NULL, NULL },
   { "new", TRUE, NULL, NULL },
 
- { "unadd", FALSE, svn_cl__unadd,
- "Recursively un-add files and directories marked for addition.\n"
- "usage: unadd [TARGETS]\n" },
- { "unad", TRUE, NULL, NULL },
-
   { "checkout", FALSE, svn_cl__checkout,
     "Check out a working directory from a repository.\n"
     "usage: checkout REPOSPATH1 [REPOSPATH2 REPOSPATH3...]\n" },
@@ -86,12 +81,6 @@
   { "remove", TRUE, NULL, NULL },
   { "rm", TRUE, NULL, NULL },
 
- { "undelete", FALSE, svn_cl__undelete,
- "Undelete files and directories marked for deletion.\n"
- "usage: undelete [TARGETS]\n" },
- { "undel", TRUE, NULL, NULL },
- { "unrm", TRUE, NULL, NULL },
-
   { "help", FALSE, svn_cl__help,
     "Display this usage message.\n"
     "usage: help [SUBCOMMAND1 [SUBCOMMAND2] ...]\n" },
 
Index: ./subversion/tests/clients/cmdline/schedule_tests.py
===================================================================
--- ./subversion/tests/clients/cmdline/SVN/text-base/schedule_tests.py Mon Sep 10 09:50:26 2001
+++ ./subversion/tests/clients/cmdline/schedule_tests.py Mon Sep 17 17:51:35 2001
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 #
 # schedule_tests.py: testing working copy scheduling
-# (adds, unadds, deletes, and undeletes)
+# (adds, and deletes)
 #
 # Subversion is a tool for revision control.
 # See http://subversion.tigris.org for more information.
Index: ./doc/user/svn_for_cvs_users.txt
===================================================================
--- ./doc/user/SVN/text-base/svn_for_cvs_users.txt Thu Sep 13 15:27:59 2001
+++ ./doc/user/svn_for_cvs_users.txt Mon Sep 17 17:55:45 2001
@@ -29,7 +29,7 @@
 * Directory versioning
 
     - tree structures are versioned; no more RCS backend.
- - svn add/unadd, rm/undel works on dirs
+ - svn add, remove works on dirs
     - working revnums on dirs *only* increment on updates, else we're lying
     - dirprops only committable on up-to-date dirs
 
Index: ./doc/user/manual/adds.texi
===================================================================
--- ./doc/user/manual/SVN/text-base/adds.texi Mon Sep 10 09:49:56 2001
+++ ./doc/user/manual/adds.texi Mon Sep 17 17:54:34 2001
@@ -46,7 +46,7 @@
 (Note that unlike CVS, adding a directory does @emph{not} effect an
 immediate change in the repository!)
 
-@item To undo additions before committing: @samp{svn unadd [items]}
+@item To undo additions before committing: @samp{svn remove [items]}
 
 Because added items have not yet been committed to the repository, it's
 easy to make your working copy "forget" that you wanted to add something.
@@ -187,7 +187,7 @@
 @end example
 
 At this point, the replaced item acts like any other kind of addition.
-You can undo the replacement by running @samp{svn unadd foo.c} -- and
+You can undo the replacement by running @samp{svn remove foo.c} -- and
 the file's status code will revert back to @code{D}. If the replaced
 item is a directory, you can schedule items within it for addition as
 well.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Received on Sat Oct 21 14:36:41 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.