[darcs-users] Re: [Haskell-cafe] fptools in darcs now available

zooko at zooko.com zooko at zooko.com
Fri Apr 29 10:26:10 EDT 2005


I wrote:

> You can currently do something like "darcs changes somepath" to get a list
> of patches that touched that file or directory.  You can then do "darcs pull
> -ppatchname" for each of those patches.  Of course, you can write a shell
> script to do that second step for each patch.  I've done things like this many
> times.
> 
> This is an example of what you call "splitting a repo", I guess.  It isn't
> that hard.

Oh, and I forgot to mention the even easier way.  If you are lucky enough to
have all of the patches that you *don't* want dependent on one patch...  For
example, suppose that there are two patches, one which creates "happy" and one
which creates "sad".  Now suppose all of the other patches in the repo added
files inside one or the other of these subdirectories but not both.

Then if you want just the happy parts and not the sad, you simply do this:

mkdir newhappyrepo ; cd newhappyrepo ; darcs init
darcs pull $origrepo

Now darcs will show you the patch that adds "happy", asking if you want that
patch.  You hit 'y'.  Now darcs will show you the patch that adds "sad",
asking if you want that patch.  You hit 'n'.  Now darcs will show you *only*
patches which did not add anything into sad.  So you can hit 'a' to get all
remaining patches.

Regards,

Zooko



More information about the Haskell-Cafe mailing list