Index: subversion/tests/clients/cmdline/revert_tests.py
===================================================================
--- subversion/tests/clients/cmdline/revert_tests.py	(revision 14645)
+++ subversion/tests/clients/cmdline/revert_tests.py	(working copy)
@@ -212,7 +212,48 @@
   expected_status.tweak('file1', status='  ', wc_rev=2)
   svntest.actions.run_and_verify_status(wc_dir, expected_status)
 
-
+#----------------------------------------------------------------------
+# Regression test for issue #876:
+# svn revert on svn move
+ 
+def move_revert(sbox):
+    "reverting a moved file "
+    sbox.build()
+    wc_dir = sbox.wc_dir
+    iota_path = os.path.join(wc_dir, 'iota')
+    iota_path_moved = os.path.join(wc_dir, 'iota_moved')
+    
+    svntest.actions.run_and_verify_svn(None, None, [], 'mv', iota_path,
+                                       iota_path_moved)
+    
+    expected_output = svntest.actions.get_virginal_state(wc_dir, 1)
+    expected_output.tweak('iota',status='D ')
+    expected_output.add({
+    'iota_moved' : Item(status='A ',copied='+',wc_rev='-'),
+    })
+    
+    svntest.actions.run_and_verify_status(wc_dir,expected_output)
+    #now try to revert the file iota
+    svntest.actions.run_and_verify_svn(None, ["Reverted '" + iota_path + "'\n"],
+                                     None, 'revert', iota_path)
+    #see the status of the file iota. But iota_moved still remains
+    expected_output.tweak('iota',status='  ')
+    svntest.actions.run_and_verify_status(wc_dir,expected_output)
+    #this should be the actual behaviour
+    #no trace of iota_moved in the wc
+    #currently possible by reverting iota_moved
+    #and then removing iota_moved
+    svntest.actions.run_and_verify_svn(None, 
+      ["Reverted '" + iota_path_moved + "'\n"],
+                                     None, 'revert', iota_path_moved)
+    os.remove(iota_path_moved)         
+    #after resolving this issue just comment out
+    #the above two lines,and the test would work fine.
+    
+    expected_output.remove('iota_moved')
+    svntest.actions.run_and_verify_status(wc_dir,expected_output)
+    
+    
 ########################################################################
 # Run the tests
 
@@ -222,6 +263,7 @@
               XFail(revert_reexpand_keyword),
               Skip(revert_corrupted_text_base, 1),
               revert_replaced_file_without_props,
+              move_revert,
              ]
 
 if __name__ == '__main__':


