Author: brane
Date: Sat Jan 26 23:54:48 2013
New Revision: 1438997

URL: http://svn.apache.org/viewvc?rev=1438997&view=rev
Log:
Fix issue #4280: Prompt the controlling terminal, rather than stdin.

* subversion/libsvn_subr/prompt.c:
   Include apr_portable.h and optionally either conio.h or termios.h.
 (terminal_handle_t): New struct, open terminal descriptor.
 (terminal_cleanup_handler, terminal_plain_cleanup, terminal_cleanup_handler):
  New; pool cleanup handlers for closing an open terminal.
 (terminal_close): New; explicitly closes a terminal.
 (terminal_open): New; opens and initializes a terminal.
 (terminal_puts, terminal_getc): New; terminal I/O uses direct console
  I/O on Windows and/or /dev/tty where available, with fallback to
  stdin for input and stderr for prompt/output.
 (prompt): Use the new terminal functions to implement platform-
  -independent prompting and user input.
 (maybe_print_realm, plaintext_prompt_helper):
  Use terminal I/O to display prompts.
  (wait_for_input): Removed; equivalent functionality moved to
   terminal_open and terminal_close.

* configure.ac: Check for TERMIOS support.
* subversion/tests/cmdline/update_tests.py
  (eof_in_interactive_conflict_resolver): Skip unconditionally.
   Because terminal I/O now usually avoids redirection, and this test
   depends on --force-interactive, it would hang the test suite.

Modified:
    subversion/trunk/subversion/tests/cmdline/update_tests.py

Modified: subversion/trunk/subversion/tests/cmdline/update_tests.py
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/update_tests.py?rev=1438997&r1=1438996&r2=1438997&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/update_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/update_tests.py Sat Jan 26 
23:54:48 2013
@@ -3943,6 +3943,11 @@ def update_accept_conflicts(sbox):
 # WC update editor flush and run incomplete logs and lead to WC
 # corruption, detectable by another update command.
 
+# FIXME: With issue #4280 fixed and this test using --force-interactive,
+#        the test driver can no longer redirect terminal input to cause
+#        an EOF. Consequently, skip this test so that it does not hang
+#        the test suite.
+@Skip()
 def eof_in_interactive_conflict_resolver(sbox):
   "eof in interactive resolution can't break wc"
 
@@ -3995,11 +4000,11 @@ interactive-conflicts = true
   # Modify iota differently and try to update *with the interactive
   # resolver*.  ### The parser won't go so well with the output
   svntest.main.file_append(iota_path, "Local mods to r1 text.\n")
-  svntest.actions.run_and_verify_update(wc_dir, None, None, None,
-                                        "Can't read stdin: End of file found",
-                                        None, None, None, None, 1,
-                                        wc_dir, '--force-interactive',
-                                        '--config-dir', config_dir)
+  svntest.actions.run_and_verify_update(
+    wc_dir, None, None, None,
+    "End of file while reading from terminal",
+    None, None, None, None, 1,
+    wc_dir, '--force-interactive', '--config-dir', config_dir)
 
   # Now update -r1 again.  Hopefully we don't get a checksum error!
   expected_output = svntest.wc.State(wc_dir, {


Reply via email to