Part 2 of my patch resubmission.
Note that this modified from my last "Do not redirect" patch. It
incorporates changes from read sftp batch file in from stdin (part of
issue237).
Note that this semantically depends on part 1 of this resubmission. It
is probably ok to apply the other patch without this one. It is not a
good idea to apply this one without the other. I am sending it this way
mostly because I am tired/confused and fear I have done something
stupid.
Whilst testing, I noticed that although this works fine with OpenSSH,
it does not work with putty (on my Mac -- yes, putty is available for
Unix). Then again, putty-on-unix does not seem to work with darcs 1.0.8
either. In both cases, the symptom is that darcs tells us it could not
fetch a file. Now with this patch, in addition to it not working, you
also get repeated password prompts, but just the prompts, not the
ability to type them in.
Putty seems to be working just fine on Windows under 1.0.8 -- at least
nobody seems to be complaining about stuff other than the spurious
cm-related messages. If Putty continues to work fine under Windows with
this patch, I'll guess it's a keeper, because, seriously, who actually
uses putty under unix? (famous-last-words moment?).
Could a Windows user give this a try? Please do a get, pull and push.
Note: to isolate the problem, please make sure the server you connect
to is one that your putty already knows about. There is a different
issue re: first-time connections that this patch does not aim to
address.
--------
Sun Sep 3 23:48:31 CEST 2006 Eric Kow <[EMAIL PROTECTED]>
* Do not redirect to or from /dev/null when calling ssh.
Redirection of stdin and stdout breaks putty, which uses these to
interact with the user. Quiet mode, and redirecting stderr are good
enough for making ssh silent.
New patches:
[Do not redirect to or from /dev/null when calling ssh.
Eric Kow <[EMAIL PROTECTED]>**20060903214831
Redirection of stdin and stdout breaks putty, which uses these to
interact with the user. Quiet mode, and redirecting stderr are good
enough for making ssh silent.
]
<
> {
hunk ./External.hs 51
import Autoconf ( have_libcurl, have_sendmail, have_mapi, sendmail_path, darcs_version )
import Curl ( copyUrl )
import Curl ( Cachable(..) )
-import Exec ( exec )
+import Exec ( exec, exec_ )
import DarcsURL ( is_file, is_url, is_ssh )
import DarcsUtils ( catchall )
import Printer ( Doc, hPutDoc, hPutDocLn, ($$), (<+>), renderPS,
hunk ./External.hs 167
copySSH :: String -> FilePath -> IO ()
copySSH uRaw f = let u = escape_dollar uRaw in do
- r <- runSSH SCP u [] [u,f] "/dev/null" "/dev/null"
+ r <- runSSH SCP u [] [u,f] Nothing Nothing
when (r /= ExitSuccess) $
fail $ "(scp) failed to fetch: " ++ u
where {- '$' in filenames is troublesome for scp, for some reason.. -}
hunk ./External.hs 258
withTemp $ \sftpoutput ->
do hPutStr th input
hClose th
- r <- runSSH SFTP u [] [host] tn sftpoutput
+ r <- runSSH SFTP u [] [host] (Just tn) (Just sftpoutput)
let files = if length ns > 5
then (take 5 ns) ++ ["and "
++ (show (length ns - 5)) ++ " more"]
hunk ./External.hs 337
-- reading its output. Return its ExitCode
execSSH :: String -> String -> IO ExitCode
execSSH remoteAddr command =
- runSSH SSH remoteAddr [remoteAddr] [command] "/dev/null" "/dev/null"
+ runSSH SSH remoteAddr [remoteAddr] [command] Nothing Nothing
pipeDoc_SSH_IgnoreError :: String -> [String] -> Doc -> IO Doc
pipeDoc_SSH_IgnoreError remoteAddr args input =
hunk ./External.hs 648
show SFTP = "sftp"
runSSH :: SSHCmd -> String -> [String] -> [String]
- -> FilePath -> FilePath -> IO ExitCode
-runSSH cmd remoteAddr preArgs postArgs input output =
+ -> Maybe FilePath -> Maybe FilePath -> IO ExitCode
+runSSH cmd remoteAddr preArgs postArgs minp mout =
do (ssh, args) <- getSSH cmd remoteAddr
hunk ./External.hs 651
- exec ssh (preArgs ++ args ++ postArgs) input output
+ exec_ ssh (preArgs ++ args ++ postArgs) minp mout (Just "/dev/null")
-- | Return the command and arguments needed to run an ssh command
-- along with any extra features like use of the control master.
}
Context:
[overhaul the darcs.net front page.
Mark Stosberg <[EMAIL PROTECTED]>**20060820191415
The themes to this change are:
- Focus on the key benefits of darcs:
Distributed. Interactive. Smart.
- Recognize that the wiki is the central resource,
and remove some information that is duplicated here
and reference the wik instead.
I can post a demo of this HTML for easy comparison if you'd like.
Mark
]
[Reimplement --disable-ssh-cm flag (issue239).
Eric Kow <[EMAIL PROTECTED]>**20060812134856
My patch to "Only launch SSH control master on demand" accidentally
removed the ability to disable use of SSH ControlMaster. Also, the
way it was implemented is not compatible with launching on demand.
This implementation relies on a notion of global variables using
unsafe IORefs.
]
[Compile Global.lhs in place of AtExit.lhs.
Eric Kow <[EMAIL PROTECTED]>**20060812121943]
[Rename AtExit module to Global.
Eric Kow <[EMAIL PROTECTED]>**20060812121925
The goal is to capture some broad "global" notions like exit handlers
and global variables. Note the GPL header thrown in for good measure.
]
[Raise exception if unable to open logfile (issue142).
Zachary P. Landau <[EMAIL PROTECTED]>**20060810034035]
[Make the pull 'permission test' work when run as root
Jon Olsson <[EMAIL PROTECTED]>**20060831193834]
[TAG darcs-unstable-20060831
Juliusz Chroboczek <[EMAIL PROTECTED]>**20060831191554]
Patch bundle hash:
6a766e5d206b621f8f40d0e35610fcc331cf7150
_______________________________________________
darcs-devel mailing list
[email protected]
http://www.abridgegame.org/cgi-bin/mailman/listinfo/darcs-devel