logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

darcs patch: add changelog entry for fix of bug #396. (and 1 more): msg#00244

Subject: darcs patch: add changelog entry for fix of bug #396. (and 1 more)
Hi all,

Here's an amend-recorded variant of my RT #396 patch, which doesn't have a
conflict with darcs-unstable.  Ian and Tomasz should decide between them
whether to accept this one or the previous patch (which conflicted with
some patches in darcs-unstable.

David.

Thu May 19 07:17:50 EDT 2005  David Roundy <droundy@xxxxxxxxxxxxxxx>
  * add changelog entry for fix of bug #396.

Fri May 20 07:23:58 EDT 2005  David Roundy <droundy@xxxxxxxxxxxxxxx>
  * fix bug when recording with a removed file as an argument (RT #396).

New patches:

[add changelog entry for fix of bug #396.
David Roundy <droundy@xxxxxxxxxxxxxxx>**20050519111750] 
<
> {
addfile ./changelog.in/entries/rt396
hunk ./changelog.in/entries/rt396 1
+match: name "#396" && author "droundy"
+> Fixed bug #396: error when specifying a removed file on the command line
+> of darcs record.
}
[fix bug when recording with a removed file as an argument (RT #396).
David Roundy <droundy@xxxxxxxxxxxxxxx>**20050520112358] 
<
> {
hunk ./Record.lhs 48
                apply_to_slurpy, adddeps, eq_patches, null_patch,
              )
 import PatchInfo ( PatchInfo, patchinfo )
+import SlurpDirectory ( Slurpy, slurp_hasfile, slurp_hasdir )
+import FileName ( fp2fn )
 import PatchChoices ( patch_choices_tps, tp_patch,
                       force_first, get_middle_choice, )
 import SelectChanges ( with_selected_changes_to_files, promptChar,
hunk ./Record.lhs 105
                                                working_repo_dir]}
 \end{code}
 \begin{code}
-file_exists :: String -> IO Bool
-file_exists fn = do
-                 file <- doesFileExist (fn)
-                 dir <- doesDirectoryExist (fn)
-                 return (file || dir)
+file_exists :: Slurpy -> String -> IO Bool
+file_exists s fn = do file <- doesFileExist (fn)
+                      dir <- doesDirectoryExist (fn)
+                      return (file || dir ||
+                              slurp_hasfile (fp2fn fn) s ||
+                              slurp_hasdir (fp2fn fn) s)
 
 record_cmd :: [DarcsFlag] -> [String] -> IO ()
 record_cmd opts args =
hunk ./Record.lhs 115
     withRepoLock $ do
-    existing_files <- filterM file_exists $ sort $
+    rec <- if null args then return empty_slurpy
+           else slurp_recorded "."
+    existing_files <- filterM (file_exists rec) $ sort $
                       map (fix_filepath opts) args
hunk ./Record.lhs 119
-    non_existent_files <- filterM (liftM not . file_exists) $ sort $
+    non_existent_files <- filterM (liftM not . file_exists rec) $ sort $
                           map (fix_filepath opts) args  
     when (not $ null existing_files) $
          putStrLn $ "Recording changes in "++unwords (map show 
existing_files)++":\n"
}

Context:

[TAG 1.0.3rc2
Tomasz Zielonka <tomasz.zielonka@xxxxxxxxx>**20050515085617] 
Patch bundle hash:
fee22ece75dd0713538bff287c8e68f807c648fe
_______________________________________________
darcs-devel mailing list
darcs-devel@xxxxxxxxx
http://www.abridgegame.org/cgi-bin/mailman/listinfo/darcs-devel
<Prev in Thread] Current Thread [Next in Thread>