Here we fix the bug in obliterate and unpull that I found yesterday.
David
Sat Jul 15 22:10:03 EDT 2006 David Roundy <droundy@xxxxxxxxx>
* refactor amend-record.
Sun Jul 30 07:14:09 EDT 2006 David Roundy <droundy@xxxxxxxxx>
* fix ordering of operations to call pull_first_middles properly.
Sun Jul 30 06:38:54 EDT 2006 David Roundy <droundy@xxxxxxxxx>
* make amend-record.pl test a bit pickier.
Wed Jul 26 08:17:37 EDT 2006 David Roundy <droundy@xxxxxxxxx>
* simplify code a tad in get.
Sat Jul 15 23:16:05 EDT 2006 David Roundy <droundy@xxxxxxxxx>
* partial refactoring of Get.
Wed Jul 26 08:16:55 EDT 2006 David Roundy <droundy@xxxxxxxxx>
* fix bug in refactoring of get.
Sat Jul 15 23:48:37 EDT 2006 David Roundy <droundy@xxxxxxxxx>
* refactor Population.
Sat Jul 15 22:02:47 EDT 2006 David Roundy <droundy@xxxxxxxxx>
* add TODO to refactor unrevert handling.
Sat Jul 15 23:43:39 EDT 2006 David Roundy <droundy@xxxxxxxxx>
* add TODO for refactoring get_markedup_file.
Sat Jul 15 23:43:19 EDT 2006 David Roundy <droundy@xxxxxxxxx>
* partial refactoring in annotate.
Sat Jul 15 23:31:09 EDT 2006 David Roundy <droundy@xxxxxxxxx>
* I've now eliminated need to export DarcsRepo.write_patch.
Thu Aug 3 09:30:26 EDT 2006 David Roundy <droundy@xxxxxxxxx>
* refactor tag.
Thu Aug 3 09:32:30 EDT 2006 David Roundy <droundy@xxxxxxxxx>
* partially refactor Optimize.
Thu Aug 3 09:33:20 EDT 2006 David Roundy <droundy@xxxxxxxxx>
* don't use DarcsRepo in list_authors.
Thu Aug 3 10:03:42 EDT 2006 David Roundy <droundy@xxxxxxxxx>
* refactor Repository to allow truly atomic updates.
Thu Aug 3 10:17:48 EDT 2006 David Roundy <droundy@xxxxxxxxx>
* make get work with umask changes.
Fri Aug 4 06:38:30 EDT 2006 David Roundy <droundy@xxxxxxxxx>
* add new test that triggers bug in refactoring.
Fri Aug 4 09:18:17 EDT 2006 David Roundy <droundy@xxxxxxxxx>
* simplify unrevert handling.
This change also ends up having to do considerable refactoring in order to
avoid recursive import loops. But that's also nice in that it puts
"simple" code into "simple" modules.
Sat Aug 5 15:27:00 EDT 2006 David Roundy <droundy@xxxxxxxxx>
* remove TODO from pull.pl.
Sat Aug 5 18:10:55 EDT 2006 David Roundy <droundy@xxxxxxxxx>
* fixes in pull.pl.
The first fix avoids a false error that shows up because of identical
timestamps. The second verifies that revert -a doesn't prompt user.
Sat Aug 5 18:15:53 EDT 2006 David Roundy <droundy@xxxxxxxxx>
* refactor pending handling.
Sun Aug 6 08:25:36 EDT 2006 David Roundy <droundy@xxxxxxxxx>
* add new obliterate test.
Sun Aug 6 08:25:48 EDT 2006 David Roundy <droundy@xxxxxxxxx>
* fix obliterate bug revealed by latest test.
New patches:
[refactor amend-record.
David Roundy <droundy@xxxxxxxxx>**20060716021003] {
hunk ./AmendRecord.lhs 24
-import Repository ( PatchSet,
- withRepoLock, get_unrecorded, slurp_recorded,
- with_new_pending, sync_repo,
+import Repository ( withRepoLock, get_unrecorded, slurp_recorded,
+ tentativelyRemovePatches, tentativelyAddPatch,
finalizeRepositoryChanges,
+ with_new_pending, sync_repo, amInRepository,
hunk ./AmendRecord.lhs 28
-import DarcsRepo ( read_repo,
- add_to_inventory, write_patch,
- am_in_repo, write_inventory,
- )
-import Pristine ( identifyPristine, applyPristine )
-import Depends ( deep_optimize_patchset )
hunk ./AmendRecord.lhs 86
- command_prereq = am_in_repo,
+ command_prereq = amInRepository,
hunk ./AmendRecord.lhs 106
- with_selected_patch_from_repo "amend" opts True $ \ (oldp, skipped) -> do
+ with_selected_patch_from_repo "amend" opts True $ \ (oldp, _) -> do
hunk ./AmendRecord.lhs 125
- write_patch opts $ newp
hunk ./AmendRecord.lhs 128
- pris <- identifyPristine
- applyPristine pris (join_patches chs) `catch`
- \e -> fail ("Bizarre error in amend-recording:\n"
++ show e)
- sequence_ $ map (write_patch opts) skipped
- patches' <- read_repo "."
- write_inventory "." $ rempatch oldp patches'
- add_to_inventory "."
- [(fromJust $ patch2patchinfo newp)]
+ tentativelyRemovePatches repository opts [oldp]
+ tentativelyAddPatch repository opts newp
+ finalizeRepositoryChanges repository
hunk ./AmendRecord.lhs 159
-
-rempatch :: Patch -> PatchSet -> PatchSet
-rempatch p (pps:ppss) =
- case patch2patchinfo p of
- Nothing -> impossible
- Just pinfo -> if pinfo `elem` simple_infos
- then (filter ((/= pinfo).fst) pps) : ppss
- else deep_optimize_patchset $
- map (filter ((/= pinfo).fst)) (pps:ppss)
- where simple_infos = init $ map fst pps
-rempatch _ [] = impossible
}
[fix ordering of operations to call pull_first_middles properly.
David Roundy <droundy@xxxxxxxxx>**20060730111409] {
hunk ./AmendRecord.lhs 126
+ tentativelyRemovePatches repository opts [oldp]
+ tentativelyAddPatch repository opts newp
hunk ./AmendRecord.lhs 129
- with_new_pending repository (join_patches unrec) $ do
- tentativelyRemovePatches repository opts [oldp]
- tentativelyAddPatch repository opts newp
- finalizeRepositoryChanges repository
+ with_new_pending repository (join_patches unrec) $
+ finalizeRepositoryChanges repository
}
[make amend-record.pl test a bit pickier.
David Roundy <droundy@xxxxxxxxx>**20060730103854] {
hunk ./tests/amend-record.pl 18
+`echo ALL ignore-times >> _darcs/prefs/defaults`;
hunk ./tests/amend-record.pl 31
+{
+ my $changes = darcs("changes -v");
+ like( $changes, qr/another line/, 'change amended properly');
+}
+
}
[simplify code a tad in get.
David Roundy <droundy@xxxxxxxxx>**20060726121737] {
hunk ./Get.lhs 280
-patch_or_patches number
- | number == 1 = "patch."
- | otherwise = "patches."
-
+patch_or_patches 1 = "patch."
+patch_or_patches _ = "patches."
}
[partial refactoring of Get.
David Roundy <droundy@xxxxxxxxx>**20060716031605] {
hunk ./Get.lhs 37
- copy_repo_patches, sync_repo,
+ copy_repo_patches,
hunk ./Get.lhs 40
- slurp_all_but_darcs, write_patch, read_repo
+ slurp_all_but_darcs,
hunk ./Get.lhs 45
-import Depends ( get_common_and_uncommon, get_patches_beyond_tag,
commute_to_end )
+import Depends ( get_common_and_uncommon, get_patches_beyond_tag )
hunk ./Get.lhs 49
- createPristineFromWorking, flagsToPristine, applyPristine )
+ createPristineFromWorking, flagsToPristine, )
hunk ./Get.lhs 55
-import Unrecord ( rempatch )
-import Repository ( patchSetToPatches )
+import Repository ( Repository, patchSetToPatches, identifyRepository,
+ sync_repo,
+ tentativelyRemovePatches, finalizeRepositoryChanges,
+ )
hunk ./Get.lhs 187
- sync_repo pristine
+ identifyRepository "." >>= sync_repo
hunk ./Get.lhs 189
- go_to_chosen_version putVerbose putInfo opts
+ repository <- identifyRepository "."
+ go_to_chosen_version repository putVerbose putInfo opts
hunk ./Get.lhs 257
-go_to_chosen_version :: (Doc -> IO ()) -> (Doc -> IO ())
+go_to_chosen_version :: Repository -> (Doc -> IO ()) -> (Doc -> IO ())
hunk ./Get.lhs 259
-go_to_chosen_version putVerbose putInfo opts =
+go_to_chosen_version repository putVerbose putInfo opts =
hunk ./Get.lhs 270
- putInfo $ text $ "Unapplying " ++ (show $ length ps) ++ " " ++
(patch_or_patches $ length ps)
- let (_, skipped) = commute_to_end ps patches
- sequence_ $ map (write_patch opts) skipped
- repo_patches <- read_repo "."
- write_inventory "." $ foldl (flip rempatch) repo_patches (reverse ps)
- pris <- identifyPristine
- applyPristine pris (invert $ join_patches ps) `catch` \e ->
- fail ("Unable to apply inverse patch!\n" ++ show e)
+ putInfo $ text $ "Unapplying " ++ (show $ length ps) ++ " " ++
+ (patch_or_patches $ length ps)
+ tentativelyRemovePatches repository opts ps
+ finalizeRepositoryChanges repository
hunk ./Get.lhs 276
- sync_repo pris
+ sync_repo repository
}
[fix bug in refactoring of get.
David Roundy <droundy@xxxxxxxxx>**20060726121655] {
hunk ./Get.lhs 55
-import Repository ( Repository, patchSetToPatches, identifyRepository,
+import Repository ( Repository, patchSetToPatches, withRepoLock,
hunk ./Get.lhs 185
- putVerbose $ text "Syncing the repository..."
hunk ./Get.lhs 186
- identifyRepository "." >>= sync_repo
- putVerbose $ text "Repository synced, going to chosen version..."
- repository <- identifyRepository "."
- go_to_chosen_version repository putVerbose putInfo opts
+ withRepoLock $ \repository -> do putVerbose $ text "Syncing the
repository..."
+ sync_repo repository
+ putVerbose $ text "Repository synced, going
to chosen version..."
+ go_to_chosen_version repository putVerbose
putInfo opts
}
[refactor Population.
David Roundy <droundy@xxxxxxxxx>**20060716034837] {
hunk ./Population.lhs 32
-import Monad ( liftM )
hunk ./Population.lhs 39
-import DarcsRepo ( read_repo )
+import Repository ( identifyRepository, read_repo )
hunk ./Population.lhs 223
- = do pinfo <- liftM (fst . head . concat) (read_repo repobasedir)
+ = do pinfo <- (fst . head . concat) `liftM`
+ (identifyRepository repobasedir >>= read_repo)
hunk ./Population.lhs 234
- = do pips <- concat `liftM` read_repo repobasedir
+ = do pips <- concat `liftM` (identifyRepository repobasedir >>= read_repo)
replace ./Population.lhs [A-Za-z_0-9] liftM fmap
}
[add TODO to refactor unrevert handling.
David Roundy <droundy@xxxxxxxxx>**20060716020247] {
hunk ./Unrevert.lhs 19
+-- TODO: Move remove_from_unrevert_context and write_unrevert into
+-- Repository, with the former being private to Repository.
}
[add TODO for refactoring get_markedup_file.
David Roundy <droundy@xxxxxxxxx>**20060716034339] {
hunk ./DarcsRepo.lhs 572
+
+--TODO: Move get_markedup_file and friends over into Repository, since they
+--really don't have anything to do with the repo format.
+
}
[partial refactoring in annotate.
David Roundy <droundy@xxxxxxxxx>**20060716034319] {
hunk ./Annotate.lhs 34
-import Repository ( PatchSet )
-import DarcsRepo ( am_in_repo, read_repo, get_markedup_file )
+import Repository ( PatchSet, amInRepository, identifyRepository, read_repo )
+import DarcsRepo ( get_markedup_file )
hunk ./Annotate.lhs 83
- command_prereq = am_in_repo,
+ command_prereq = amInRepository,
hunk ./Annotate.lhs 115
- p <- match_patch opts `liftM` read_repo "."
+ p <- match_patch opts `liftM` (identifyRepository "." >>= read_repo)
hunk ./Annotate.lhs 151
- r <- read_repo "."
+ r <- identifyRepository "." >>= read_repo
hunk ./Annotate.lhs 301
- old_pis <- (dropWhile (/= pinfo).map fst.concat) `liftM` read_repo "."
+ old_pis <- (dropWhile (/= pinfo).map fst.concat) `liftM`
+ (identifyRepository "." >>= read_repo)
}
[I've now eliminated need to export DarcsRepo.write_patch.
David Roundy <droundy@xxxxxxxxx>**20060716033109] {
hunk ./DarcsRepo.lhs 58
- write_patch,
}
[refactor tag.
David Roundy <droundy@xxxxxxxxx>**20060803133026] {
hunk ./Tag.lhs 19
-import Monad ( liftM, when )
+import Monad ( when )
hunk ./Tag.lhs 24
-import Repository ( withRepoLock )
-import DarcsRepo
+import Repository ( amInRepository, withRepoLock, read_repo,
+ tentativelyAddPatch, finalizeRepositoryChanges,
+ )
+import DarcsRepo ( write_recorded_checkpoint )
hunk ./Tag.lhs 62
- command_prereq = am_in_repo,
+ command_prereq = amInRepository,
hunk ./Tag.lhs 73
-tag_cmd opts args = withRepoLock opts $ \_ -> do
+tag_cmd opts args = withRepoLock opts $ \repository -> do
hunk ./Tag.lhs 76
- deps <- liftM get_tags_right $ read_repo "."
+ deps <- get_tags_right `fmap` read_repo repository
hunk ./Tag.lhs 83
- write_patch opts $ adddeps mypatch deps
- add_to_inventory "." [myinfo]
+ tentativelyAddPatch repository opts $ adddeps mypatch deps
+ finalizeRepositoryChanges repository
}
[partially refactor Optimize.
David Roundy <droundy@xxxxxxxxx>**20060803133230] {
hunk ./Optimize.lhs 21
-import Control.Exception ( block )
hunk ./Optimize.lhs 24
+import SignalHandler ( withSignalsBlocked )
hunk ./Optimize.lhs 37
-import Repository ( PatchSet, withRepoLock )
+import Repository ( Repository, PatchSet, withRepoLock,
+ tentativelyRemovePatches, tentativelyAddPatch,
+ finalizeRepositoryChanges
+ )
hunk ./Optimize.lhs 42
- am_in_repo, write_patch,
+ am_in_repo,
hunk ./Optimize.lhs 98
-optimize_cmd opts _ = withRepoLock opts $ \_ -> do
- do_reorder opts
+optimize_cmd opts _ = withRepoLock opts $ \repository -> do
+ do_reorder repository opts
hunk ./Optimize.lhs 318
-do_reorder :: [DarcsFlag] -> IO ()
-do_reorder opts | not (Reorder `elem` opts) = return ()
-do_reorder opts = do
+do_reorder :: Repository -> [DarcsFlag] -> IO ()
+do_reorder _ opts | not (Reorder `elem` opts) = return ()
+do_reorder repository opts = do
hunk ./Optimize.lhs 323
- block $ do write_patchset opts psnew
- write_inventory "." psnew
+ withSignalsBlocked $ do let ps = reverse $ map (fromJust . snd) $ head
psnew
+ tentativelyRemovePatches repository opts ps
+ mapM_ (tentativelyAddPatch repository opts) ps
+ finalizeRepositoryChanges repository
hunk ./Optimize.lhs 340
-
-write_patchset :: [DarcsFlag] -> PatchSet -> IO ()
-write_patchset opts ps = let wp Nothing = return ()
- wp (Just p) = do write_patch opts p
- return ()
- in mapM_ (wp . snd) $ concat ps
}
[don't use DarcsRepo in list_authors.
David Roundy <droundy@xxxxxxxxx>**20060803133320] {
hunk ./list_authors.hs 20
-import DarcsRepo ( read_repo )
+import Repository ( identifyRepository, read_repo )
hunk ./list_authors.hs 42
-main = do darcs_history <- read_repo "."
+main = do darcs_history <- identifyRepository "." >>= read_repo
}
[refactor Repository to allow truly atomic updates.
David Roundy <droundy@xxxxxxxxx>**20060803140342] {
hunk ./Apply.lhs 46
- with_new_pending, sync_repo, read_repo, updateInventory,
- applyToPristine,
+ with_new_pending, sync_repo, read_repo,
+ tentativelyAddPatch, finalizeRepositoryChanges,
hunk ./Apply.lhs 63
-import Pull ( merge_with_us_and_pending, save_patches,
- check_unrecorded_conflicts )
+import Pull ( merge_with_us_and_pending, check_unrecorded_conflicts )
hunk ./Apply.lhs 180
- tokens <- save_patches repository opts $ unjoin_patches us_patch
+ mapM_ (tentativelyAddPatch repository opts) $ fromJust $ unjoin_patches
us_patch
hunk ./Apply.lhs 184
- applyToPristine repository us_patch `catch` \e ->
- fail ("Error applying patch to recorded!\nRunning 'darcs repair' on
the target repository may help.\n" ++ show e)
+ finalizeRepositoryChanges repository
hunk ./Apply.lhs 186
- updateInventory repository tokens
hunk ./DarcsRepo.lhs 54
- write_inventory, add_to_inventory, read_repo,
+ write_inventory,
+ add_to_inventory,
+ add_to_tentative_inventory,
remove_from_tentative_inventory,
+ finalize_tentative_changes,
+ revert_tentative_changes,
+ read_repo,
hunk ./DarcsRepo.lhs 76
-import DarcsUtils ( withCurrentDirectory, bugDoc )
+import DarcsUtils ( withCurrentDirectory, bugDoc, clarify_errors )
hunk ./DarcsRepo.lhs 83
+ readFilePS, writeFilePS,
hunk ./DarcsRepo.lhs 97
- writePatch, gzWritePatch,
+ writePatch, gzWritePatch, showPatch,
hunk ./DarcsRepo.lhs 107
-import Lock ( writeBinFile, writeDocBinFile, appendDocBinFile )
+import Lock ( writeBinFile, writeDocBinFile, appendDocBinFile, appendBinFile )
hunk ./DarcsRepo.lhs 111
-import Depends ( slightly_optimize_patchset,
+import Depends ( slightly_optimize_patchset, deep_optimize_patchset,
commute_to_end,
hunk ./DarcsRepo.lhs 116
+ applyPristine,
hunk ./DarcsRepo.lhs 376
+
+add_to_tentative_inventory :: [DarcsFlag] -> Patch -> IO FilePath
+add_to_tentative_inventory opts p =
+ do appendDocBinFile ("_darcs/tentative_inventory") $ showPatchInfo pinf
+ appendDocBinFile ("_darcs/tentative_pristine") $ showPatch p -- FIXME:
this is inefficient!
+ appendBinFile ("_darcs/tentative_pristine") "\n"
+ write_patch opts p
+ where pinf = fromJust $ patch2patchinfo p
+
+remove_from_tentative_inventory :: [DarcsFlag] -> [Patch] -> IO ()
+remove_from_tentative_inventory opts to_remove =
+ do finalize_tentative_changes
+ allpatches <- read_repo "."
+ let (_, skipped) = commute_to_end to_remove allpatches
+ sequence_ $ map (write_patch opts) skipped
+ repo_patches <- read_repo "."
+ write_inventory "." $ foldl (flip rempatch) repo_patches (reverse
to_remove)
+ pris <- identifyPristine
+ repairable $ applyPristine pris (invert $ join_patches to_remove)
+ revert_tentative_changes
+ where rempatch :: Patch -> PatchSet -> PatchSet
+ rempatch p (pps:ppss) =
+ case patch2patchinfo p of
+ Just pinfo -> if pinfo `elem` simple_infos
+ then (filter ((/= pinfo).fst) pps) : ppss
+ else deep_optimize_patchset $
+ map (filter ((/= pinfo).fst)) (pps:ppss)
+ where simple_infos = init $ map fst pps
+ Nothing -> impossible
+ rempatch _ [] = impossible
+
+finalize_tentative_changes :: IO ()
+finalize_tentative_changes = withSignalsBlocked $
+ do ps <- read_patches "_darcs/tentative_pristine"
+ pris <- identifyPristine
+ repairable $ applyPristine pris $ join_patches ps
+ renameFile "_darcs/tentative_inventory" "_darcs/inventory"
+ where read_patches f = do ps <- readFilePS f
+ return $ rp ps
+ rp ps = case readPatch ps of
+ Just (p, rest) -> p : rp rest
+ Nothing -> []
+
+repairable :: IO a -> IO a
+repairable x = x `clarify_errors` unlines
+ ["Your repository is now in an inconsistent state.",
+ "This must be fixed by running darcs repair."]
+
+revert_tentative_changes :: IO ()
+revert_tentative_changes =
+ do readFilePS "_darcs/inventory" >>= writeFilePS
"_darcs/tentative_inventory"
+ writeBinFile "_darcs/tentative_pristine" ""
hunk ./GitRepo.lhs 18
-module GitRepo ( read_repo, slurpHead, writePatch, updateInventory
+module GitRepo ( read_repo, slurpHead, writePatch, updateInventory,
+ set_tentative_tree, finalize_tentative_changes,
+ revert_tentative_changes,
hunk ./GitRepo.lhs 281
+set_tentative_tree :: String -> IO ()
+set_tentative_tree _ = fail "git needs fixing"
+
+revert_tentative_changes :: IO ()
+revert_tentative_changes = fail "git needs fixing"
+
+finalize_tentative_changes :: IO ()
+finalize_tentative_changes = fail "git needs fixing"
+
hunk ./Pull.lhs 18
-module Pull ( pull, merge_with_us_and_pending, save_patches,
+module Pull ( pull, merge_with_us_and_pending,
hunk ./Pull.lhs 39
-import Repository ( Repository, PatchToken, PatchSet, identifyRepository,
+import Repository ( PatchSet, identifyRepository,
hunk ./Pull.lhs 44
- applyToPristine, writePatch, updateInventory,
+ tentativelyAddPatch, finalizeRepositoryChanges,
hunk ./Pull.lhs 171
- patchTokens <- save_patches repository opts $ unjoin_patches pc
+ mapM_ (tentativelyAddPatch repository opts) $ fromJust $ unjoin_patches
pc
hunk ./Pull.lhs 175
- repairable $ applyToPristine repository pc
- `catch` \e ->
- fail ("Error applying patch to recorded.\nRunning 'darcs
repair' on the target repository may help.\n" ++ show e)
- updateInventory repository patchTokens
+ finalizeRepositoryChanges repository
hunk ./Pull.lhs 184
- repairable x = x `clarify_errors` unlines
- ["Your repository is now in an inconsistent state.",
- "This must be fixed by running darcs repair."]
hunk ./Pull.lhs 264
-\begin{code}
-save_patches :: Repository -> [DarcsFlag] -> Maybe [Patch] ->
- IO [(PatchInfo, PatchToken)]
-save_patches _ _ (Just []) = return []
-save_patches _ _ Nothing = return []
-save_patches repo opts (Just (p:ps)) =
- do p' <- (liftM ppt2pipt) (writePatch repo opts p)
- ps' <- save_patches repo opts $ Just ps
- return (p':ps')
- where ppt2pipt :: (Patch, PatchToken) -> (PatchInfo, PatchToken)
- ppt2pipt (patch, pt) = (fromJust (patch2patchinfo patch), pt)
-\end{code}
-
hunk ./Record.lhs 40
- slurp_recorded, updateInventory, writePatch,
- applyToPristine, patchTokenToPatchFile
+ slurp_recorded,
+ tentativelyAddPatch, finalizeRepositoryChanges,
hunk ./Record.lhs 46
- gzReadPatchFileLazily,
hunk ./Record.lhs 47
-import PatchInfo ( PatchInfo, patchinfo )
+import PatchInfo ( PatchInfo )
hunk ./Record.lhs 183
- myinfo = patchinfo date name my_author my_log
hunk ./Record.lhs 187
- (mypatch', token) <-
- writePatch repository opts $ adddeps mypatch deps
+ mypatch' <- tentativelyAddPatch repository opts $ adddeps
mypatch deps
hunk ./Record.lhs 189
- when want_test $ do
- let mfp = patchTokenToPatchFile token
- let logmsg = "Logfile left in " ++ (fromJust logf) ++ "."
- case mfp of
- Just fp ->
- do testproblem <-
- (gzReadPatchFileLazily fp >>=
- (test_patch opts))
- when (testproblem /= ExitSuccess) $ do
- when (Verbose `elem` opts) $
- logMessage "Removing the patch file."
- removeFile fp
- when (isJust logf) $
- logMessage $ logmsg
- exitWith $ ExitFailure 1
- return ()
- Nothing -> return ()
- when (Verbose `elem` opts) $
- logMessage "Applying to current..."
+ when want_test $
+ do testproblem <- test_patch opts mypatch' -- FIXME
MEMORY HOG
+ when (testproblem /= ExitSuccess) $ do
+ when (Verbose `elem` opts) $ logMessage "Removing
the patch file."
+ when (isJust logf) $
+ logMessage $ "Logfile left in " ++ (fromJust
logf) ++ "."
+ exitWith $ ExitFailure 1
+ when (Verbose `elem` opts) $ logMessage "Applying to
current..."
hunk ./Record.lhs 198
- with_new_pending repository (join_patches skipped) $ do
- applyToPristine repository mypatch'
- updateInventory repository [(myinfo, token)]
+ with_new_pending repository (join_patches skipped) $
+ finalizeRepositoryChanges repository
hunk ./Repository.lhs 28
- PatchToken, patchTokenToPatchFile,
- writePatch, updateInventory, unrevertUrl,
+ tentativelyAddPatch, tentativelyRemovePatches, unrevertUrl,
+ finalizeRepositoryChanges,
hunk ./Repository.lhs 46
- WorkDir, UMask) )
-import PatchInfo ( PatchInfo )
+ WorkDir, UMask) )
hunk ./Repository.lhs 51
-import Workaround ( getCurrentDirectory )
-import DarcsUtils ( catchall, withCurrentDirectory, withUMask )
+import DarcsUtils ( catchall, withCurrentDirectory, withUMask )
hunk ./Repository.lhs 242
--- writePatch returns an opaque token that should be passed to updateInventory.
+tentativelyAddPatch :: Repository -> [DarcsFlag] -> Patch -> IO Patch
+tentativelyAddPatch (Repo dir _ (DarcsRepository _)) opts patch =
+ withCurrentDirectory dir $ do
+ fp <- DarcsRepo.add_to_tentative_inventory opts patch
+ gzReadPatchFileLazily fp
+tentativelyAddPatch (Repo dir _ GitRepository) _ patch =
+ withCurrentDirectory dir $ do (patch', token) <- GitRepo.writePatch dir
patch
+ GitRepo.set_tentative_tree token
+ return patch'
hunk ./Repository.lhs 252
-data PatchToken = DarcsPatchToken !String | GitPatchToken !String
+tentativelyRemovePatches :: Repository -> [DarcsFlag] -> [Patch] -> IO ()
+tentativelyRemovePatches (Repo dir _ (DarcsRepository _)) opts ps =
+ withCurrentDirectory dir $ DarcsRepo.remove_from_tentative_inventory opts
ps
+tentativelyRemovePatches (Repo _ _ GitRepository) _ _ = error "unimplemented
git"
+
+finalizeRepositoryChanges :: Repository -> IO ()
+finalizeRepositoryChanges (Repo dir _ (DarcsRepository _)) =
+ withCurrentDirectory dir $ DarcsRepo.finalize_tentative_changes
+finalizeRepositoryChanges (Repo dir _ GitRepository) =
+ withCurrentDirectory dir $ GitRepo.finalize_tentative_changes
hunk ./Repository.lhs 263
-writePatch :: Repository -> [DarcsFlag] -> Patch -> IO (Patch, PatchToken)
-writePatch (Repo dir _ (DarcsRepository _)) opts patch =
- withCurrentDirectory dir $
- do fp <- DarcsRepo.write_patch opts patch
- patch' <- gzReadPatchFileLazily fp
- return (patch', DarcsPatchToken fp)
-writePatch (Repo dir _ GitRepository) _ patch =
- withCurrentDirectory dir $
- do cd <- getCurrentDirectory
- (patch', token) <- GitRepo.writePatch cd patch
- return (patch', GitPatchToken token)
-
--- this should be called with signals blocked
-updateInventory :: Repository -> [(PatchInfo, PatchToken)] -> IO ()
-updateInventory (Repo dir _ (DarcsRepository _)) l =
- withCurrentDirectory dir $
- DarcsRepo.add_to_inventory "." (map fst l)
-updateInventory (Repo dir _ GitRepository) l =
- withCurrentDirectory dir $
- GitRepo.updateInventory (map (\(_,(GitPatchToken t)) -> t) l)
-
-patchTokenToPatchFile :: PatchToken -> Maybe String
-patchTokenToPatchFile (DarcsPatchToken fp) = Just fp
-patchTokenToPatchFile _ = Nothing
+revertRepositoryChanges :: Repository -> IO ()
+revertRepositoryChanges (Repo dir _ (DarcsRepository _)) =
+ withCurrentDirectory dir $ DarcsRepo.revert_tentative_changes
+revertRepositoryChanges (Repo dir _ GitRepository) =
+ withCurrentDirectory dir $ GitRepo.revert_tentative_changes
hunk ./Repository.lhs 272
-getUMask :: [DarcsFlag] -> Maybe String
-getUMask [] = Nothing
-getUMask ((UMask u):_) = Just u
-getUMask (_:l) = getUMask l
-
-withRepoLock :: [DarcsFlag] -> (Repository -> IO a) -> IO a
-withRepoLock opts job = do repository <- identifyRepository "."
- let (Repo _ rf rt) = repository
- case write_problem rf of
- Nothing -> return ()
- Just err -> fail err
- let name = case rt of
- DarcsRepository _ -> "./_darcs/lock"
- GitRepository -> "./.git/lock"
- wu = case (getUMask opts) of
- Nothing -> id
- Just u -> withUMask u
- wu (withLock name (job repository))
+getUMask :: [DarcsFlag] -> Maybe String
+getUMask [] = Nothing
+getUMask ((UMask u):_) = Just u
+getUMask (_:l) = getUMask l
+
+withRepoLock :: [DarcsFlag] -> (Repository -> IO a) -> IO a
+withRepoLock opts job = do repository <- identifyRepository "."
+ let (Repo _ rf rt) = repository
+ case write_problem rf of
+ Nothing -> return ()
+ Just err -> fail err
+ let name = case rt of
+ DarcsRepository _ -> "./_darcs/lock"
+ GitRepository -> "./.git/lock"
+ wu = case (getUMask opts) of
+ Nothing -> id
+ Just u -> withUMask u
+ wu (withLock name (revertRepositoryChanges
repository >> job repository))
hunk ./Rollback.lhs 28
- applyToPristine, writePatch, updateInventory,
+ tentativelyAddPatch, finalizeRepositoryChanges,
hunk ./Rollback.lhs 89
- Just pinfo ->
- do (_, t) <- writePatch repository opts $ invert p
+ Just _ ->
+ do tentativelyAddPatch repository opts $ invert p
hunk ./Rollback.lhs 93
- do applyToPristine repository (invert p) `catch` \e ->
- fail ("Unable to apply inverse patch!\n" ++ show e)
- updateInventory repository [(pinfo, t)]
+ finalizeRepositoryChanges repository
hunk ./Unrecord.lhs 34
- get_unrecorded,
+ tentativelyRemovePatches, finalizeRepositoryChanges,
+ get_unrecorded, read_repo, amInRepository,
hunk ./Unrecord.lhs 38
-import DarcsRepo ( read_repo,
- write_inventory, write_patch,
- am_in_repo,
- )
-import Pristine ( identifyPristine, applyPristine )
hunk ./Unrecord.lhs 42
-import Depends ( deep_optimize_patchset, commute_to_end,
get_common_and_uncommon )
+import Depends ( deep_optimize_patchset, get_common_and_uncommon )
hunk ./Unrecord.lhs 132
- command_prereq = am_in_repo,
+ command_prereq = amInRepository,
hunk ./Unrecord.lhs 149
- allpatches <- read_repo "."
+ allpatches <- read_repo repository
hunk ./Unrecord.lhs 163
- let (_, skipped) = commute_to_end to_unrecord allpatches
- sequence_ $ map (write_patch opts) skipped
- repo_patches <- read_repo "."
- when (Verbose `elem` opts) $
- logMessage "About to write inventory..."
- write_inventory "." $ foldl (flip rempatch) repo_patches (reverse
to_unrecord)
- when (Verbose `elem` opts) $ logMessage "Updating pristine tree..."
- pris <- identifyPristine
- applyPristine pris (invert $ join_patches to_unrecord) `catch` \e ->
- fail ("Unable to apply inverse patch!\n" ++ show e)
+ tentativelyRemovePatches repository opts to_unrecord
hunk ./Unrecord.lhs 260
- command_prereq = am_in_repo,
+ command_prereq = amInRepository,
hunk ./Unrecord.lhs 333
- command_prereq = am_in_repo,
+ command_prereq = amInRepository,
hunk ./Unrecord.lhs 355
- allpatches <- read_repo "."
+ allpatches <- read_repo repository
hunk ./Unrecord.lhs 370
- let (_, skipped) = commute_to_end ps allpatches
- sequence_ $ map (write_patch opts) skipped
- repo_patches <- read_repo "."
- write_inventory "." $ foldl (flip rempatch) repo_patches (reverse
ps)
- pris <- identifyPristine
- applyPristine pris (invert $ join_patches ps) `catch` \e ->
- fail ("Unable to apply inverse patch!\n" ++ show e)
+ tentativelyRemovePatches repository opts ps
+ finalizeRepositoryChanges repository
}
[make get work with umask changes.
David Roundy <droundy@xxxxxxxxx>**20060803141748] {
hunk ./Get.lhs 186
- withRepoLock $ \repository -> do putVerbose $ text "Syncing the
repository..."
- sync_repo repository
- putVerbose $ text "Repository synced, going
to chosen version..."
- go_to_chosen_version repository putVerbose
putInfo opts
+ withRepoLock opts $ \repository -> do putVerbose $ text "Syncing the
repository..."
+ sync_repo repository
+ putVerbose $ text "Repository synced,
going to chosen version..."
+ go_to_chosen_version repository
putVerbose putInfo opts
}
[add new test that triggers bug in refactoring.
David Roundy <droundy@xxxxxxxxx>**20060804103830] {
addfile ./tests/pull_conflict.sh
move ./tests/pull_conflict.sh ./tests/pull_two.sh
hunk ./tests/pull_two.sh 1
+#!/bin/sh
+
+# This test script, originally written by David Roundy is in the public
+# domain.
+
+set -ev
+
+test $DARCS || DARCS=$PWD/../darcs
+ACTUAL_DARCS=`which $DARCS`
+DARCSPATH=`dirname $ACTUAL_DARCS`
+export PATH="$DARCSPATH:$PATH"
+
+rm -rf temp1 temp2
+
+mkdir temp1
+cd temp1
+echo foo > bar
+$DARCS initialize
+$DARCS add bar
+$DARCS record -a -m addbar
+
+cd ..
+$DARCS get temp1 temp2
+cd temp1
+date > bar
+$DARCS record -a -m datebar
+
+cd ../temp1
+echo aack >> bar
+$DARCS record -a -m aackbar
+
+cd ../temp2
+
+$DARCS pull -av
+$DARCS check
+
+cd ..
+rm -rf temp1 temp2
}
[simplify unrevert handling.
David Roundy <droundy@xxxxxxxxx>**20060804131817
This change also ends up having to do considerable refactoring in order to
avoid recursive import loops. But that's also nice in that it puts
"simple" code into "simple" modules.
] {
hunk ./AmendRecord.lhs 45
-import Unrevert ( remove_from_unrevert_context )
hunk ./AmendRecord.lhs 124
- remove_from_unrevert_context [oldp]
- tentativelyRemovePatches repository opts [oldp]
- tentativelyAddPatch repository opts newp
- withSignalsBlocked $
+ withSignalsBlocked $ do
+ tentativelyRemovePatches repository opts [oldp]
+ tentativelyAddPatch repository opts newp
hunk ./DarcsArguments.lhs 32
- edit_file, askdeps, ignoretimes, lookforadds,
- ask_long_comment, sendmail_cmd, view_file,
+ askdeps, ignoretimes, lookforadds,
+ ask_long_comment, sendmail_cmd,
hunk ./DarcsArguments.lhs 68
-import List
-import System
-import Exec ( exec_interactive )
+import List ( (\\) )
+import System ( ExitCode(ExitSuccess), exitWith, getEnv )
hunk ./DarcsArguments.lhs 77
-import DarcsUtils ( askUser, catchall, ortryrunning )
+import DarcsUtils ( askUser, catchall )
hunk ./DarcsArguments.lhs 897
-
-\begin{code}
-edit_file :: String -> IO ExitCode
-edit_file f = do
- ed <- get_editor
- exec_interactive ed [f]
- `ortryrunning` exec_interactive "emacs" [f]
- `ortryrunning` exec_interactive "emacs" ["-nw",f]
- `ortryrunning` exec_interactive "nano" [f]
-get_editor :: IO String
-get_editor = getEnv "DARCS_EDITOR" `catchall`
- getEnv "DARCSEDITOR" `catchall`
- getEnv "VISUAL" `catchall`
- getEnv "EDITOR" `catchall` return "vi"
-\end{code}
-
-\begin{code}
-view_file :: String -> IO ExitCode
-view_file f = do
- viewer <- get_viewer
- exec_interactive viewer [f]
- `ortryrunning` exec_interactive "more" [f]
-get_viewer :: IO String
-get_viewer = getEnv "DARCS_PAGER" `catchall`
- getEnv "PAGER" `catchall` return "less"
-\end{code}
hunk ./DarcsUtils.lhs 13
+ view_file, edit_file, promptChar, promptCharFancy,
without_buffering,
hunk ./DarcsUtils.lhs 21
-import System ( ExitCode(..) )
-import System.IO ( hFlush, hPutStrLn, stderr, stdout )
+import System ( ExitCode(..), getEnv )
+import System.IO ( hFlush, hPutStrLn, stderr, stdout, stdin,
+ BufferMode ( NoBuffering ),
+ hLookAhead, hReady, hSetBuffering, hGetBuffering,
hIsTerminalDevice )
hunk ./DarcsUtils.lhs 26
+import Data.Char ( toUpper )
hunk ./DarcsUtils.lhs 31
+import RawMode ( get_raw_mode, set_raw_mode )
+import Exec ( exec_interactive )
hunk ./DarcsUtils.lhs 146
+
+\begin{code}
+edit_file :: String -> IO ExitCode
+edit_file f = do
+ ed <- get_editor
+ exec_interactive ed [f]
+ `ortryrunning` exec_interactive "emacs" [f]
+ `ortryrunning` exec_interactive "emacs" ["-nw",f]
+ `ortryrunning` exec_interactive "nano" [f]
+get_editor :: IO String
+get_editor = getEnv "DARCS_EDITOR" `catchall`
+ getEnv "DARCSEDITOR" `catchall`
+ getEnv "VISUAL" `catchall`
+ getEnv "EDITOR" `catchall` return "vi"
+\end{code}
+
+\begin{code}
+view_file :: String -> IO ExitCode
+view_file f = do
+ viewer <- get_viewer
+ exec_interactive viewer [f]
+ `ortryrunning` exec_interactive "more" [f]
+get_viewer :: IO String
+get_viewer = getEnv "DARCS_PAGER" `catchall`
+ getEnv "PAGER" `catchall` return "less"
+\end{code}
+
+\begin{code}
+promptChar :: String -> [Char] -> IO Char
+promptChar p chs = promptCharFancy p chs Nothing False
+
+promptCharFancy :: String -> [Char] -> Maybe Char -> Bool -> IO Char
+promptCharFancy p chs md qmark_for_help =
+ do a <- without_buffering $
+ do putStr $ p ++ " ["++ setDefault chs ++"]" ++ helpStr
+ hFlush stdout
+ getChar
+ when (a /= '\n') $ putStr "\n"
+ case () of
+ _ | a `elem` chs -> return a
+ | a == ' ' -> case md of Nothing -> tryAgain
+ Just d -> return d
+ | a == '?' && qmark_for_help -> return a
+ | otherwise -> tryAgain
+ where
+ helpStr = if qmark_for_help then ", or ? for help: " else ""
+ tryAgain = do putStrLn "Invalid response, try again!"
+ promptCharFancy p chs md qmark_for_help
+ setDefault s = case md of Nothing -> s
+ Just d -> map (setUpper d) s
+ setUpper d c = if d == c then toUpper c else c
+
+without_buffering :: IO a -> IO a
+without_buffering job = do
+ bracket nobuf rebuf $ \_ -> job
+ where nobuf = do is_term <- hIsTerminalDevice stdin
+ bi <- hGetBuffering stdin
+ raw <- get_raw_mode
+ when is_term $ do hSetBuffering stdin NoBuffering
+ set_raw_mode True
+ return (bi,raw)
+ rebuf (bi,raw) = do is_term <- hIsTerminalDevice stdin
+#if SYS == windows
+ buffers <- hGetBuffering stdin
+ hSetBuffering stdin NoBuffering `catch` \_ ->
return ()
+ drop_returns
+ hSetBuffering stdin buffers `catch` \_ -> return
()
+#else
+ drop_returns
+#endif
+ when is_term $ do hSetBuffering stdin bi
+ set_raw_mode raw
+ drop_returns = do is_ready <- hReady stdin
+ when is_ready $
+ do c <- hLookAhead stdin `catch` \_ -> return ' '
+ when (c == '\n') $
+ do getChar
+ drop_returns
+\end{code}
hunk ./Match.lhs 42
-import DarcsArguments ( DarcsFlag( OnePatch, SeveralPatch, Context,
- AfterPatch, UpToPatch, LastN,
- OneTag, AfterTag, UpToTag,
- OnePattern, SeveralPattern,
- AfterPattern, UpToPattern ) )
+import DarcsFlags ( DarcsFlag( OnePatch, SeveralPatch, Context,
+ AfterPatch, UpToPatch, LastN,
+ OneTag, AfterTag, UpToTag,
+ OnePattern, SeveralPattern,
+ AfterPattern, UpToPattern ) )
hunk ./PatchBundle.lhs 21
-import DarcsArguments ( DarcsFlag( Unified ) )
-import Repository ( PatchSet )
+import DarcsFlags ( DarcsFlag( Unified ) )
+import PatchSet ( PatchSet )
hunk ./PrintPatch.lhs 28
-import DarcsArguments ( view_file )
+import DarcsUtils ( view_file )
hunk ./Pull.lhs 51
-import SelectChanges ( promptChar )
hunk ./Pull.lhs 59
-import DarcsUtils ( clarify_errors, nubsort, formatPath )
+import DarcsUtils ( clarify_errors, nubsort, formatPath, promptChar )
hunk ./Record.lhs 20
-import Control.Monad ( filterM, liftM, when )
+import Control.Monad ( filterM, when )
hunk ./Record.lhs 52
-import SelectChanges ( with_selected_changes_to_files, promptChar,
+import SelectChanges ( with_selected_changes_to_files,
hunk ./Record.lhs 58
-import DarcsUtils ( askUser )
+import DarcsUtils ( askUser, promptChar, edit_file )
replace ./Record.lhs [A-Za-z_0-9] liftM fmap
hunk ./Repository.lhs 36
+import Data.List ( (\\) )
hunk ./Repository.lhs 39
-import Directory ( doesDirectoryExist, setCurrentDirectory )
+import Directory ( doesDirectoryExist, setCurrentDirectory, removeFile )
hunk ./Repository.lhs 42
+import FastPackedString ( readFilePS )
+import PatchBundle ( scan_bundle, make_bundle )
hunk ./Repository.lhs 51
+ patch2patchinfo, commute,
hunk ./Repository.lhs 53
+import Depends ( get_common_and_uncommon )
hunk ./Repository.lhs 56
-import DarcsUtils ( catchall, withCurrentDirectory, withUMask )
+import DarcsUtils ( promptChar, catchall, withCurrentDirectory, withUMask )
hunk ./Repository.lhs 58
-import Lock ( withLock )
+import Lock ( withLock, writeDocBinFile )
hunk ./Repository.lhs 259
- withCurrentDirectory dir $ DarcsRepo.remove_from_tentative_inventory opts
ps
-tentativelyRemovePatches (Repo _ _ GitRepository) _ _ = error "unimplemented
git"
+ withCurrentDirectory dir $ do
+ remove_from_unrevert_context ps
+ DarcsRepo.remove_from_tentative_inventory opts ps
+tentativelyRemovePatches (Repo dir _ GitRepository) _ ps =
+ withCurrentDirectory dir $ do
+ remove_from_unrevert_context ps
+ fail "unimplemented git"
hunk ./Repository.lhs 330
+
+\begin{code}
+remove_from_unrevert_context :: [Patch] -> IO ()
+remove_from_unrevert_context ps = do
+ repository <- identifyRepository "."
+ bundle <- unrevert_patch_bundle `catchall` return [[]]
+ case bundle of
+ [[]] -> return ()
+ _ -> do
+ let unrevert_loc = unrevertUrl repository
+ ref <- read_repo repository
+ case get_common_and_uncommon (bundle, ref) of
+ (common,[[(_, Just us)]],[[]]) ->
+ case commute (us, join_patches ps) of
+ Nothing -> unrevert_impossible unrevert_loc
+ Just (_, us') -> do
+ s <- slurp_recorded repository
+ writeDocBinFile unrevert_loc $
+ make_bundle [] s
+ (common \\ pis) [us']
+ (common,[[(_, Just _)]],_)
+ | any (`elem` common) pis -> unrevert_impossible unrevert_loc
+ | otherwise -> return ()
+ _ -> unrevert_impossible unrevert_loc
+ where unrevert_impossible unrevert_loc =
+ do yorn <- promptChar
+ "This operation will make unrevert
impossible!\nProceed?"
+ "yn"
+ case yorn of
+ 'n' -> fail "Cancelled to avoid unrevert catastrophe!"
+ 'y' -> removeFile unrevert_loc `catchall` return ()
+ _ -> impossible
+ pis = map (fromJust . patch2patchinfo) ps
+ unrevert_patch_bundle :: IO PatchSet
+ unrevert_patch_bundle = do repository <- identifyRepository "."
+ pf <- readFilePS (unrevertUrl repository)
+ case scan_bundle pf of
+ Right foo -> return foo
+ Left err -> fail $ "Couldn't parse
unrevert patch:\n" ++ err
+\end{code}
hunk ./Resolve.lhs 32
-import SelectChanges ( promptChar )
+import DarcsUtils ( promptChar )
hunk ./SelectChanges.lhs 29
- promptChar,
hunk ./SelectChanges.lhs 48
-import System.IO ( hIsTerminalDevice )
-import Control.Exception ( bracket )
hunk ./SelectChanges.lhs 78
-import DarcsUtils ( askUser )
+import DarcsUtils ( askUser, promptCharFancy, without_buffering )
hunk ./SelectChanges.lhs 80
-import RawMode ( get_raw_mode, set_raw_mode )
hunk ./SelectChanges.lhs 241
-
-without_buffering :: IO a -> IO a
-without_buffering job = do
- bracket nobuf rebuf $ \_ -> job
- where nobuf = do is_term <- hIsTerminalDevice stdin
- bi <- hGetBuffering stdin
- raw <- get_raw_mode
- when is_term $ do hSetBuffering stdin NoBuffering
- set_raw_mode True
- return (bi,raw)
- rebuf (bi,raw) = do is_term <- hIsTerminalDevice stdin
-#if SYS == windows
- buffers <- hGetBuffering stdin
- hSetBuffering stdin NoBuffering `catch` \_ ->
return ()
- drop_returns
- hSetBuffering stdin buffers `catch` \_ -> return
()
-#else
- drop_returns
-#endif
- when is_term $ do hSetBuffering stdin bi
- set_raw_mode raw
- drop_returns = do is_ready <- hReady stdin
- when is_ready $
- do c <- hLookAhead stdin `catch` \_ -> return ' '
- when (c == '\n') $
- do getChar
- drop_returns
-
hunk ./SelectChanges.lhs 584
-
-\begin{code}
-promptChar :: String -> [Char] -> IO Char
-promptChar p chs = promptCharFancy p chs Nothing False
-
-promptCharFancy :: String -> [Char] -> Maybe Char -> Bool -> IO Char
-promptCharFancy p chs md qmark_for_help =
- do a <- without_buffering $
- do putStr $ p ++ " ["++ setDefault chs ++"]" ++ helpStr
- hFlush stdout
- getChar
- when (a /= '\n') $ putStr "\n"
- case () of
- _ | a `elem` chs -> return a
- | a == ' ' -> case md of Nothing -> tryAgain
- Just d -> return d
- | a == '?' && qmark_for_help -> return a
- | otherwise -> tryAgain
- where
- helpStr = if qmark_for_help then ", or ? for help: " else ""
- tryAgain = do putStrLn "Invalid response, try again!"
- promptCharFancy p chs md qmark_for_help
- setDefault s = case md of Nothing -> s
- Just d -> map (setUpper d) s
- setUpper d c = if d == c then toUpper c else c
-\end{code}
hunk ./Send.lhs 29
- edit_file, get_cc, get_author, working_repo_dir,
+ get_cc, get_author, working_repo_dir,
hunk ./Send.lhs 53
-import DarcsUtils ( askUser, catchall, formatPath )
+import DarcsUtils ( askUser, catchall, edit_file, formatPath )
hunk ./Unrecord.lhs 43
-import Unrevert ( remove_from_unrevert_context )
hunk ./Unrecord.lhs 157
- remove_from_unrevert_context to_unrecord
hunk ./Unrecord.lhs 158
+ when (Verbose `elem` opts) $
+ logMessage "About to write out (potentially) modified patches..."
hunk ./Unrecord.lhs 161
- when (Verbose `elem` opts) $
- logMessage "About to write out (potentially) modified
patches..."
hunk ./Unrecord.lhs 162
+ finalizeRepositoryChanges repository
hunk ./Unrecord.lhs 367
- remove_from_unrevert_context ps
hunk ./Unrevert.lhs 18
-module Unrevert ( unrevert, remove_from_unrevert_context, write_unrevert )
where
--- TODO: Move remove_from_unrevert_context and write_unrevert into
--- Repository, with the former being private to Repository.
+module Unrevert ( unrevert, write_unrevert ) where
hunk ./Unrevert.lhs 20
-import Monad ( liftM )
-import List ( (\\) )
hunk ./Unrevert.lhs 28
- slurp_recorded, unrevertUrl,
+ unrevertUrl,
hunk ./Unrevert.lhs 35
- patch2patchinfo, commute, namepatch, flatten_to_primitives,
+ commute, namepatch, flatten_to_primitives,
hunk ./Unrevert.lhs 46
-import SelectChanges ( promptChar )
hunk ./Unrevert.lhs 96
- pw_resolved <- join_patches `liftM` standard_resolution work_patch
+ pw_resolved <- join_patches `fmap` standard_resolution work_patch
hunk ./Unrevert.lhs 146
-
-\begin{code}
-remove_from_unrevert_context :: [Patch] -> IO ()
-remove_from_unrevert_context ps = do
- bundle <- unrevert_patch_bundle `catchall` return [[]]
- case bundle of
- [[]] -> return ()
- _ -> do
- repository <- identifyRepository "."
- let unrevert_loc = unrevertUrl repository
- ref <- read_repo repository
- case get_common_and_uncommon (bundle, ref) of
- (common,[[(_, Just us)]],[[]]) ->
- case commute (us, join_patches ps) of
- Nothing -> unrevert_impossible unrevert_loc
- Just (_, us') -> do
- s <- slurp_recorded repository
- writeDocBinFile unrevert_loc $
- make_bundle [] s
- (common \\ pis) [us']
- (common,[[(_, Just _)]],_)
- | any (`elem` common) pis -> unrevert_impossible unrevert_loc
- | otherwise -> return ()
- _ -> unrevert_impossible unrevert_loc
- where unrevert_impossible unrevert_loc =
- do yorn <- promptChar
- "This operation will make unrevert
impossible!\nProceed?"
- "yn"
- case yorn of
- 'n' -> fail "Cancelled to avoid unrevert catastrophe!"
- 'y' -> removeFile unrevert_loc `catchall` return ()
- _ -> impossible
- pis = map (fromJust . patch2patchinfo) ps
-\end{code}
}
[remove TODO from pull.pl.
David Roundy <droundy@xxxxxxxxx>**20060805192700] {
hunk ./tests/pull.pl 88
- local $TODO = "Haven't diagnosed this corner case yet";
-
- # DJR: I'm not sure what's going on here... I just made this test start
- # failing, but I'm also pretty sure my change was not causing the
- # failure to happen, just causing it to be reported. This may be a
- # merger bug, in which case it may be hard to fix.
-
}
[fixes in pull.pl.
David Roundy <droundy@xxxxxxxxx>**20060805221055
The first fix avoids a false error that shows up because of identical
timestamps. The second verifies that revert -a doesn't prompt user.
] {
hunk ./tests/pull.pl 101
+ system "sleep 1"; # So that rollback won't have same timestamp as get.
hunk ./tests/pull.pl 103
- `echo y | $DARCS revert -a`;
+ `$DARCS revert -a`;
}
[refactor pending handling.
David Roundy <droundy@xxxxxxxxx>**20060805221553] {
hunk ./AmendRecord.lhs 26
- with_new_pending, sync_repo, amInRepository,
+ sync_repo, amInRepository,
hunk ./AmendRecord.lhs 115
- s files (flatten ch) Nothing $ \ (unrec,chs) ->
+ s files (flatten ch) Nothing $ \ (_,chs) ->
hunk ./AmendRecord.lhs 127
- with_new_pending repository (join_patches unrec) $
- finalizeRepositoryChanges repository
+ finalizeRepositoryChanges repository
hunk ./Apply.lhs 46
- with_new_pending, sync_repo, read_repo,
- tentativelyAddPatch, finalizeRepositoryChanges,
+ sync_repo, read_repo,
+ tentativelyAddPatch, tentativelyAddToPending,
+ finalizeRepositoryChanges,
hunk ./Apply.lhs 50
-import Patch ( Patch, patch2patchinfo, invert, list_touched_files,
- join_patches, unjoin_patches, null_patch,
+import Patch ( Patch, patch2patchinfo, list_touched_files,
+ join_patches, unjoin_patches,
hunk ./Apply.lhs 182
- mp <- get_unrecorded repository (AnyOrder:opts)
- let npend = join_patches [invert us_patch, fromMaybePatch mp, pw_resolved]
- withSignalsBlocked $ with_new_pending repository npend $ do
- finalizeRepositoryChanges repository
- wait_a_moment -- so work will be more recent than rec
- Patch.apply opts True pw_resolved `catch` \e ->
- fail ("Error applying patch to working dir:\n" ++ show e)
+ tentativelyAddToPending repository opts pw_resolved
+ withSignalsBlocked $ do finalizeRepositoryChanges repository
+ wait_a_moment -- so work will be more recent than
rec
+ Patch.apply opts True pw_resolved `catch` \e ->
+ fail ("Error applying patch to working dir:\n"
++ show e)
hunk ./Apply.lhs 207
- fromMaybePatch Nothing = null_patch
- fromMaybePatch (Just p) = p
hunk ./Lock.lhs 27
- rm_recursive,
+ rm_recursive, removeFileMayNotExist,
hunk ./Pull.lhs 43
- with_new_pending, read_pending, sync_repo,
- tentativelyAddPatch, finalizeRepositoryChanges,
+ read_pending, sync_repo,
+ tentativelyAddPatch, tentativelyAddToPending,
finalizeRepositoryChanges,
hunk ./Pull.lhs 48
- invert, list_conflicted_files, null_patch,
+ list_conflicted_files,
hunk ./Pull.lhs 171
- mp <- get_unrecorded repository (AnyOrder:opts)
- let newpend = join_patches [invert pc, fromMaybePatch mp, pw_resolved]
- withSignalsBlocked $ with_new_pending repository newpend $ do
- finalizeRepositoryChanges repository
- -- so work will be more recent than rec:
- revertable wait_a_moment
- revertable $ apply opts True pw_resolved `catch` \e ->
- fail ("Error applying patch to working dir:\n" ++ show e)
+ tentativelyAddToPending repository opts pw_resolved
+ withSignalsBlocked $ do finalizeRepositoryChanges repository
+ -- so work will be more recent than rec:
+ revertable $
+ do wait_a_moment
+ apply opts True pw_resolved `catch` \e ->
+ fail ("Error applying patch to working
dir:\n" ++ show e)
hunk ./Pull.lhs 180
- where fromMaybePatch Nothing = null_patch
- fromMaybePatch (Just p) = p
- revertable x = x `clarify_errors` unlines
+ where revertable x = x `clarify_errors` unlines
hunk ./Record.lhs 38
- get_unrecorded,
- with_new_pending, sync_repo, read_repo,
+ get_unrecorded, sync_repo, read_repo,
hunk ./Record.lhs 160
- s files ps Nothing $ \ (skipped,chs) ->
+ s files ps Nothing $ \ (_,chs) ->
hunk ./Record.lhs 171
- my_author my_log logf deps chs skipped
+ my_author my_log logf deps chs
hunk ./Record.lhs 178
- -> [PatchInfo] -> [Patch] -> [Patch] -> IO ()
-do_actual_record opts name date my_author my_log logf deps chs skipped =
+ -> [PatchInfo] -> [Patch] -> IO ()
+do_actual_record opts name date my_author my_log logf deps chs =
hunk ./Record.lhs 196
- withSignalsBlocked $
- with_new_pending repository (join_patches skipped) $
- finalizeRepositoryChanges repository
+ withSignalsBlocked $ finalizeRepositoryChanges repository
hunk ./Record.lhs 231
- let (skipped, chs) =
+ let (_, chs) =
hunk ./Record.lhs 240
- n date my_a my_log Nothing []
- chs skipped
+ n date my_a my_log Nothing [] chs
hunk ./Repository.lhs 23
- read_pending, with_new_pending, add_to_pending,
+ read_pending, add_to_pending,
hunk ./Repository.lhs 28
- tentativelyAddPatch, tentativelyRemovePatches, unrevertUrl,
+ tentativelyAddPatch, tentativelyRemovePatches,
tentativelyAddToPending,
hunk ./Repository.lhs 30
+ unrevertUrl,
hunk ./Repository.lhs 40
-import Directory ( doesDirectoryExist, setCurrentDirectory, removeFile )
+import System.Directory ( doesDirectoryExist, setCurrentDirectory, removeFile )
hunk ./Repository.lhs 43
-import FastPackedString ( readFilePS )
+import FastPackedString ( readFilePS, gzReadFilePS, nilPS )
hunk ./Repository.lhs 51
-import Patch ( Patch, flatten, join_patches, reorder_and_coalesce,
- patch2patchinfo, commute,
- apply_to_slurpy, gzReadPatchFileLazily )
+import Patch ( Patch, flatten, flatten_to_primitives, join_patches,
reorder_and_coalesce,
+ patch2patchinfo, commute, invert, null_patch,
+ is_similar, is_addfile, is_adddir,
+ apply_to_slurpy, gzReadPatchFileLazily, readPatch, writePatch )
hunk ./Repository.lhs 60
-import Lock ( withLock, writeDocBinFile )
+import Lock ( withLock, writeDocBinFile, removeFileMayNotExist )
hunk ./Repository.lhs 249
+handle_pend_for_add :: Repository -> [DarcsFlag] -> Patch -> IO ()
+handle_pend_for_add repository@(Repo _ _ rt) opts p =
+ do mpend <- read_pending repository
+ let is_okay pend pa | is_addfile pa = any (is_similar pa) pend
+ | is_adddir pa = any (is_similar pa) pend
+ | otherwise = True
+ filter_p :: [Patch] -> [Patch]
+ filter_p = if LookForAdds `elem` opts
+ then case flatten_to_primitives `fmap` mpend of
+ Nothing -> const []
+ Just pend -> filter (is_okay pend)
+ else id
+ prepend rt $ invert $ join_patches $ filter_p $ flatten_to_primitives p
+
hunk ./Repository.lhs 264
-tentativelyAddPatch (Repo dir _ (DarcsRepository _)) opts patch =
- withCurrentDirectory dir $ do
- fp <- DarcsRepo.add_to_tentative_inventory opts patch
- gzReadPatchFileLazily fp
-tentativelyAddPatch (Repo dir _ GitRepository) _ patch =
+tentativelyAddPatch r@(Repo dir _ (DarcsRepository _)) opts patch =
+ withCurrentDirectory dir $ do fp <- DarcsRepo.add_to_tentative_inventory
opts patch
+ handle_pend_for_add r opts patch
+ gzReadPatchFileLazily fp
+tentativelyAddPatch r@(Repo dir _ GitRepository) opts patch =
hunk ./Repository.lhs 270
+ handle_pend_for_add r opts patch'
hunk ./Repository.lhs 274
+tentativelyAddToPending :: Repository -> [DarcsFlag] -> Patch -> IO ()
+tentativelyAddToPending (Repo dir _ rt) _ patch =
+ withCurrentDirectory dir $ do
+ let pn = pendingName rt
+ tpn = pn ++ ".tentative"
+ pend <- gzReadFilePS tpn `catchall` (return nilPS)
+ let newpend = case readPatch pend of
+ Nothing -> patch
+ Just (p,_) -> join_patches $ flatten_to_primitives p ++
flatten_to_primitives patch
+ writePatch tpn $ newpend
+
+prepend :: RepoType -> Patch -> IO ()
+prepend rt patch = do let pn = pendingName rt
+ ppn = pn ++ ".tentative_prepend"
+ pend <- gzReadFilePS ppn `catchall` (return nilPS)
+ let newpend = case readPatch pend of
+ Nothing -> patch
+ Just (p,_) -> join_patches $
flatten_to_primitives patch ++
+
flatten_to_primitives p
+ writePatch ppn $ newpend
+
hunk ./Repository.lhs 296
-tentativelyRemovePatches (Repo dir _ (DarcsRepository _)) opts ps =
+tentativelyRemovePatches (Repo dir _ rt@(DarcsRepository _)) opts ps =
hunk ./Repository.lhs 298
+ prepend rt $ join_patches ps
hunk ./Repository.lhs 303
+ prepend GitRepository $ join_patches ps
hunk ./Repository.lhs 307
+finalize_pending :: Repository -> IO ()
+finalize_pending repository@(Repo dir _ rt) = do
+ withCurrentDirectory dir $ do let pn = pendingName rt
+ tpn = pn ++ ".tentative"
+ ppn = pn ++ ".tentative_prepend"
+ pend <- read_pending repository
+ ppfile <- gzReadFilePS ppn `catchall` (return
nilPS)
+ tpfile <- gzReadFilePS tpn `catchall` (return
nilPS)
+ let tpend = fst `fmap` readPatch tpfile
+ ppend = fst `fmap` readPatch ppfile
+ mp2p Nothing = null_patch
+ mp2p (Just p) = p
+ new_pending = join_patches $ map mp2p
[ppend, pend, tpend]
+ with_new_pending repository new_pending
(return ())
+
hunk ./Repository.lhs 323
-finalizeRepositoryChanges (Repo dir _ (DarcsRepository _)) =
- withCurrentDirectory dir $ DarcsRepo.finalize_tentative_changes
-finalizeRepositoryChanges (Repo dir _ GitRepository) =
- withCurrentDirectory dir $ GitRepo.finalize_tentative_changes
+finalizeRepositoryChanges repository@(Repo dir _ (DarcsRepository _)) =
+ withCurrentDirectory dir $ do DarcsRepo.finalize_tentative_changes
+ finalize_pending repository
+finalizeRepositoryChanges repository@(Repo dir _ GitRepository) =
+ withCurrentDirectory dir $ do GitRepo.finalize_tentative_changes
+ finalize_pending repository
hunk ./Repository.lhs 331
-revertRepositoryChanges (Repo dir _ (DarcsRepository _)) =
- withCurrentDirectory dir $ DarcsRepo.revert_tentative_changes
+revertRepositoryChanges (Repo dir _ dr@(DarcsRepository _)) =
+ withCurrentDirectory dir $
+ do removeFileMayNotExist $ (pendingName dr) ++ ".tentative"
+ removeFileMayNotExist $ (pendingName dr) ++ ".tentative_prepend"
+ DarcsRepo.revert_tentative_changes
hunk ./Repository.lhs 337
- withCurrentDirectory dir $ GitRepo.revert_tentative_changes
+ withCurrentDirectory dir $
+ do removeFileMayNotExist $ (pendingName GitRepository) ++ ".tentative"
+ removeFileMayNotExist $ (pendingName GitRepository) ++
".tentative_prepend"
+ GitRepo.revert_tentative_changes
hunk ./Resolve.lhs 27
-import Repository ( withRepoLock, amInRepository,
- read_repo, sync_repo, get_unrecorded, with_new_pending,
+import Repository ( withRepoLock, amInRepository, add_to_pending,
+ read_repo, sync_repo, get_unrecorded,
hunk ./Resolve.lhs 86
- withSignalsBlocked $ with_new_pending repository res $
- apply opts True res `catch` \e ->
- bug ("Problem resolving conflicts in resolve!" ++ show e)
+ withSignalsBlocked $
+ do add_to_pending repository res
+ apply opts True res `catch` \e ->
+ bug ("Problem resolving conflicts in resolve!" ++ show e)
hunk ./Revert.lhs 34
- with_new_pending, sync_repo,
+ add_to_pending, sync_repo,
hunk ./Revert.lhs 113
- withSignalsBlocked $
- with_new_pending repository (join_patches skipped')$
+ withSignalsBlocked $ do
+ add_to_pending repository $ invert $ join_patches p
hunk ./Revert.lhs 116
- fail ("Unable to apply inverse patch!" ++ show e)
+ fail ("Unable to apply inverse patch!" ++ show e)
hunk ./Rollback.lhs 26
-import Repository ( amInRepository, withRepoLock, read_pending,
- with_new_pending,
+import Repository ( amInRepository, withRepoLock,
hunk ./Rollback.lhs 29
-import Patch ( join_patches, invert, patch2patchinfo, null_patch, )
+import Patch ( invert, patch2patchinfo, )
hunk ./Rollback.lhs 75
-rollback_cmd opts _ = withRepoLock opts $ \repository -> do
- mpend <- read_pending repository
- let pend = case mpend of
- Nothing -> null_patch
- Just p -> p
+rollback_cmd opts _ = withRepoLock opts $ \repository ->
hunk ./Rollback.lhs 86
- let newpend = join_patches [p, pend]
- withSignalsBlocked $ with_new_pending repository newpend $
- finalizeRepositoryChanges repository
+ withSignalsBlocked $ finalizeRepositoryChanges repository
hunk ./Unrecord.lhs 36
- read_pending, with_new_pending, sync_repo,
+ sync_repo,
hunk ./Unrecord.lhs 39
- join_patches, commute, flatten, null_patch, apply
+ join_patches, commute, null_patch, apply
hunk ./Unrecord.lhs 145
- pend <- do aack <- read_pending repository
- return $ case aack of Nothing -> []
- Just p -> flatten p
hunk ./Unrecord.lhs 154
- let newpend = join_patches (to_unrecord ++ pend)
hunk ./Unrecord.lhs 156
- withSignalsBlocked $ with_new_pending repository newpend $ do
- tentativelyRemovePatches repository opts to_unrecord
- finalizeRepositoryChanges repository
+ withSignalsBlocked $ do tentativelyRemovePatches repository opts
to_unrecord
+ finalizeRepositoryChanges repository
hunk ./Unrecord.lhs 359
- Just (p_after_pending, pend') -> do
+ Just (p_after_pending,_) -> do
hunk ./Unrecord.lhs 362
- withSignalsBlocked $ with_new_pending repository pend' $ do
- tentativelyRemovePatches repository opts ps
- finalizeRepositoryChanges repository
- apply opts True (invert p_after_pending) `catch` \e ->
- fail ("Couldn't undo patch in working dir.\n" ++ show e)
+ withSignalsBlocked $ do tentativelyRemovePatches repository opts ps
+ finalizeRepositoryChanges repository
+ apply opts True (invert p_after_pending)
`catch` \e ->
+ fail ("Couldn't undo patch in working
dir.\n" ++ show e)
hunk ./Unrevert.lhs 26
-import Directory ( removeFile )
hunk ./Unrevert.lhs 28
- read_pending, with_new_pending,
+ read_pending, add_to_pending,
hunk ./Unrevert.lhs 39
-import Lock ( writeDocBinFile )
+import Lock ( writeDocBinFile, removeFileMayNotExist )
hunk ./Unrevert.lhs 103
- withSignalsBlocked $ with_new_pending repository pend_and_p $
- do apply opts True (join_patches p) `catch` \e ->
+ withSignalsBlocked $
+ do add_to_pending repository $ join_patches p
+ apply opts True (join_patches p) `catch` \e ->
hunk ./Unrevert.lhs 118
- removeFile (unrevertUrl repository) `catchall` return ()
+ removeFileMayNotExist $ unrevertUrl repository
}
[add new obliterate test.
David Roundy <droundy@xxxxxxxxx>**20060806122536] {
addfile ./tests/obliterate.sh
hunk ./tests/obliterate.sh 1
+#!/bin/sh
+set -ev
+
+test $DARCS || DARCS=$PWD/../darcs
+
+export DARCS_EMAIL='hello world'
+rm -rf tempA
+mkdir tempA
+cd tempA
+$DARCS initialize
+echo hello world > foo
+$DARCS add foo
+$DARCS record -a -m hellofoo
+
+echo goodbye world >> foo
+$DARCS record -a -m goodbyefoo
+
+$DARCS replace world bar foo
+echo Hi there foo > bar
+$DARCS add bar
+$DARCS record -a -m addbar
+
+$DARCS mv bar baz
+$DARCS replace bar baz foo
+$DARCS record -a -m bar2baz
+
+echo Do not love the baz, or anything in the baz. >> foo
+$DARCS record -a -m nolove
+
+$DARCS mv baz world
+$DARCS replace baz world foo
+$DARCS record -a -m baz2world
+
+$DARCS whatsnew | grep 'No changes'
+
+grep 'love the world' foo
+
+echo y | $DARCS obliterate -p baz2world
+
+$DARCS whatsnew | grep 'No changes'
+
+grep 'love the baz' foo
+
+echo y | $DARCS obliterate -p bar2baz
+
+grep 'love the bar' foo
+
+echo y | $DARCS obliterate -p nolove
+
+! grep 'love' foo
+
+cd ..
+rm -rf tempA
+
}
[fix obliterate bug revealed by latest test.
David Roundy <droundy@xxxxxxxxx>**20060806122548] {
hunk ./Unrecord.lhs 35
+ tentativelyAddToPending,
hunk ./Unrecord.lhs 364
+ tentativelyAddToPending repository opts $
+ invert $ join_patches ps
}
Context:
[Minor tweaks to list_authors.
Juliusz Chroboczek <jch@xxxxxxxxxxxxxx>**20060720180602]
[add some changelog entries
Tommy Pettersson <ptp@xxxxxxxxxxxxxx>**20060718152611]
[add some changelog entries
Tommy Pettersson <ptp@xxxxxxxxxxxxxx>**20060616150558]
[Added elc and pyc to binaries.
Juliusz Chroboczek <jch@xxxxxxxxxxxxxx>**20060713184214]
[Run ssh/scp/sftp quietly.
Eric Kow <eric.kow@xxxxxxxxx>**20060707025245
This is useful for silencing Putty, and could also be for OpenSSH should
we decide to stop redirecting to /dev/null.
]
[Refactor calls to ssh/scp/sftp.
Eric Kow <eric.kow@xxxxxxxxx>**20060706202509
]
[Added up links in web interface.
Peter Stuifzand <peter@xxxxxxxxxxxxx>**20060610082238
Added a link to the 'projects' part of the cgi repository interface, so that
you go back to the project list.
]
[Merge makefile targets test_perl and test_shell into test_scripts.
Juliusz Chroboczek <jch@xxxxxxxxxxxxxx>**20060607223134
This should keep parallel make from breaking.
]
[bump version to 1.0.8pre1
Tommy Pettersson <ptp@xxxxxxxxxxxxxx>**20060522122655]
[Add a test suite for calling external programs.
Eric Kow <eric.kow@xxxxxxxxx>**20060521045407
For now this only includes a test for ssh (issue171).
]
[Add warning to Eric's SSHControlMaster rework.
Juliusz Chroboczek <jch@xxxxxxxxxxxxxx>**20060528194136]
[Only launch SSH control master on demand (fixes issue171)
Eric Kow <eric.kow@xxxxxxxxx>**20060528093000
A secondary benefit is that this encapsulates the use of the control
master functionality and consequently simplifies calling ssh. There is
no need to deal with the details of launching or exiting the control
master.
]
[Fail with a sensible message when there is no default repository to pull from.
lele@xxxxxxxxxxxxxxxxxxx**20060515135042]
[Extend test suite for patch matching.
Eric Kow <eric.kow@xxxxxxxxx>**20060513192501
]
[Implement help --match (issue91).
Eric Kow <eric.kow@xxxxxxxxx>**20060513185610
Also, refactor matching code in a way that encourages developers
to document for help --match any new matchers they create.
]
[Replace dateparser.sh with more general match.pl for testing --match.
Eric Kow <eric.kow@xxxxxxxxx>**20060513104942
]
[Add tests for pristine error and quiet mode when removing a directory.
Eric Kow <eric.kow@xxxxxxxxx>**20060513100021]
[Suppress non-empty dir warning if Quiet.
Eric Kow <eric.kow@xxxxxxxxx>**20060513053456]
[Replace test rmdir.sh with rmdir.pl.
Eric Kow <eric.kow@xxxxxxxxx>**20060513043823]
[TAG 1.0.7
Tommy Pettersson <ptp@xxxxxxxxxxxxxx>**20060513171438]
[make 1.0.7 latest stable source on web page
Tommy Pettersson <ptp@xxxxxxxxxxxxxx>**20060513000703]
[add some entries to the change log
Tommy Pettersson <ptp@xxxxxxxxxxxxxx>**20060512235752]
[bump version to 1.0.7
Tommy Pettersson <ptp@xxxxxxxxxxxxxx>**20060512235738]
[TAG 1.0.7rc1
Tommy Pettersson <ptp@xxxxxxxxxxxxxx>**20060508101408]
[bump version to 1.0.7rc1
Tommy Pettersson <ptp@xxxxxxxxxxxxxx>**20060508101349]
[fix error is is_pipe test in error reporting. (fixes Issue160)
David Roundy <droundy@xxxxxxxxx>**20060501142114
The trouble was that Ian (quite naturally) assumed that my C function
stdout_is_a_pipe returned nonzero for true, whereas for some very, very
backwards reason it returned zero for true, and its result was properly
interpreted. So I caused this bug by my (unexplained) backwards
programming, but it was introduced when Ian refactored the C code. :(
]
[Add forgotten file umask.h.
Juliusz Chroboczek <jch@xxxxxxxxxxxxxx>**20060423174844]
[Add --umask to all commands that write to the current repository.
Juliusz Chroboczek <jch@xxxxxxxxxxxxxx>**20060407195655]
[Add option --umask.
Juliusz Chroboczek <jch@xxxxxxxxxxxxxx>**20060407194552]
[Actually switch umasks in withRepoLock.
Juliusz Chroboczek <jch@xxxxxxxxxxxxxx>**20060407194202]
[Implement withUMask.
Juliusz Chroboczek <jch@xxxxxxxxxxxxxx>**20060407193312]
[Add umask.c.
Juliusz Chroboczek <jch@xxxxxxxxxxxxxx>**20060407193255]
[Propagate opts to withRepoLock.
Juliusz Chroboczek <jch@xxxxxxxxxxxxxx>**20060325190622]
[Test pull.pl, CREATE_DIR_ERROR: removed TODO now that directory name is
printed in error message
Marnix Klooster <marnix.klooster@xxxxxxxxx>**20060304164033
Also removes a superfluous (and erroneous) chdir statement, which tried to
change to non-existing directory templ (last character was ell instead of one).
Also improves the description of this test.
]
[TAG 1.0.7pre1
Tommy Pettersson <ptp@xxxxxxxxxxxxxx>**20060427095905]
Patch bundle hash:
6f168408fa3d47af6591b20c0b61cf41b0343a07
_______________________________________________
darcs-devel mailing list
darcs-devel@xxxxxxxxx
http://www.abridgegame.org/cgi-bin/mailman/listinfo/darcs-devel
|