[darcs-devel] darcs patch

Juliusz Chroboczek jch at pps.jussieu.fr
Wed Jun 30 14:14:09 PDT 2004


--aaack


Wed Jun 30 22:39:33 CEST 2004  Juliusz Chroboczek <jch at pps.jussieu.fr>
  * Rename lastrepo to defaultrepo.

Wed Jun 30 23:13:55 CEST 2004  Juliusz Chroboczek <jch at pps.jussieu.fr>
  * Implement --set-default and --no-set-default.


--aaack
Content-Type: text/x-darcs-patch
Content-Description: A darcs patch for your repository!


New patches:

[Rename lastrepo to defaultrepo.
Juliusz Chroboczek <jch at pps.jussieu.fr>**20040630203933] {
hunk ./Get.lhs 42
-import RepoPrefs ( set_lastrepo, write_default_prefs, show_motd )
+import RepoPrefs ( set_defaultrepo, write_default_prefs, show_motd )
hunk ./Get.lhs 118
-  when (inrepodir == repodir) $ set_lastrepo repodir
+  when (inrepodir == repodir) $ set_defaultrepo repodir
hunk ./Pull.lhs 45
-import RepoPrefs ( lastrepo, set_lastrepo, get_preflist, show_motd )
+import RepoPrefs ( defaultrepo, set_defaultrepo, get_preflist, show_motd )
hunk ./Pull.lhs 83
-                     command_argdefaults = lastrepo,
+                     command_argdefaults = defaultrepo,
hunk ./Pull.lhs 100
-  old_lastrepo <- lastrepo []
-  set_lastrepo repodir
-  when (old_lastrepo == [repodir]) $ putStr $ "Pulling from "++repodir++"...\n"
+  old_default <- defaultrepo []
+  set_defaultrepo repodir
+  when (old_default == [repodir]) $ putStr $ "Pulling from "++repodir++"...\n"
hunk ./Push.lhs 35
-import RepoPrefs ( lastrepo, set_lastrepo, get_preflist )
+import RepoPrefs ( defaultrepo, set_defaultrepo, get_preflist )
hunk ./Push.lhs 67
-                     command_argdefaults = lastrepo,
+                     command_argdefaults = defaultrepo,
hunk ./Push.lhs 86
-  old_lastrepo <- lastrepo []
-  set_lastrepo repodir
-  when (old_lastrepo == [repodir]) $
+  old_default <- defaultrepo []
+  set_defaultrepo repodir
+  when (old_default == [repodir]) $
hunk ./RepoPrefs.lhs 20
-                   lastrepo, set_lastrepo,
+                   defaultrepo, set_defaultrepo,
hunk ./RepoPrefs.lhs 196
-lastrepo :: [String] -> IO [String]
-set_lastrepo :: String -> IO ()
+defaultrepo :: [String] -> IO [String]
+set_defaultrepo :: String -> IO ()
hunk ./RepoPrefs.lhs 254
-lastrepo [] = do last_rep <- get_preflist "lastrepo"
-                 case last_rep of [_] -> return last_rep
-                                  _ -> return []
-lastrepo r = return r
-set_lastrepo r = do set_preflist "lastrepo" [r]
-                    add_to_preflist "repos" r
+defaultrepo [] = do defrepo <- get_preflist "defaultrepo"
+                    case defrepo of [_] -> return defrepo
+                                    _ -> return []
+defaultrepo r = return r
+set_defaultrepo r = do set_preflist "defaultrepo" [r]
+                       add_to_preflist "repos" r
hunk ./Send.lhs 43
-import RepoPrefs ( lastrepo, set_lastrepo, get_preflist )
+import RepoPrefs ( defaultrepo, set_defaultrepo, get_preflist )
hunk ./Send.lhs 81
-                     command_argdefaults = lastrepo,
+                     command_argdefaults = defaultrepo,
hunk ./Send.lhs 99
-        old_lastrepo <- lastrepo []
-        set_lastrepo repodir
-        when (old_lastrepo == [repodir] && not (Quiet `elem` input_opts)) $
+        old_default <- defaultrepo []
+        set_defaultrepo repodir
+        when (old_default == [repodir] && not (Quiet `elem` input_opts)) $
}

[Implement --set-default and --no-set-default.
Juliusz Chroboczek <jch at pps.jussieu.fr>**20040630211355] {
hunk ./DarcsArguments.lhs 51
+                        set_default, no_set_default,
hunk ./DarcsArguments.lhs 181
-  logfile, leave_test_dir, from_opt
+  logfile, leave_test_dir, from_opt, set_default, no_set_default
hunk ./DarcsArguments.lhs 520
+set_default = DarcsNoArgOption [] ["set-default"] SetDefault
+              "set default repository [DEFAULT]"
+no_set_default = DarcsNoArgOption [] ["no-set-default"] NoSetDefault
+                 "don't set default repository"
hunk ./DarcsFlags.lhs 57
-               | DryRun
+               | DryRun | SetDefault | NoSetDefault
hunk ./Get.lhs 31
-                        match_one_context,
+                        match_one_context, set_default, no_set_default
hunk ./Get.lhs 90
-                                            any_verbosity]}
+                                            any_verbosity,
+                                            set_default, no_set_default]}
hunk ./Get.lhs 119
-  when (inrepodir == repodir) $ set_defaultrepo repodir
+  when (inrepodir == repodir) $ set_defaultrepo repodir opts
hunk ./Pull.lhs 33
+                        set_default, no_set_default
hunk ./Pull.lhs 90
-                                             ignoretimes,no_deps]}
+                                             ignoretimes,no_deps,
+                                             set_default, no_set_default]}
hunk ./Pull.lhs 103
-  set_defaultrepo repodir
+  set_defaultrepo repodir opts
hunk ./Push.lhs 30
-                        any_verbosity,
+                        any_verbosity, set_default, no_set_default
hunk ./Push.lhs 72
-                                             working_repo_dir]}
+                                             working_repo_dir,
+                                             set_default, no_set_default]}
hunk ./Push.lhs 88
-  set_defaultrepo repodir
+  set_defaultrepo repodir opts
hunk ./RepoPrefs.lhs 31
-import Monad ( liftM, unless )
+import Monad ( liftM, unless, when )
hunk ./RepoPrefs.lhs 37
-import DarcsFlags ( DarcsFlag( Quiet ) )
+import DarcsFlags ( DarcsFlag( Quiet, SetDefault, NoSetDefault ) )
hunk ./RepoPrefs.lhs 197
-set_defaultrepo :: String -> IO ()
+set_defaultrepo :: String -> [DarcsFlag] -> IO ()
hunk ./RepoPrefs.lhs 258
-set_defaultrepo r = do set_preflist "defaultrepo" [r]
-                       add_to_preflist "repos" r
+set_defaultrepo r opts = do doit <- if (set opts) then (return True)
+                                    else do olddef <- 
+                                                get_preflist "defaultrepo"
+                                            return (olddef == [])
+                            when doit
+                                (set_preflist "defaultrepo" [r])
+                            add_to_preflist "repos" r
+    where set [] = True                 -- should be False -- jch
+          set (SetDefault:_) = True 
+          set (NoSetDefault:_) = False
+          set (_:l) = set l
hunk ./Send.lhs 100
-        set_defaultrepo repodir
+        set_defaultrepo repodir input_opts
}



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:
3c608feff7e187f63e73eefef67e3d4d905cadf2

--aaack

--aaack--





More information about the darcs-devel mailing list