On Tue, Sep 09, 2008 at 12:06:29PM -0400, David Roundy wrote:
> The problem here is that the type of sequenceRepls is wrong--I hadn't
> looked carefully at that code previously. You're making it always
> create patches that start at the unrecorded state, but that's not what
> it's actually doing (or so we hope). All we need to do is to
> eliminate the Repository argument from sequenceRepls, and the problem
> is fixed.
>
> I'm attaching a patch that does this.
Ooops, I forgot to attach it, I think... here it is.
David
Tue Sep 9 12:00:59 EDT 2008 David Roundy <[EMAIL PROTECTED]>
* clean up Replace a bit.
This doesn't remove any unsafeCoercePs (since Jason already did that),
but does build up patches in order from Sealed patches, as is best
practice.
New patches:
[clean up Replace a bit.
David Roundy <[EMAIL PROTECTED]>**20080909160059
This doesn't remove any unsafeCoercePs (since Jason already did that),
but does build up patches in order from Sealed patches, as is best
practice.
] hunk ./src/Darcs/Commands/Replace.lhs 29
import Darcs.Commands
import Darcs.Arguments
-import Darcs.Repository ( Repository, ($%), withRepoLock, rIO, getRepository,
+import Darcs.Repository ( ($%), withRepoLock, rIO, getRepository,
add_to_pending,
amInRepository, slurp_recorded_and_unrecorded,
applyToWorking,
hunk ./src/Darcs/Commands/Replace.lhs 141
checkToken old
checkToken new
(cur, work) <- slurp_recorded_and_unrecorded repository
- Sealed pswork <- sequenceRepls repository toks cur work fs
+ Sealed pswork <- sequenceRepls toks cur work fs
add_to_pending repository pswork
applyToWorking repository opts pswork `catch` \e ->
fail $ "Can't do replace on working!\n"
hunk ./src/Darcs/Commands/Replace.lhs 148
++ "Perhaps one of the files already contains '"++ new++"'?\n"
++ show e
where ftf _ = TextFile
- sequenceRepls :: Repository p C(r u t) -> String -> Slurpy
+ sequenceRepls :: String -> Slurpy
-> Slurpy -> [SubPath] -> IO (Sealed (FL Prim C(u)))
hunk ./src/Darcs/Commands/Replace.lhs 150
- sequenceRepls _ _ _ _ [] = return $ seal NilFL
- sequenceRepls r toks cur work (s:ss) = do x <- repl toks cur work s
- Sealed xs <- sequenceRepls r toks cur work ss
- case x of
- Nothing -> return $ seal xs
- Just x' -> return $ seal (x'+>+xs)
+ sequenceRepls _ _ _ [] = return $ seal NilFL
+ sequenceRepls toks cur work (s:ss) = do Sealed x <- repl toks cur work s
+ Sealed xs <- sequenceRepls toks cur work ss
+ return $ seal (x+>+xs)
hunk ./src/Darcs/Commands/Replace.lhs 155
- repl :: String -> Slurpy -> Slurpy -> SubPath -> IO (Maybe (FL Prim C(x y)))
+ repl :: String -> Slurpy -> Slurpy -> SubPath -> IO (Sealed (FL Prim C(x)))
repl toks cur work f
| not $ slurp_hasfile (sp2fn f) work =
do putStrLn $ "Skipping file '"++f_fp++"' which isn't in the repository."
hunk ./src/Darcs/Commands/Replace.lhs 159
- return Nothing
+ return $ seal NilFL
| ForceReplace `elem` opts ||
isJust (apply_to_slurpy (tokreplace f_fp toks old new) work) ||
isJust (apply_to_slurpy (tokreplace f_fp toks old new) cur) =
hunk ./src/Darcs/Commands/Replace.lhs 163
- return $ Just $ get_force_replace f toks work
+ return $ seal $ get_force_replace f toks work
| otherwise =
do putStrLn $ "Skipping file '"++f_fp++"'"
putStrLn $ "Perhaps the recorded version of this " ++
hunk ./src/Darcs/Commands/Replace.lhs 168
"file already contains '" ++new++"'?"
- return Nothing
+ return $ seal NilFL
where f_fp = toFilePath f
get_force_replace :: SubPath -> String -> Slurpy -> FL Prim C(x y)
Context:
[add ($%) to help with RIO refactor on ghc versions < 6.8
Jason Dagit <[EMAIL PROTECTED]>**20080908235119]
[changes to Replace.lhs
Jason Dagit <[EMAIL PROTECTED]>**20080908220925]
[changes to Remove.lhs
Jason Dagit <[EMAIL PROTECTED]>**20080908220918]
[changes to Mv.lhs
Jason Dagit <[EMAIL PROTECTED]>**20080908220910]
[fixes to Changes.lhs
Jason Dagit <[EMAIL PROTECTED]>**20080908220900]
[fixes to Add.lhs
Jason Dagit <[EMAIL PROTECTED]>**20080908220841]
[remove unsafeCoerceP from Changes.lhs
Jason Dagit <[EMAIL PROTECTED]>**20080905202619]
[remove unsafeCoerceP from Add.lhs
Jason Dagit <[EMAIL PROTECTED]>**20080905195744]
[fix conflicts in ShowRepo and Repair
Jason Dagit <[EMAIL PROTECTED]>**20080905024352]
[add more modules to witnesses target
Jason Dagit <[EMAIL PROTECTED]>**20080904011155]
[make Convert.lhs compile with type witnesses
Jason Dagit <[EMAIL PROTECTED]>**20080904010309]
[make Changes.lhs compile with type witnesses
Jason Dagit <[EMAIL PROTECTED]>**20080904010201]
[make Get.lhs compile with type witnesses
Jason Dagit <[EMAIL PROTECTED]>**20080904010006]
[make Diff.lhs compile with type witnesses
Jason Dagit <[EMAIL PROTECTED]>**20080904005955]
[make Apply.lhs compile with type witnesses
Jason Dagit <[EMAIL PROTECTED]>**20080904005855]
[make AmendRecord.lhs compile with type witnesses
Jason Dagit <[EMAIL PROTECTED]>**20080904005830]
[make MarkConflicts.lhs compile with type witnesses
Jason Dagit <[EMAIL PROTECTED]>**20080904005744]
[make Init.lhs compile with type witnesses
Jason Dagit <[EMAIL PROTECTED]>**20080904005556]
[make Mv.lhs compile with type witnesses
Jason Dagit <[EMAIL PROTECTED]>**20080904005249]
[make ShowRepo.lhs compile with type witnesses
Jason Dagit <[EMAIL PROTECTED]>**20080904005209]
[make Add.lhs compile with type witnesses
Jason Dagit <[EMAIL PROTECTED]>**20080904004052]
[make make_changelog.hs compile with type witnesses
Jason Dagit <[EMAIL PROTECTED]>**20080904002710]
[make ShowFiles.lhs compile with type witnesses
Jason Dagit <[EMAIL PROTECTED]>**20080827164821]
[make Optimize.lhs compile with type witnesses
Jason Dagit <[EMAIL PROTECTED]>**20080903174043]
[make Pull.lhs compile with type witnesses
Jason Dagit <[EMAIL PROTECTED]>**20080903074801]
[make Push.lhs compile with type witnesses
Jason Dagit <[EMAIL PROTECTED]>**20080903072500]
[make Put.lhs compile with type witnesses
Jason Dagit <[EMAIL PROTECTED]>**20080903064514]
[make Remove.lhs compile with type witnesses
Jason Dagit <[EMAIL PROTECTED]>**20080827164719]
[make Repair.lhs compile with type witnesses
Jason Dagit <[EMAIL PROTECTED]>**20080903062125]
[make Check.lhs compile with type witnesses
Jason Dagit <[EMAIL PROTECTED]>**20080903053105]
[make Replace.lhs compile with type witnesses
Jason Dagit <[EMAIL PROTECTED]>**20080903033924]
[make Revert.lhs compile with type witnesses
Jason Dagit <[EMAIL PROTECTED]>**20080903025549]
[make Send.lhs compile with type witnesses
Jason Dagit <[EMAIL PROTECTED]>**20080903025000]
[make Record.lhs compile with type witnesses
Jason Dagit <[EMAIL PROTECTED]>**20080903024122]
[make TrackDown.lhs compile with type witnesses
Jason Dagit <[EMAIL PROTECTED]>**20080903020506]
[make Unrecord.lhs compile with type witnesses
Jason Dagit <[EMAIL PROTECTED]>**20080903012152
This required a few small changes in Rollback as well. Updated
the makefile to add Unrecord to witnesses target.
]
[updates in Patch.lhs to support type witness refactor in commands
Jason Dagit <[EMAIL PROTECTED]>**20080827165113]
[rename get_patches_beyond_tag and add more typeful version
Jason Dagit <[EMAIL PROTECTED]>**20080903002328
This is a refactor that will make it easier to update some commands
to use type witnesses.
]
[updates to Darcs.Match to support type witness refactor of various commands
Jason Dagit <[EMAIL PROTECTED]>**20080827164909]
[Begin using RIO
Jason Dagit <[EMAIL PROTECTED]>**20080902232458]
[Documentation for -[-no]-http-pipelining options.
Dmitry Kurochkin <[EMAIL PROTECTED]>**20080909063743]
[Space in Darcs.Arguments module.
Dmitry Kurochkin <[EMAIL PROTECTED]>**20080909062824]
[Move network related options to network_options.
Dmitry Kurochkin <[EMAIL PROTECTED]>**20080909062429]
[Do no word splitting after expansion in pwd-based shell tests.
Eric Kow <[EMAIL PROTECTED]>**20080908174948
Lest darcs/Cygwin be confused by spaces in the pwd output.
]
[don't define pipeliningLimit if we don't use it.
David Roundy <[EMAIL PROTECTED]>**20080908221625]
[Add -[-no]-http-pipelining options, disable pipelining by default for curl < 7.19.1.
Dmitry Kurochkin <[EMAIL PROTECTED]>**20080908175726]
[Resolve issue1063: Wrap pwd in cygpath in shell tests.
Eric Kow <[EMAIL PROTECTED]>**20080908140640
This is so that we can run the test suite under Cygwin.
Solution by Zooko.
]
[Apply Eric suggestions on tests/binary.sh
Nicolas Pouillard <[EMAIL PROTECTED]>**20080907160645]
[Remove old ChangeLog entries (before 2.0.2).
Eric Kow <[EMAIL PROTECTED]>**20080908125545]
[Replace old ChangeLog entries for 1.0.3rc1.
Eric Kow <[EMAIL PROTECTED]>**20080908124213
I think my previous patch to avoid re-computing the ChangeLogs must
have overwritten these hand-written (?) logs with automated ones.
This patch ensures that the ChangeLog people see does not change.
]
[Do not recompute ChangeLogs from darcs 2.0.2 or before.
Eric Kow <[EMAIL PROTECTED]>**20080907145921]
[Make binary.sh test more robust wrt spaces in filenames.
Eric Kow <[EMAIL PROTECTED]>**20080907143929]
[Add a test for binary patch files.
Nicolas Pouillard <[EMAIL PROTECTED]>**20080907103816]
[Update the memo about running test at record time
Nicolas Pouillard <[EMAIL PROTECTED]>**20080906143815]
[No -v option to cp(1)
Matthias Kilian <[EMAIL PROTECTED]>**20080906121437
This option isn't POSIX and doesn't exist on all operating systems.
]
[Fix the gzip test for OpenBSD's gzip
Matthias Kilian <[EMAIL PROTECTED]>**20080906115507
OpenBSD's gzip(1) doesn't understand long options. Also, it doesn't
like to deal with files that don't have a .gz extension, so let it
read from stdin. Note: the for look isn't strictly necessary here
(there's only one file matching), but I think it's better style.
]
[update web page to point at both stable and unstable branches.
David Roundy <[EMAIL PROTECTED]>**20080906120322
This is mostly a gratuitous change, so I'll have something to push in order
to make sure the unstable branch infrastructure is working.
]
[bug fix for amend-cancelling.sh test
Jason Dagit <[EMAIL PROTECTED]>**20080905194544]
[add test for amending a depended upon patch
Jason Dagit <[EMAIL PROTECTED]>**20080905192942
Due to a buggy refactor of with_selected_patch_from_repository
it is possible to make amend-record hit an impossible case. This
is a test for that case.
]
[URL.hs: print debug message when wait_next_url starts.
Dmitry Kurochkin <[EMAIL PROTECTED]>**20080904133048]
[URL.hs: fix race condition in copyUrlWithPriority and waitUrl.
Dmitry Kurochkin <[EMAIL PROTECTED]>**20080903195254]
[Fix advice to get QuickCheck 2.
Eric Kow <[EMAIL PROTECTED]>**20080905161051]
[revise advice to indicate darcs check over make disttest.
David Roundy <[EMAIL PROTECTED]>**20080905153056
make disttest has the unfortunate side-effect of ruining your current
configuration, if you happen to be using something like
--with-libwww.
]
[Add Repository IO monad, RIO.
Jason Dagit <[EMAIL PROTECTED]>**20080902232331]
[Makefile: offer advice on record --no-test
Eric Kow <[EMAIL PROTECTED]>**20080905121952]
[Switch test pref to make disttest.
Eric Kow <[EMAIL PROTECTED]>**20080905114335]
[Allow make disttest to run without the configure script being present.
Eric Kow <[EMAIL PROTECTED]>**20080905114156
This is to prepare it for use as the darcs test pref.
]
[Resolve issue1050: Disable haskeline by default.
Eric Kow <[EMAIL PROTECTED]>**20080905113251
We should revisit this when the Haskeline bug in question is fixed.
]
[Resolve issue924: test for QuickCheck2 in disttest
Eric Kow <[EMAIL PROTECTED]>**20080905111647]
[Makefile: Tidy up disttest.
Eric Kow <[EMAIL PROTECTED]>**20080905105921]
[relocate issue1057.sh to bugs/.
David Roundy <[EMAIL PROTECTED]>**20080904224145]
[Test for issue 1057: pull fails to report "Can't pull from current repository" when pulling via symbolic link
[EMAIL PROTECTED]
[Remove [DarcsFlag] use in (most of) HashedIO, HashedRepo API.
[EMAIL PROTECTED]
[Remove a few unused [DarcsFlag] parameters from HashedRepo and Repository.Internal.
[EMAIL PROTECTED]
[Replace [DarcsFlag] with Compression in HashedIO Slurpy.
[EMAIL PROTECTED]
[Add data Compression to Darcs.Flags.
[EMAIL PROTECTED]
[Replace Maybe Bool with custom tri-state type in patch selection code.
Eric Kow <[EMAIL PROTECTED]>**20080904173650
Hopefully this makes things a bit more readable.
]
[Roundup integration: avoid changing the bug topic.
Eric Kow <[EMAIL PROTECTED]>**20080903221859
The previous behaviour made it difficult to search the bug tracker
because the topic would change to the patch name. Perhaps it would
be more useful for future searching if the topic remained untouched.
]
[Provide DARCS_KEEP_TEMPDIR hint in testing README.
Eric Kow <[EMAIL PROTECTED]>**20080831115908]
[Haddock speculateFileUsingCache.
[EMAIL PROTECTED]
[Remove the obsolete release/debian stuff.
[EMAIL PROTECTED]
[Refactor Cache's handling of hashed paths. No functional change.
[EMAIL PROTECTED]
Factored out the filepath building to a single place. This also led to folding
the explicit pattern matches on writability into a predicate, since the other
components of a CacheLoc are no longer useful in the function bodies.
]
[convert mv.pl into shell.
David Roundy <[EMAIL PROTECTED]>**20080902194056]
[clean up ShowRepo a tad.
David Roundy <[EMAIL PROTECTED]>**20080902152652]
[resolve issue1015: workaround internal API change on Windows in GHC 6.8.3
Ganesh Sittampalam <[EMAIL PROTECTED]>**20080901223420]
[add another debug message.
David Roundy <[EMAIL PROTECTED]>**20080902144814]
[fix bug in handling of corrupted pending file, and in test.
David Roundy <[EMAIL PROTECTED]>**20080902144450
Our test was wrong, and our repair wasn't smart enough to find this.
Recent fixes in repair by Petr revealed this bug, which allowed darcs
to record a corrupt patch if users manually corrupted the pending
file. I fixed the test (and translated it to bash), and also fixed
the bug by making darcs rename the pending file as soon as it notices
it is broken. This may not be the most robust solution (it might be
better to just exit with failure), but it is much better than
corrupting the recorded state.
]
[add type witnesses to new functions.
David Roundy <[EMAIL PROTECTED]>**20080902145440]
[Make clean_hashdir take a list of root hashes and use it in repair.
[EMAIL PROTECTED]
We use this functionality to keep two possibly distinct pristine trees while
repairing, both living in a single pristine.hashed directory.
]
[Add HashedRepo.readHashedPristineRoot.
[EMAIL PROTECTED]
[Make the "hashed" repair use pristine.hashed for its work.
[EMAIL PROTECTED]
We rely on HashedIO reliability to simplify repair to work inside the existing
pristine.hashed. When running on old-fashioned (darcs 1) repositories, we
temporarily create pristine.hashed, use it to check (and possibly replace) the
old-fashioned pristine and finally we remove it again.
]
[Add Repository.replacePristineFromSlurpy.
[EMAIL PROTECTED]
[Resolve conflicts.
[EMAIL PROTECTED]
[Fix checkPristineAgainst{Cwd,Slurpy}: we ignored files missing in pristine.
[EMAIL PROTECTED]
Add LookForAdds to smart_diff options to fix that and also throw in IgnoreTimes
for a good measure and extra paranoia.
]
[Only "update" (sync to disk) the slurpy every 100 patches.
[EMAIL PROTECTED]
[First working (albeit slow) version of repair that uses hashed newpristine.
[EMAIL PROTECTED]
[Add Repository.checkPristineAgainstSlurpy.
[EMAIL PROTECTED]
[Haddock the {slurp,write,sync}HashedPristine functions in HashedIO.
[EMAIL PROTECTED]
[Change type of subdir parameter in Cache/HashedIO functions from String to HashedDir.
[EMAIL PROTECTED]
This refactor should make calling the Cache and HashedIO functions safer: you
should be no longer able to swap hash and subdir accidentally in the call site,
or mistype the subdirectory name.
]
[Rename hashSlurped, slurpHashed and syncHashed to writeHashedPristine, slurpHashedPristine and syncHashedPristine, respectively.
[EMAIL PROTECTED]
[autoconf terminfo support
Ganesh Sittampalam <[EMAIL PROTECTED]>**20080901060519]
[Optionally replace curses binding with "terminfo" from hackage.
[EMAIL PROTECTED]
[Resolve issue1037: compile with -D_REENTRANT.
Dmitry Kurochkin <[EMAIL PROTECTED]>**20080901175738]
[add makefile target "disttest" which does the script currently stored in _darcs/prefs/prefs
[EMAIL PROTECTED]
This way other things such as buildbot can easily run the same tests as _darcs/prefs/prefs does.
It is named "disttest" because it is analogous to "distclean" inasmuch as it blows away your object files and changes your ./configure.
Also remove an obsolete .PHONY target.
]
[add fortran .mod files to boring.
David Roundy <[EMAIL PROTECTED]>**20080901141647]
[resolve issue1049: undo lazy patch bundle scanning.
David Roundy <[EMAIL PROTECTED]>**20080901135717]
[tests: quote the repo variable in mv.pl so that the test will work when PWD has a space in it
[EMAIL PROTECTED]
[tests: silence unnecessary warning output from running tests
[EMAIL PROTECTED]
[ChangeLog entries: ignore a minor patch which has the string "warning" in it
[EMAIL PROTECTED]
[ChangeLog entries: ignore all patches with the string "ChangeLog entries" in them when generating ChangeLog entries
[EMAIL PROTECTED]
ChangeLog entries
:-)
]
[ChangeLog entries: ignore a minor patch which includes the name "warning" because it makes buildbot think that the build step is emitting a compiler warning
[EMAIL PROTECTED]
[resolve issue844: darcs doesn't guarantee always to compress patches.
David Roundy <[EMAIL PROTECTED]>**20080901134631]
[Add test case for issue844.
Eric Kow <[EMAIL PROTECTED]>**20080830230909]
[Fixed typo: "view this patch in *fill with the pager".
Alex Lance <[EMAIL PROTECTED]>**20080901052559]
[don't show ssh stderr output unless we're passed --debug.
David Roundy <[EMAIL PROTECTED]>**20080831200751
Also fix the incorrect comment that often incorrectly declares that the
server is running an older version of darcs.
]
[fix bug in --list-options (tab completion).
David Roundy <[EMAIL PROTECTED]>**20080830195051]
[fix bug in makeRelative.
David Roundy <[EMAIL PROTECTED]>**20080830174722]
[add warning to configure about Haskell zlib speed
Ganesh Sittampalam <[EMAIL PROTECTED]>**20080830013457]
[make use of Haskell zlib dependent on bytestring
Ganesh Sittampalam <[EMAIL PROTECTED]>**20080829221605]
[clean up network/get.sh test.
David Roundy <[EMAIL PROTECTED]>**20080824190916]
[add option to use Haskell zlib package
Ganesh Sittampalam <[EMAIL PROTECTED]>**20080829203032]
[Remove unused FileSystem module.
Eric Kow <[EMAIL PROTECTED]>**20080822151214]
[Add a link to a repository browser for darcs's code.
Eric Kow <[EMAIL PROTECTED]>**20080829144357]
[Replace grep invocation by perl code
[EMAIL PROTECTED]
[fix type of withRepository and friends.
David Roundy <[EMAIL PROTECTED]>**20080828181834]
[fix recent bug in --list-options.
David Roundy <[EMAIL PROTECTED]>**20080828162707]
[Check for package random on windows, used in Ssh module.
Dmitry Kurochkin <[EMAIL PROTECTED]>**20080828091554]
[Debug messages in curl module.
Dmitry Kurochkin <[EMAIL PROTECTED]>**20080827222845]
[Use InclusiveOrExclusive instead of Bool in apply_inv_to_matcher.
Dmitry Kurochkin <[EMAIL PROTECTED]>**20080827201820]
[Refactor get_matcher and apply_inv_to_matcher functions from Darcs.Match module.
Dmitry Kurochkin <[EMAIL PROTECTED]>**20080827105843]
[Resolve issue966: fix apply_inv_to_matcher_inclusive.
Dmitry Kurochkin <[EMAIL PROTECTED]>**20080827091833]
[Simplify withCurrentDirectory.
Dmitry Kurochkin <[EMAIL PROTECTED]>**20080823004712]
[TAG working version.
David Roundy <[EMAIL PROTECTED]>**20080828131617]
Patch bundle hash:
4594d32b52803d1c60dee64626ff21bdb87d2096
_______________________________________________
darcs-users mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-users