[darcs-users] More questions about the code (coslurpy and ./)
yarcs at qualitycode.com
Tue Nov 18 16:30:11 UTC 2003
David Roundy wrote:
> No, not quite. The filepaths in a slurpy are always relative, so coslurp
> is generally used to slurp a completely different set of files, which have
> the same relative names. So to compare the contents of old/ and new/
> (assuming no files were added or renamed), you'd run
> o <- slurp "old"
> n <- so_slurp o "new"
> (then compare o and n, which will refer to completely different files)
Ah, right. So to do a 'whatsnew' you would do something like this (which
is probably grossly over-simplified, but hopefully expresses the core):
s = slurp "_darcs/current"
apply "pending" patches to s
s2 = coslurp "." filtering by s
The s2 coslurp would only slurp files from "." that have corresponding
files in s. Report the diff of file contents between s and s2, along
with all the changes in pending, and any files missing in s2 that
existed in s.
This begins to explain why --look-for-adds is not the default, which
surprised me, and which I still struggle with sometimes. Two asides on
1. Any unrecognized options should cause darcs to quit with an error. I
misspelled this option once, and was puzzled for a bit.
2. There doesn't seem to be a way to invert an option. So if I put
--look-for-adds in my prefs, is there a way to run a single command
without that option, by putting something on the command line?
P.S. I have to say, I'm really enjoying working with darcs. So far, I've
only used it on a simple, single-user, no-branching project. But it is
way simpler and feels way cleaner than CVS (and certain other advanced
I can hardly wait to start taxing the real power of darcs.
More information about the darcs-users