Fri Sep  8 10:09:47 PDT 2006  Jason Dagit <[EMAIL PROTECTED]>
  * whatsnew --look-for-adds doesn't read unadded files (fix for issue79)
  Changes darcs whatsnew --look-for-adds to by default stop computing the patch
  for a while when it realizes the file is not managed by darcs.  This matches
  the default of summary mode.  Changes were required in the commands:
    amend-record, apply, diff, pull, record, resolve.
  A change was needed for each because they use get_unrecorded which was 
modified
  so that it would pass on the necessary information to smart_diff so that it
  would know when to skip reading file contents.
New patches:

[whatsnew --look-for-adds doesn't read unadded files (fix for issue79)
Jason Dagit <[EMAIL PROTECTED]>**20060908170947
 Changes darcs whatsnew --look-for-adds to by default stop computing the patch
 for a while when it realizes the file is not managed by darcs.  This matches
 the default of summary mode.  Changes were required in the commands:
   amend-record, apply, diff, pull, record, resolve.
 A change was needed for each because they use get_unrecorded which was modified
 so that it would pass on the necessary information to smart_diff so that it
 would know when to skip reading file contents.
] {
hunk ./AmendRecord.lhs 44
-import DarcsArguments ( DarcsFlag ( NoTest, All, AnyOrder ),
+import DarcsArguments ( DarcsFlag ( NoTest, All, AnyOrder, NoSummary ),
hunk ./AmendRecord.lhs 49
-                        verbose, notest, list_registered_files,
+                        verbose, notest, list_registered_files
hunk ./AmendRecord.lhs 114
-                   then get_unrecorded repository (AnyOrder:opts)
-                   else get_unrecorded repository opts
+                   then get_unrecorded repository (NoSummary:AnyOrder:opts)
+                   else get_unrecorded repository (NoSummary:opts)
hunk ./Apply.lhs 32
-                                   AllowConflicts, Verbose, HappyForwarding
+                                   AllowConflicts, Verbose, HappyForwarding,
+                                   NoSummary
hunk ./Apply.lhs 170
-            Just c -> do pend <- get_unrecorded repository (AnyOrder:opts)
+            Just c -> do pend <- get_unrecorded repository (NoSummary:AnyOrder:opts)
hunk ./Apply.lhs 183
-    mp <- get_unrecorded repository (AnyOrder:opts)
+    mp <- get_unrecorded repository (NoSummary:AnyOrder:opts)
hunk ./Diff.lhs 45
-import DarcsFlags ( DarcsFlag(IgnoreTimes,LookForAdds) )
+import DarcsFlags ( DarcsFlag(IgnoreTimes,LookForAdds,Summary,NoSummary) )
hunk ./Diff.lhs 59
-    = case gendiff (ignore_times, look_for_adds) wt [] s1 s2 [] of
+    = case gendiff (ignore_times, look_for_adds, summary) wt [] s1 s2 [] of
hunk ./Diff.lhs 64
+        summary = Summary `elem` opts && NoSummary `notElem` opts
hunk ./Diff.lhs 69
-gendiff :: (Bool,Bool)
+gendiff :: (Bool,Bool,Bool)
hunk ./Diff.lhs 72
-gendiff opts@(isparanoid,_) wt fps s1 s2
+gendiff opts@(isparanoid,_,_) wt fps s1 s2
hunk ./Diff.lhs 98
-recur_diff :: (Bool,Bool)
+-- recur_diff or recursive diff
+-- First parameter is (IgnoreTimes?, LookforAdds?, Summary?)
+recur_diff :: (Bool,Bool,Bool)
hunk ./Diff.lhs 104
-recur_diff opts@(_,doadd) wt fps (s:ss) (s':ss')
+recur_diff opts@(_,doadd,summary) wt fps (s:ss) (s':ss')
+    -- this is the case if a file has been removed in the working directory
hunk ./Diff.lhs 107
+    -- this next case is when there is a file in the directory that is not
+    -- in the repository (ie, not managed by darcs)
hunk ./Diff.lhs 111
-                               else diff_added wt fps s' . rest
+                               else diff_added summary wt fps s' . rest
+    -- actually compare the files because the names match
hunk ./Diff.lhs 116
-recur_diff opts@(_,True) wt fps [] (s':ss') =
-    diff_added wt fps s' . recur_diff opts wt fps [] ss'
-recur_diff (_,False) _ _ [] _ = id
+recur_diff opts@(_,True,summary) wt fps [] (s':ss') =
+    diff_added summary wt fps s' . recur_diff opts wt fps [] ss'
+recur_diff (_,False,_) _ _ [] _ = id
hunk ./Diff.lhs 121
+-- creates a diff for a file or directory which needs to be added to the
+-- repository
+diff_added :: Bool -> (FilePath -> FileType) -> [FilePath] -> Slurpy
+           -> ([Patch] -> [Patch])
+diff_added summary wt fps s
+    | is_file s = case wt n of
+                  TextFile -> (addfile f:) . (if summary then id else
+                              diff_from_empty id f (get_filecontents s))
+                  BinaryFile -> (addfile f:) . (if summary then id else
+                                (bin_patch f
+                                 nilPS (getbin $ get_filecontents s)))
+    | otherwise {- is_dir s -} =
+        (adddir f:)
+      . foldr (.) id (map (diff_added summary wt (n:fps)) (get_dircontents s))
+    where n = slurp_name s
+          f = mk_filepath (n:fps)
+
hunk ./Diff.lhs 187
-
-diff_added :: (FilePath -> FileType) -> [FilePath] -> Slurpy
-           -> ([Patch] -> [Patch])
-diff_added wt fps s
-    | is_file s = case wt n of
-                  TextFile -> (addfile f:)
-                            . diff_from_empty id f (get_filecontents s)
-                  BinaryFile -> (addfile f:)
-                              . (bin_patch f
-                                 nilPS (getbin $ get_filecontents s))
-    | otherwise {- is_dir s -} =
-        (adddir f:)
-      . foldr (.) id (map (diff_added wt (n:fps)) (get_dircontents s))
-    where n = slurp_name s
-          f = mk_filepath (n:fps)
hunk ./Pull.lhs 28
-                                   Intersection ),
+                                   Intersection, NoSummary ),
hunk ./Pull.lhs 160
-          (Just c, True) -> do pend <- get_unrecorded repository (AnyOrder:opts)
+          (Just c, True) -> do pend <- get_unrecorded repository (NoSummary:AnyOrder:opts)
hunk ./Pull.lhs 172
-      mp <- get_unrecorded repository (AnyOrder:opts)
+      mp <- get_unrecorded repository (NoSummary:AnyOrder:opts)
hunk ./Record.lhs 132
-               get_unrecorded repository (AnyOrder:opts)
-               else get_unrecorded repository opts
+               get_unrecorded repository (NoSummary:AnyOrder:opts)
+               else get_unrecorded repository (NoSummary:opts)
hunk ./Resolve.lhs 24
-import DarcsArguments ( DarcsFlag( AnyOrder ),
+import DarcsArguments ( DarcsFlag( AnyOrder, NoSummary ),
hunk ./Resolve.lhs 71
-  pend <- get_unrecorded repository (AnyOrder:opts)
+  pend <- get_unrecorded repository (NoSummary:AnyOrder:opts)
hunk ./WhatsNew.lhs 103
+    -- add Summary to the opts since 'darcs whatsnew --look-for-adds'
+    -- implies summary
hunk ./WhatsNew.lhs 106
-                         filter (/= LookForAdds) opts
+                         filter (/= LookForAdds) (Summary:opts)
hunk ./WhatsNew.lhs 120
-                               smart_diff [LookForAdds] ftf so sn
+                               smart_diff [LookForAdds,Summary] ftf so sn
}

Context:

[overhaul the darcs.net front page.
Mark Stosberg <[EMAIL PROTECTED]>**20060820191415
 
 The themes to this change are:
 
 - Focus on the key benefits of darcs:
     Distributed. Interactive. Smart.
 
 - Recognize that the wiki is the central resource,
    and remove some information that is duplicated here
    and reference the wik instead. 
 
 I can post a demo of this HTML for easy comparison if you'd like.
 
     Mark
] 
[Reimplement --disable-ssh-cm flag (issue239).
Eric Kow <[EMAIL PROTECTED]>**20060812134856
 
 My patch to "Only launch SSH control master on demand" accidentally
 removed the ability to disable use of SSH ControlMaster.  Also, the
 way it was implemented is not compatible with launching on demand.
 This implementation relies on a notion of global variables using
 unsafe IORefs.
 
] 
[Compile Global.lhs in place of AtExit.lhs.
Eric Kow <[EMAIL PROTECTED]>**20060812121943] 
[Rename AtExit module to Global.
Eric Kow <[EMAIL PROTECTED]>**20060812121925
 
 The goal is to capture some broad "global" notions like exit handlers
 and global variables.  Note the GPL header thrown in for good measure.
 
] 
[Raise exception if unable to open logfile (issue142).
Zachary P. Landau <[EMAIL PROTECTED]>**20060810034035] 
[Make the pull 'permission test' work when run as root
Jon Olsson <[EMAIL PROTECTED]>**20060831193834] 
[TAG darcs-unstable-20060831
Juliusz Chroboczek <[EMAIL PROTECTED]>**20060831191554] 
Patch bundle hash:
57cff0b67bd808c08af8f59464c7073855d909f6
_______________________________________________
darcs-devel mailing list
darcs-devel@darcs.net
http://www.abridgegame.org/cgi-bin/mailman/listinfo/darcs-devel

Reply via email to