darcs

Patch 246 Resolve issue1841: Apply binary mode to ssh process an...

Title Resolve issue1841: Apply binary mode to ssh process an...
Superseder Nosy List jeremy, kowey, mornfall
Related Issues
Status accepted Assigned To
Milestone

Created on 2010-05-12.19:57:30 by jeremy, last changed 2010-05-28.09:22:56 by kowey.

Files
File name Status Uploaded Type Edit Remove
unnamed jeremy, 2010-05-12.19:57:30 text/html
See mailing list archives for discussion on individual patches.
Messages
msg11058 (view) Author: jeremy Date: 2010-05-12.19:57:30
DarcsURL: http://darcs.net/releases/branch-2.4
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=_"

--=_
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

1 patch for repository http://darcs.net/releases/branch-2.4:

Wed May 12 15:49:35 Eastern Daylight Time 2010  Jeremy Cowgar <jeremy@cowga=
r.com>
  * Resolve issue1841: Apply binary mode to ssh process and patch file hand=
les.

--=_
Content-Type: text/x-darcs-patch; name="resolve-issue1841_-apply-binary-mode-to-ssh-process-and-patch-file-handles_.dpatch"
Content-Transfer-Encoding: quoted-printable
Content-Description: A darcs patch for your repository!


New patches:

[Resolve issue1841: Apply binary mode to ssh process and patch file handles=
.
Jeremy Cowgar <jeremy@cowgar.com>**20100512194935
 Ignore-this: 8da8ddae9e95ba474c43b9d99430efd3
] hunk ./src/Darcs/External.hs 25
 import Control.Monad ( when, zipWithM_, filterM, liftM2 )
 import System.Exit ( ExitCode(..) )
 import System.Environment ( getEnv, getProgName )
-import System.IO ( hPutStr, hPutStrLn, hClose,
+import System.IO ( hSetBinaryMode, hPutStr, hPutStrLn, hClose,
                    openBinaryFile, IOMode( ReadMode ),
                    openBinaryTempFile,
                    hIsTerminalDevice, stdout, stderr, Handle )
hunk ./src/Darcs/External.hs 319
 pipeDoc c args inp =3D withoutNonBlock $ withoutProgress $
     do debugMessage $ unwords (c:args)
        (i,o,e,pid) <- runInteractiveProcess c args Nothing Nothing
+       hSetBinaryMode i True
+       hSetBinaryMode o True
        mvare <- newEmptyMVar
        forkIO ((Ratified.hGetContents e >>=3D -- ratify: immediately consu=
med
                 hPutStr stderr)
hunk ./src/Ssh.hs 19
 import Data.Bits ( (.&.) )
 import System.Random ( randomIO )
 #endif
-import System.IO ( Handle, hPutStr, hPutStrLn, hGetLine, hClose, hFlush )
+import System.IO ( Handle, hSetBinaryMode, hPutStr, hPutStrLn, hGetLine, h=
Close, hFlush )
 import System.IO.Unsafe ( unsafePerformIO )
 import System.Directory ( doesFileExist, createDirectoryIfMissing )
 import Control.Monad ( when )
hunk ./src/Ssh.hs 61
                                                   "transfer-mode","--repod=
ir",cleanrepodir repoid]
                        debugMessage $ "ssh "++unwords sshargs
                        (i,o,e,_) <- runInteractiveProcess ssh sshargs Noth=
ing Nothing
+                       hSetBinaryMode i True
+                       hSetBinaryMode o True
                        l <- hGetLine o
                        if l =3D=3D "Hello user, I am darcs transfer mode"
                            then return ()

Context:

[TAG 2.4.3
Eric Kow <kowey@darcs.net>**20100509132315
 Ignore-this: 1a920525d0cd01c352d5a2893bbea10d
] =

Patch bundle hash:
4406186e93b31986a8722cef8750d01293412db9

--=_--

.
Attachments
msg11060 (view) Author: mornfall Date: 2010-05-12.20:26:46
I have pushed this on both mainline and branch-2.4.

Thanks,
   Petr.
msg11135 (view) Author: kowey Date: 2010-05-28.09:22:56
This wasn't being tracked by darcswatch for some reason.

something to do with the MIME encoding?
History
Date User Action Args
2010-05-12 19:57:30jeremycreate
2010-05-12 20:26:46mornfallsetnosy: + mornfall
messages: + msg11060
2010-05-28 09:22:56koweysetstatus: needs-review -> accepted
nosy: + kowey
messages: + msg11135