Alexey Levan <[email protected]> added the comment:

(just realized that mail wasn't sent to BTS, sorry for duplicate)

>> +serveCmd :: [DarcsFlag] -> [String] -> IO ()
>> +serveCmd opts _ = do
>> +  setProgressMode False
>> +  withRepoIO opts "." $ \rio -> do
>> +    c <- try getLine
>> +    case c of
>> +      Left (e :: IOException) -> print404 $ show e
>> +      Right x -> print404 $ "darcs serve error: Unknown command " ++ x
>> +
>> +print404 :: String -> IO ()
>> +print404 x = putStr $ unlines
>> +  [ "Status: 404 Not Found"
>> +  , "Content-Type: text/plain"
>> +  , ""
>> +  , x
>> +  ]
>
> What I don't understand is what is this "darcs serve" supposed to be
> doing. Whatever that is and however I look at this code, all I can see
> is "error out with 404 no matter what".
>
> How is this ever going to work?

It's stub for smart server, and is meant to be extended to support
vsrious commands. Currently the only command send to server is "ping",
and I should have added a line to support it.  However, that wouldn't
make a difference as for everyting else smart server should fall back
to old repository interface.

__________________________________
Darcs bug tracker <[email protected]>
<http://bugs.darcs.net/patch350>
__________________________________
_______________________________________________
darcs-users mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-users

Reply via email to