Index: subversion/tests/clients/cmdline/lock_tests.py
===================================================================
--- subversion/tests/clients/cmdline/lock_tests.py	(revision 13856)
+++ subversion/tests/clients/cmdline/lock_tests.py	(working copy)
@@ -528,7 +528,214 @@
                                      '-m', '', parent_dir)
 
 #----------------------------------------------------------------------
+# III.c : Lock a file and check the output of 'svn stat'
+def lock_status(sbox):
+  "verify status of lock in working copy"
+  sbox.build()
+  wc_dir = sbox.wc_dir
 
+  # lock a file as wc_author
+  fname = 'iota'
+  file_path = os.path.join(sbox.wc_dir, fname)
+
+  svntest.main.file_append(file_path, "This is a spreadsheet\n")
+  svntest.main.run_svn(None, 'commit',
+                       '--username', svntest.main.wc_author,
+                       '--password', svntest.main.wc_passwd,
+                       '-m', '', file_path)
+
+  svntest.actions.run_and_verify_svn(None, None, None, 'lock',
+                                     '--username', svntest.main.wc_author,
+                                     '--password', svntest.main.wc_passwd,
+                                     '-m', '', file_path)
+
+  was_cwd = os.getcwd()
+  try:
+    os.chdir(wc_dir)
+
+    svntest.actions.run_and_verify_svn(None, [ "     K iota\n"], None,
+                                       'stat')
+    # modify iota and verify status again
+    svntest.main.file_append(fname, "check stat output after mod")
+    svntest.actions.run_and_verify_svn(None, [ "M    K iota\n"], None,
+                                        'stat')
+  finally:
+    os.chdir(was_cwd)
+
+#----------------------------------------------------------------------
+# III.c : Lock a file and verify the status of locks in the repository, from, 
+# (a) the working copy in which it was locked, (b) another working copy
+def repository_lock_status (sbox):
+  "verify status of locks in repository"
+  sbox.build()
+  wc_dir = sbox.wc_dir
+ 
+  # Make a second copy of the working copy
+  wc_b = sbox.add_wc_path('_b')
+  svntest.actions.duplicate_dir(wc_dir, wc_b)
+ 
+  # lock a file as wc_author
+  fname = 'iota'
+  file_path = os.path.join(sbox.wc_dir, fname)
+  file_path_b = os.path.join(wc_b, fname)
+
+  svntest.main.file_append(file_path, "This is a spreadsheet\n")
+  svntest.main.run_svn(None, 'commit',
+                       '--username', svntest.main.wc_author,
+                       '--password', svntest.main.wc_passwd,
+                       '-m', '', file_path)
+  svntest.actions.run_and_verify_svn(None, None, None, 'lock',
+                                     '--username', svntest.main.wc_author,
+                                     '--password', svntest.main.wc_passwd,
+                                     '-m', '', file_path)
+  was_cwd = os.getcwd()
+
+  try:
+    os.chdir(wc_dir)
+    svntest.actions.run_and_verify_svn(None, 
+                                      [ "     K          2   iota\n",
+                                        "Status against revision:      2\n"], 
+                                       None,
+                                       'stat', '-u')
+
+  finally:
+    os.chdir(was_cwd)
+
+  # Check status from other working copy
+  svntest.main.run_svn(None, 'update', wc_b)
+ 
+  try:
+    os.chdir(wc_b)
+
+    svntest.actions.run_and_verify_svn(None,
+                                      [ "     O          2   iota\n",
+                                        "Status against revision:      2\n"],
+                                       None,
+                                       'stat', '-u')
+
+  finally:
+    os.chdir(was_cwd)
+
+#----------------------------------------------------------------------
+# III.c : Steal lock on a file from another working copy with 'svn lock
+# --force', and check the status of lock in the repository from the 
+# working copy in which the file was initially locked.
+def stolen_lock_status (sbox):
+  "verify status of stolen lock"
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  # Make a second copy of the working copy
+  wc_b = sbox.add_wc_path('_b')
+  svntest.actions.duplicate_dir(wc_dir, wc_b)
+
+  # lock a file as wc_author
+  fname = 'iota'
+  file_path = os.path.join(sbox.wc_dir, fname)
+  file_path_b = os.path.join(wc_b, fname)
+
+  svntest.main.file_append(file_path, "This is a spreadsheet\n")
+  svntest.main.run_svn(None, 'commit',
+                       '--username', svntest.main.wc_author,
+                       '--password', svntest.main.wc_passwd,
+                       '-m', '', file_path)
+  svntest.actions.run_and_verify_svn(None, None, None, 'lock',
+                                     '--username', svntest.main.wc_author,
+                                     '--password', svntest.main.wc_passwd,
+                                     '-m', '', file_path)
+
+  # Forcibly lock same file (steal lock) from another working copy
+  svntest.main.run_svn(None, 'update', wc_b)
+
+  was_cwd = os.getcwd()
+  try:
+    os.chdir(wc_b)
+
+    svntest.actions.run_and_verify_svn(None, None, None, 'lock',
+                                     '--username', svntest.main.wc_author,
+                                     '--password', svntest.main.wc_passwd,
+                                     '-m', '', '--force', fname)
+
+  finally:
+    os.chdir(was_cwd)
+
+  # Switch back to the initial working copy and check status
+  try:
+    os.chdir(wc_dir)
+
+    svntest.actions.run_and_verify_svn(None,
+                                      [ "     T          2   iota\n",
+                                        "Status against revision:      2\n"],
+                                       None,
+                                       'stat', '-u')
+  finally:
+    os.chdir(was_cwd)
+
+#----------------------------------------------------------------------
+# III.c : Break lock from another working copy with 'svn unlock --force'
+# and verify the status of the lock in the repository with 'svn stat -u'
+# from the working copy in the file was initially locked
+def broken_lock_status (sbox):
+  "verify status of broken lock"
+  sbox.build()
+  wc_dir = sbox.wc_dir
+
+  # Make a second copy of the working copy
+  wc_b = sbox.add_wc_path('_b')
+  svntest.actions.duplicate_dir(wc_dir, wc_b)
+
+  # lock a file as wc_author
+  fname = 'iota'
+  file_path = os.path.join(sbox.wc_dir, fname)
+  file_path_b = os.path.join(wc_b, fname)
+
+  svntest.main.file_append(file_path, "This is a spreadsheet\n")
+  svntest.main.run_svn(None, 'commit',
+                       '--username', svntest.main.wc_author,
+                       '--password', svntest.main.wc_passwd,
+                       '-m', '', file_path)
+  svntest.actions.run_and_verify_svn(None, None, None, 'lock',
+                                     '--username', svntest.main.wc_author,
+                                     '--password', svntest.main.wc_passwd,
+                                     '-m', '', file_path)
+
+  # Forcibly unlock the same file (break lock) from another working copy
+  svntest.main.run_svn(None, 'update', wc_b)
+
+  was_cwd = os.getcwd()
+  try:
+    os.chdir(wc_b)
+
+    svntest.actions.run_and_verify_svn(None, None, None, 'unlock',
+                                     '--username', svntest.main.wc_author,
+                                     '--password', svntest.main.wc_passwd,
+                                     '--force', fname)
+
+  finally:
+    os.chdir(was_cwd)
+
+  # Switch back to the initial working copy and check status
+  try:
+    os.chdir(wc_dir)
+
+    svntest.actions.run_and_verify_svn(None,
+                                      [ "     B          2   iota\n",
+                                        "Status against revision:      2\n"],
+                                       None,
+                                       'stat', '-u')
+
+    # svn update should indicate the broken lock status as well
+    svntest.actions.run_and_verify_svn(None,
+                                      [ "  B  iota\n",
+                                        "At revision 2.\n"],
+                                      None,
+                                      'update')
+  finally:
+    os.chdir(was_cwd)
+
+#----------------------------------------------------------------------
+
+
 ########################################################################
 # Run the tests
 
@@ -545,6 +752,10 @@
               deleted_path_lock,
               lock_unlock,
               deleted_dir_lock,
+              lock_status,
+              repository_lock_status,
+              stolen_lock_status,
+              broken_lock_status,
              ]
 
 if __name__ == '__main__':


