[darcs-users] Re: Browsing the repository from the command line

David Roundy droundy at abridgegame.org
Wed Mar 3 12:13:43 UTC 2004


On Tue, Mar 02, 2004 at 06:25:14PM +0100, Samuel Tardieu wrote:
> >>>>> "David" == David Roundy <droundy at abridgegame.org> writes:
> 
> David> If you do work on this, you'd definitely want to support the
> David> --unified flag, which would involve using contextualPrintPatch.
> 
> More easy to say than to do :-) You need a slurp to use
> contextualPrintPatch. What if the patch doesn't apply cleanly? What copy
> do you start with?

Yeah, certainly unified would be a bit of a pain.  I had forgotten about
the slurpy requirement.  But when running show on local patches, it should
be *too* hard.  You just need to start with slurp_recorded, and
apply_to_slurpy inverse patches until you get to the patch you want to
disply.  (Note that this is not a particularly *smart* way to do this,
since it stores the contents of all files modified since the patch you're
looking at.)  But definitely not a job for a new haskell programmer who's
never coded with darcs before...

> Well, I may have overlooked it, but if this is easy, you should add
> --unified to push and pull as well :-)

Yeah, I've been wanting to do that, but have been held of by the annoyance
of getting the slurpy right... :) For the push, at least, it shouldn't be
hard (since the patches to be displayed are local).  Even for a pull, the
context is known, so it *shouldn't* be too hard.  Probably I should add to
Repository a function to retrieve a slurpy based on a given context... or
perhaps a version of get_common_and_uncommon that also gives associated
(lazily constructed, of course) slurpies.
-- 
David Roundy
http://www.abridgegame.org




More information about the darcs-users mailing list