Index: subversion/include/svn_client.h
===================================================================
--- subversion/include/svn_client.h	(revision 14033)
+++ subversion/include/svn_client.h	(working copy)
@@ -423,6 +423,9 @@
   /** @since New in 1.2.
    * notification baton for @c notify_func2. */
   void *notify_baton2;
+
+  /* whether any changes were made to the repository */
+  svn_boolean_t repos_changed;
 } svn_client_ctx_t;
 
 
Index: subversion/libsvn_client/commit.c
===================================================================
--- subversion/libsvn_client/commit.c	(revision 14033)
+++ subversion/libsvn_client/commit.c	(working copy)
@@ -388,6 +388,10 @@
          change your world.  */
     }
 
+  /* remember that the repository was modified*/
+  if (apr_hash_count (dirents))
+    ctx->repos_changed = TRUE;
+
   svn_pool_destroy (subpool);
   return SVN_NO_ERROR;
 }
@@ -471,6 +475,7 @@
                                           NULL, SVN_INVALID_REVNUM,
                                           pool, &root_baton));
         }
+      ctx->repos_changed = TRUE;  
     }
   else if (kind == svn_node_file)
     {
@@ -517,9 +522,11 @@
           SVN_ERR (editor->close_directory (*baton, pool));
         }
     }
+  if (ctx->repos_changed)
+    SVN_ERR (editor->close_edit (edit_baton, pool));
+  else
+    SVN_ERR (editor->abort_edit (edit_baton, pool));
 
-  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 14033)
+++ 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.


