darcs

Patch 243 Fix spurious backslashes in URIs on win32.

Title Fix spurious backslashes in URIs on win32.
Superseder Nosy List kowey, mornfall
Related Issues
Status accepted Assigned To
Milestone

Created on 2010-05-10.16:15:59 by mornfall, last changed 2011-05-10.19:05:55 by darcswatch. Tracked on DarcsWatch.

Files
File name Status Uploaded Type Edit Remove
fix-spurious-backslashes-in-uris-on-win32_.dpatch mornfall, 2010-05-10.16:15:58 text/x-darcs-patch
unnamed mornfall, 2010-05-10.16:15:58
See mailing list archives for discussion on individual patches.
Messages
msg11034 (view) Author: mornfall Date: 2010-05-10.16:15:58
Broke with my newset merge. Caught by the buildbot.

Yours,
    Petr.

1 patch for repository http://darcs.net:

Mon May 10 18:13:47 CEST 2010  Petr Rockai <me@mornfall.net>
  * Fix spurious backslashes in URIs on win32.
Attachments
msg11035 (view) Author: kowey Date: 2010-05-10.16:22:27
Fix spurious backslashes in URIs on win32.
------------------------------------------
> Petr Rockai <me@mornfall.net>**20100510161347
>  Ignore-this: 5232a642bba8fa0250c3eb9e46310130
> ] hunk ./src/Darcs/Repository/HashedRepo.hs 331
>  
>  read_inventory_private :: Cache -> String -> String -> IO (Maybe String, [(PatchInfo, String)])
>  read_inventory_private _ d iname = do
> -    i <- skip_pristine `fmap` fetchFilePS (d </> iname) Uncachable
> +    i <- skip_pristine `fmap` fetchFilePS (d ++ "/" ++ iname) Uncachable -- /, this is URL
>      (rest,str) <- case BC.break ((==)'\n') i of
>                    (swt,pistr) | swt == BC.pack "Starting with inventory:" ->
>                      case BC.break ((==)'\n') $ B.tail pistr of

This should go in, but this reminds me, don't we have a policy of using
System.FilePath.Posix specifically to avoid any risk of funny business?

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9
msg11036 (view) Author: mornfall Date: 2010-05-10.16:44:32
Eric Kow <kowey@darcs.net> writes:
> This should go in, but this reminds me, don't we have a policy of using
> System.FilePath.Posix specifically to avoid any risk of funny business?
I have no idea. It may be nice to get \ on windows in paths to avoid
confusion, but probably not worth the bugs. So if you think, supersede
the patch with an import fix.

A hlint policyfile update would be good, too, if we really do have that
policy (System.FilePath.(</>) is forbidden, use
System.FilePath.Posix.(</>)).

Yours,
   Petr.
msg11047 (view) Author: darcswatch Date: 2010-05-11.18:26:03
This patch bundle (with 1 patches) was just applied to the repository http://darcs.net/.
This message was brought to you by DarcsWatch
http://darcswatch.nomeata.de/repo_http:__darcs.net_.html#bundle-5c45d752cb083e78cb4f097b3259f02f66f42c7d
msg14143 (view) Author: darcswatch Date: 2011-05-10.19:05:55
This patch bundle (with 1 patches) was just applied to the repository http://darcs.net/reviewed.
This message was brought to you by DarcsWatch
http://darcswatch.nomeata.de/repo_http:__darcs.net_reviewed.html#bundle-5c45d752cb083e78cb4f097b3259f02f66f42c7d
History
Date User Action Args
2010-05-10 16:15:59mornfallcreate
2010-05-10 16:17:49darcswatchsetdarcswatchurl: http://darcswatch.nomeata.de/repo_http:__darcs.net_.html#bundle-5c45d752cb083e78cb4f097b3259f02f66f42c7d
2010-05-10 16:22:28koweysetnosy: + kowey
messages: + msg11035
2010-05-10 16:44:32mornfallsetmessages: + msg11036
2010-05-11 18:26:03darcswatchsetstatus: needs-review -> accepted
messages: + msg11047
2011-05-10 19:05:55darcswatchsetmessages: + msg14143