Sun Feb 6 00:54:09 EET 2011 Sergei Trofimovich * export: export emails-only author names in nicer format We have repos of usernames with emails only: Patch makes such emails a little bit nicer: -committer hello@freenet.de 1185806597 +0000 +committer hello 1185806597 +0000 diff -rN -u old-darcs-fastconvert/Export.hs new-darcs-fastconvert/Export.hs --- old-darcs-fastconvert/Export.hs 2011-02-06 12:04:40.205243148 +0200 +++ new-darcs-fastconvert/Export.hs 2011-02-06 12:04:40.206243148 +0200 @@ -50,10 +50,14 @@ patchName = piName . info patchDate = formatDateTime "%s +0000" . fromClockTime . toClockTime . piDate . info -patchAuthor p = case span (/='<') $ piAuthor (info p) of - (n, "") -> n ++ " " +patchAuthor p = case span (/='<') author of + (n, "") -> case span (/='@') $ author of + -- john@home -> john + (n, "") -> n ++ " " + (name, _) -> name ++ " <" ++ author ++ ">" (n, rest) -> case span (/='>') $ tail rest of (email, _) -> n ++ "<" ++ email ++ ">" + where author = piAuthor (info p) patchMessage p = BL.concat [ BLU.fromString (piName $ info p) , case (unlines . piLog $ info p) of