Index: subversion/libsvn_client/commit.c
===================================================================
--- subversion/libsvn_client/commit.c	(revision 13961)
+++ subversion/libsvn_client/commit.c	(working copy)
@@ -437,6 +437,7 @@
   apr_array_header_t *ignores;
   apr_array_header_t *batons = NULL;
   const char *edit_path = "";
+  svn_boolean_t is_empty_dir;
 
   /* Get a root dir baton.  We pass an invalid revnum to open_root
      to mean "base this on the youngest revision".  Should we have an
@@ -518,8 +519,14 @@
         }
     }
 
-  SVN_ERR (editor->close_edit (edit_baton, pool));
+  if (kind == svn_node_dir)
+    SVN_ERR (svn_io_dir_empty (&is_empty_dir, path, pool));
 
+  if ((kind == svn_node_dir) && (is_empty_dir))
+    SVN_ERR (editor->abort_edit (edit_baton, pool));
+  else 
+    SVN_ERR (editor->close_edit (edit_baton, pool));
+
   return SVN_NO_ERROR;
 }
 
Index: subversion/tests/clients/cmdline/basic_tests.py
===================================================================
--- subversion/tests/clients/cmdline/basic_tests.py	(revision 13961)
+++ subversion/tests/clients/cmdline/basic_tests.py	(working copy)
@@ -1632,7 +1632,35 @@
   else:
     raise svntest.Failure
 
+#----------------------------------------------------------------------
+def basic_import_empty_dir(sbox):
+  "verify that an empty dir cannot be imported"
+  
+  sbox.build()
+  wc_dir = sbox.wc_dir
 
+  # create a new directory 
+  empty_dir = os.path.join(wc_dir, "empty_dir")
+  os.makedirs(empty_dir)
+
+  url = svntest.main.current_repo_url  
+  svntest.actions.run_and_verify_svn(None, None, None, 'import',
+                                     '--username', svntest.main.wc_author,
+                                     '--password', svntest.main.wc_passwd,
+                                     '-m', 'Log message for new import', 
+                                     empty_dir, url)
+
+  svntest.main.safe_rmtree(empty_dir) 
+
+  # Verify that the empty directory has not been imported with
+  # an update.
+  svntest.actions.run_and_verify_svn(None, [ "At revision 1.\n"], 
+                                     None, "update", 
+                                     '--username', svntest.main.wc_author,
+                                     '--password', svntest.main.wc_passwd,
+                                     empty_dir) 
+
+#----------------------------------------------------------------------
 ########################################################################
 # Run the tests
 
@@ -1663,6 +1691,7 @@
               basic_import_ignores,
               uri_syntax,
               basic_checkout_file,
+              basic_import_empty_dir,
               ### todo: more tests needed:
               ### test "svn rm http://some_url"
               ### not sure this file is the right place, though.


