[darcs-users] Some crazy idea

David Roundy droundy at abridgegame.org
Wed Nov 17 11:31:14 UTC 2004


(I'm doing a bit of going over old mail that I never responded to...)

On Tue, Sep 07, 2004 at 10:43:10PM +0200, Tomasz Zielonka wrote:
> When using 'record', darcs asks which patches to include in the named
> patch. Sometimes I find that asking about individual hunks is not
> enough. It's not uncommon that I want to split changes from a single
> hunk to different recorded patches. Right now the only solution is to
> undo some of the changes (eg. in editor), record, redo the changes,
> record again.
> 
> I think that a potential general solution to such problems would be an
> option to record allowing to specify *any* patch.  One would use it like
> this: 
>     darcs whatsnew > file
>     edit file
>     darcs record --override-patch=file
> 
> It would probably be necessary to check that the supplied patch is
> compatible with the repository, but the mechanism coult give a fair
> degree of freedom. I imagine that such a simple interface would allow
> creating very flexible GUI change select tools.
> 
> However, I fear it would conflict in some way with other darcs
> mechanism, like automatic tests after records, etc.

I think this would work fine.  Darcs can check that the patch applies
cleanly, so it could pretty easily be made "safe".  The tests and stuff
would all be fine, since they are done after the set of changes is
selected.

Another possibility (which wouldn't interact so well with gui tools) would
be to allow the user to pop up a text editor on the files while selecting
changes, with the text editor opening up a temporary copy of the file, so
your changes would go into the recorded patch, but not modify the working
directory.
-- 
David Roundy
http://www.darcs.net




More information about the darcs-users mailing list