[darcs-users] unrecord --matches and --patches (was: Re: Feature Request: darcs unrecord --all)

Jamie Webb j at jmawebb.cjb.net
Sat Feb 26 02:24:36 UTC 2005


On Sat, Feb 26, 2005 at 01:15:19AM +0000, Mark Stosberg wrote:
> > My test script runs |darcs record -a -m "auto"| before starting the
> > tests. Once I've got a feature working, I would like to be able to run
> >|darcs unrecord --all --patch=auto| to have darcs remove all of the
> > temporary "auto" patches. Then I can do a proper record to create the
> > new patch which can then be pushed to the master repo.
> >
> > Does anyone care to comment on this type of feature?
> > Would this option be useful to anyone else?
> 
> I think this is a reasonable idea.
> 
> First, I think that '--matches' and '--patches' need to be added, 
> which are standard ways to select multiple patches. In fact, these 
> options imply you want 'all' the matches, not just one. So the "--all"
> command may not be needed. 
> 
> I have one question about the interface of it.
> 
> With record --all, there is no confirmation.
> 
> However, Using 'unrecord' causes data loss of the individual patches,
> (although not the code in the working directory). So perhaps it deserves
> a confirmation.
> 
> If so, should it be a simple 'yes/no' confirmation, or should it show
> the full list of patches that match? 

How about changing the regular behaviour to prompt the same way as
push and pull? I.e. one has to respond to [ynWvxqadjk?] for each
matching patch (or all of them if no filter is supplied), and so to
get the current behaviour would hit 'yd'. The same applies to unpull.
That would be both more consistent and more flexible. Probably to
protect against accidental hitting of 'a' (or --all), unpull and
unrecord should then have the extra confirmation that revert has (and
I think it would be nice if revert also summarised the changes to be
made as part of that prompt).

Given the infrequency with which those commands are used, I don't
think the extra typing for the simple case would be too onerous if it
sometimes saved running the same command 20 times.

-- Jamie Webb




More information about the darcs-users mailing list