Index: subversion/libsvn_client/commit.c
===================================================================
--- subversion/libsvn_client/commit.c	(revision 14060)
+++ subversion/libsvn_client/commit.c	(working copy)
@@ -46,6 +46,13 @@
 
 #include "svn_private_config.h"
 
+/* Baton to remember if changes were made to the repository */
+typedef struct 
+{
+  /* Whether any changes were made to the repository */
+  svn_boolean_t repos_changed; 
+} repos_change_baton_t;
+
 /* Apply PATH's contents (as a delta against the empty string) to
    FILE_BATON in EDITOR.  Use POOL for any temporary allocation.
    PROPERTIES is the set of node properties set on this file.
@@ -272,6 +279,7 @@
             const char *edit_path,
             svn_boolean_t nonrecursive,
             apr_hash_t *excludes,
+            void *repos_change_baton,
             svn_client_ctx_t *ctx,
             apr_pool_t *pool)
 {
@@ -279,6 +287,7 @@
   apr_hash_t *dirents;
   apr_hash_index_t *hi;
   apr_array_header_t *ignores;
+  repos_change_baton_t *rcb = repos_change_baton;
 
   SVN_ERR (svn_path_check_valid (path, pool));
 
@@ -372,7 +381,7 @@
           /* Recurse. */
           SVN_ERR (import_dir (editor, this_dir_baton, 
                                this_path, this_edit_path, 
-                               FALSE, excludes, ctx, subpool));
+                               FALSE, excludes, rcb, ctx, subpool));
 
           /* Finally, close the sub-directory. */
           SVN_ERR (editor->close_directory (this_dir_baton, subpool));
@@ -387,6 +396,9 @@
          directories.  If we stop doing that, here is the place to
          change your world.  */
     }
+  /* remember that the repository was modified */
+  if (apr_hash_count (dirents))
+    rcb->repos_changed = TRUE;
 
   svn_pool_destroy (subpool);
   return SVN_NO_ERROR;
@@ -437,6 +449,7 @@
   apr_array_header_t *ignores;
   apr_array_header_t *batons = NULL;
   const char *edit_path = "";
+  repos_change_baton_t *rcb = apr_pcalloc (pool, sizeof (*rcb));;
 
   /* 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
@@ -471,6 +484,7 @@
                                           NULL, SVN_INVALID_REVNUM,
                                           pool, &root_baton));
         }
+      rcb->repos_changed = TRUE;
     }
   else if (kind == svn_node_file)
     {
@@ -497,7 +511,7 @@
   else if (kind == svn_node_dir)
     {
       SVN_ERR (import_dir (editor, root_baton, path, edit_path,
-                           nonrecursive, excludes, ctx, pool));
+                           nonrecursive, excludes, rcb, ctx, pool));
 
     }
   else if (kind == svn_node_none)
@@ -518,7 +532,10 @@
         }
     }
 
-  SVN_ERR (editor->close_edit (edit_baton, pool));
+  if (rcb->repos_changed)
+    SVN_ERR (editor->close_edit (edit_baton, pool));
+  else
+    SVN_ERR (editor->abort_edit (edit_baton, pool));
 
   return SVN_NO_ERROR;
 }
Index: subversion/tests/clients/cmdline/basic_tests.py
===================================================================
--- subversion/tests/clients/cmdline/basic_tests.py	(revision 14060)
+++ subversion/tests/clients/cmdline/basic_tests.py	(working copy)
@@ -1632,7 +1632,34 @@
   else:
     raise svntest.Failure
 
+#----------------------------------------------------------------------
+def basic_empty_revision(sbox):
+  "verify that an empty revision cannot be created"
+  
+  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 an empty revision has not been created
+  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 +1690,7 @@
               basic_import_ignores,
               uri_syntax,
               basic_checkout_file,
+              basic_empty_revision,
               ### todo: more tests needed:
               ### test "svn rm http://some_url"
               ### not sure this file is the right place, though.


