[darcs-devel] darcs patch
Juliusz Chroboczek
jch at pps.jussieu.fr
Wed Jun 30 12:20:28 PDT 2004
--aaack
Wed Jun 30 21:19:50 CEST 2004 Juliusz Chroboczek <jch at pps.jussieu.fr>
* Use a new datatype instead of Bool for cachability.
--aaack
Content-Type: text/x-darcs-patch
Content-Description: A darcs patch for your repository!
New patches:
[Use a new datatype instead of Bool for cachability.
Juliusz Chroboczek <jch at pps.jussieu.fr>**20040630191950] {
hunk ./Curl.hs 1
-module Curl ( readUrlPS, copyUrl ) where
+module Curl ( readUrlPS, copyUrl, Cachable(Cachable, Uncachable) ) where
hunk ./Curl.hs 12
-readUrlPS :: String -> Bool -> IO PackedString
-readUrlPS u nocache = withTemp $ \tf -> do copyUrl u tf nocache
- readFilePS tf
+data Cachable = Cachable | Uncachable
hunk ./Curl.hs 14
-copyUrl :: String -> String -> Bool -> IO ()
+readUrlPS :: String -> Cachable -> IO PackedString
+readUrlPS u cache = withTemp $ \tf -> do copyUrl u tf cache
+ readFilePS tf
+
+copyUrl :: String -> String -> Cachable -> IO ()
hunk ./Curl.hs 20
-copyUrl u f nocache =
+copyUrl u f cache =
hunk ./Curl.hs 23
- err <- get_curl fstr ustr (if nocache then 1 else 0)
+ err <- get_curl fstr ustr (cachableToInt cache)
hunk ./Curl.hs 37
+cachableToInt :: Cachable -> Int
+cachableToInt Cachable = 0
+cachableToInt Uncachable = 1
+
hunk ./External.hs 10
+ Cachable( Cachable, Uncachable )
hunk ./External.hs 36
+import Curl ( Cachable(..) )
hunk ./External.hs 42
-fetchFilePS :: String -> Bool -> IO PackedString
+fetchFilePS :: String -> Cachable -> IO PackedString
hunk ./External.hs 44
-fetchFilePS fou nocache = readRemotePS fou nocache
+fetchFilePS fou cache = readRemotePS fou cache
hunk ./External.hs 46
-gzFetchFilePS :: String -> Bool -> IO PackedString
-gzFetchFilePS fou nocache = withTemp $ \t-> do copyFileOrUrl fou t nocache
- gzReadFilePS t
+gzFetchFilePS :: String -> Cachable -> IO PackedString
+gzFetchFilePS fou cache = withTemp $ \t-> do copyFileOrUrl fou t cache
+ gzReadFilePS t
hunk ./External.hs 50
-copyRemote :: String -> FilePath -> Bool -> IO ()
-copyRemote u v nocache | is_url u = if have_libcurl
- then Curl.copyUrl u v nocache
- else copyRemoteCmd u v
+copyRemote :: String -> FilePath -> Cachable -> IO ()
+copyRemote u v cache | is_url u = if have_libcurl
+ then Curl.copyUrl u v cache
+ else copyRemoteCmd u v
hunk ./External.hs 91
-readRemotePS :: String -> Bool -> IO PackedString
-readRemotePS s nocache | is_url s =
- if have_libcurl then readUrlPS s nocache
+readRemotePS :: String -> Cachable -> IO PackedString
+readRemotePS s cache | is_url s =
+ if have_libcurl then readUrlPS s cache
hunk ./External.hs 133
-copyFileOrUrl :: FilePath -> FilePath -> Bool -> IO ()
+copyFileOrUrl :: FilePath -> FilePath -> Cachable -> IO ()
hunk ./External.hs 137
-copyFileOrUrl fou out nocache = copyRemote fou out nocache
+copyFileOrUrl fou out cache = copyRemote fou out cache
hunk ./Get.lhs 40
-import External ( copyFileOrUrl )
+import External ( copyFileOrUrl, Cachable(..) )
hunk ./Get.lhs 128
- (repodir++"/_darcs/prefs/prefs") "_darcs/prefs/prefs" True
+ (repodir++"/_darcs/prefs/prefs") "_darcs/prefs/prefs" Uncachable
hunk ./RepoPrefs.lhs 38
-import External ( fetchFilePS )
+import External ( fetchFilePS, Cachable(..) )
hunk ./RepoPrefs.lhs 270
- motd <- (unpackPS `liftM` fetchFilePS (repo++"/_darcs/prefs/motd") True)
+ motd <- (unpackPS `liftM`
+ fetchFilePS (repo++"/_darcs/prefs/motd") Uncachable)
hunk ./Repository.lhs 92
-import External ( gzFetchFilePS, fetchFilePS, copyFileOrUrl )
+import External ( gzFetchFilePS, fetchFilePS, copyFileOrUrl, Cachable(..) )
hunk ./Repository.lhs 341
- (out++"/_darcs/patches/"++pn) False)
+ (out++"/_darcs/patches/"++pn) Cachable)
hunk ./Repository.lhs 369
- i <- fetchFilePS (d++"/_darcs/"++iname) True
+ i <- fetchFilePS (d++"/_darcs/"++iname) Uncachable
hunk ./Repository.lhs 385
- s <- gzFetchFilePS pn False
+ s <- gzFetchFilePS pn Cachable
hunk ./Repository.lhs 401
- (dir++"/_darcs/patches/"++make_filename i) False
+ (dir++"/_darcs/patches/"++make_filename i) Cachable
hunk ./Repository.lhs 437
- pistr <- fetchFilePS (realdir++"/_darcs/checkpoints/inventory") True
+ pistr <- fetchFilePS (realdir++"/_darcs/checkpoints/inventory") Uncachable
hunk ./Repository.lhs 445
- (r++"/_darcs/checkpoints/"++make_filename pinfo) False
+ (r++"/_darcs/checkpoints/"++make_filename pinfo) Cachable
hunk ./Repository.lhs 462
- pistr <- fetchFilePS (r++"/_darcs/checkpoints/inventory") True
+ pistr <- fetchFilePS (r++"/_darcs/checkpoints/inventory") Uncachable
hunk ./Repository.lhs 468
- (r++"/_darcs/checkpoints/"++make_filename pinfo) False
+ (r++"/_darcs/checkpoints/"++make_filename pinfo) Cachable
hunk ./Send.lhs 44
-import External ( signString, sendEmail, fetchFilePS )
+import External ( signString, sendEmail, fetchFilePS, Cachable(..) )
hunk ./Send.lhs 214
- True)
+ Uncachable)
}
Context:
[allow --dry-run push where push would fail.
David Roundy <droundy at abridgegame.org>**20040630102058]
[fix compile error when there's no libcurl.
David Roundy <droundy at abridgegame.org>**20040630101253]
[fix MOTD conflict with cached files change.
David Roundy <droundy at abridgegame.org>**20040630090529]
[Add cache control directives to HTTP requests.
Juliusz Chroboczek <jch at pps.jussieu.fr>**20040629125723
Mark requests for inventories as uncachable, requests for patches as
cachable.
This is only implemented for libcurl. When spawning curl or wget, all
requests are marked uncachable (untested).
]
[make revert work properly when file is given on command line and there are pending adds/removes.
David Roundy <droundy at abridgegame.org>**20040630100836]
[make changes --context give less extraneous information.
David Roundy <droundy at abridgegame.org>**20040629104642]
[fix weird error with --last.
David Roundy <droundy at abridgegame.org>**20040629101457]
[fix bug in get --tag.
David Roundy <droundy at abridgegame.org>**20040629100405
I was a good boy and also added a test so this won't happen again... at
least not with this particular command.
]
[add support for a MOTD.
David Roundy <droundy at abridgegame.org>**20040629094631]
[update changelog.
David Roundy <droundy at abridgegame.org>**20040629094401]
[move DarcsFlag data structure into its own module.
David Roundy <droundy at abridgegame.org>**20040629094218
This is to work around circular dependency issues.
]
[point darcsrv product link at darcs homepage
Will <will at glozer.net>**20040628233035]
[match new <move> tag instead of <move_file>
Will <will at glozer.net>**20040628232426]
[Use lock directory for temporary lock file.
Juliusz Chroboczek <jch at pps.jussieu.fr>**20040628190720
This avoids lock creation failing with EXDEV when the repository
directory and _darcs are not on the same filesystem (e.g. _darcs is
softlinked). I hate users.
]
[support --context option in send.
David Roundy <droundy at abridgegame.org>**20040628102624]
[add support for a --last option to specify last N changes.
David Roundy <droundy at abridgegame.org>**20040628095805
This has only been tested so far with diff and changes...
]
[update and reprioritize TODO.
David Roundy <droundy at abridgegame.org>**20040628091216]
[Merge debian/ directory with 0.9.22
Gabriel Ebner <ge at gabrielebner.at>**20040627212437]
[correction on send help.
David Roundy <droundy at abridgegame.org>**20040627093056]
[Add warning to 'darcs remove' help
Jim Marshall <jmarshall99 at qwest.net>**20040626220417]
[Small 'command -h' typo fixes and clarifications.
Jim Marshall <jmarshall99 at qwest.net>**20040626212642]
[fix happy-forwarding to not include nasty long header.
droundy at civet.berkeley.edu**20040627121954
The catch is that all headers are lost now when the mail is resent, so this
may make it harder to track down what went wrong if something does go
wrong.
]
[Minor doc fixes
Nigel Rowe <rho at swiftdsl.com.au>**20040627035455]
[work around stupid bug in old autoconfs.
droundy at civet.berkeley.edu**20040627104351]
[fix up happ-forwarding (hopefully).
David Roundy <droundy at abridgegame.org>**20040627092644]
[increase laziness of diff_from_empty.
David Roundy <droundy at abridgegame.org>**20040626140020
I believe this reduces the memory usage of initial records (or whenever
lots of files are added) and optimize --checkpoint by about a factor of
four, although I haven't yet tested it on a seriously large repository.
]
[TAG 0.9.22
David Roundy <droundy at abridgegame.org>**20040626123533]
Patch bundle hash:
3271318a6ddf2da23f93cbab46f87f2c4c810898
--aaack
--aaack--
More information about the darcs-devel
mailing list