[PATCH 2 of 2] qseries: add --edit option for editing .hg/patches/series

Mads Kiilerich mads at kiilerich.com
Fri Apr 30 19:16:48 CDT 2010


>
> On Thursday, 29 April 2010 at 21:54, Dirkjan Ochtman wrote:
>    
>> On Thu, Apr 29, 2010 at 13:31, Martin Geisler<mg at aragost.com>  wrote:
>>      
>>> Verify that the file can still can be parsed and that the user hasn't
>>> reordered patches that are currently applied. Something like that.
>>>        
>> That sounds nice, but I'd be happy to just take this for now and have
>> that added later.
>>
>>      
>>> I don't know what would be a good command line interface for this.
>>>        
>> I think it's not very trivial, and I think just invoking the editor on
>> series is kind of nice and simple.
>>      
> I don't think I agree. It's pretty easy to screw up your patch series
> by misediting the series file. Adding this flag encourages monkeying
> with the file.
>
>    

But ... sometimes the series file has to be monkeyed anyway. The 
proposed qpush --move might be usable in some situations, but it is not 
an efficient and sufficient UI for all tasks.

> I think the editor ought to launch on a _copy_ of the series file, and
> verify after editing that the series file contains the same set of
> patches that it did before, and that no applied patches have changed
> order, at the very least.
>    

That would be easy to add, but sometimes other changes than reordering 
are done, so I'm not sure it would be nice to work with. Examples could 
be to disable patches by prefixing them with # (which often is simpler 
than using guards), or to mass-remove or -add guards.

And what should it do after an invalid edit? Just drop the changes? 
Prompt the user and open the editor again?

/Mads


More information about the Mercurial-devel mailing list