[qbzr] qcommit: support for templates/drafts of commit message?

Gary van der Merwe garyvdm at gmail.com
Mon May 17 08:55:41 BST 2010


On 17/05/2010 07:14, Ian Clatworthy wrote:
> On 30/04/10 07:02, Gary van der Merwe wrote:
>> On Thu, Apr 29, 2010 at 5:00 PM, Alexander Belchenko<bialix at ukr.net> 
>> wrote:
>>> OK, I've re-read that old discussion and it seems I'm kicking the dead
>>> horse. Therefore any attempts to change the signature of the hook is
>>> useless.
>>
>> Good thing to discuss at UDS.
> 
> Did this get discussed at UDS after all? If so, what was the outcome?
> 
> Ian C.

Hi Ian

I chatted to Robert about this, and he convinced me that I should just
use a real commit object. I had not taken some complexities in to
account, for example filters.

I thought that the commit object would write some things to disk before
committing the transaction. I have been assured that this is not the
case, and so it would be safe to create a commit object, get the message
template, and then discard the commit object. There would be some areas
for optimization, for example, the tree widget could get the delta from
the commit object to avoid duplication.

I explain how I plan solve the difference between the cli commit, and
qcommit, i.e. that you have to select the files before editing the
message in the cli commit, but in qcommit, you can switch between file
selection, and message editing. I have explained this in a previous
mail, but I'll repeat it for you convince.

The first time that I get the message template, I store it as a base
template. If we have to get the template again, so because the file
selection changed, I do a 3 way merge, with the current text as this,
the new template as other. I have a prof of concept of this in this
branch: lp:~garyvdm/qbzr/read_commit_message_hook . It has some rough
edges that need to be fixed, such as the merge conflicts way to easily
for the particular use case.

Regards,

Gary

Ps, great to have you back online and kicking Ian :-)



More information about the bazaar mailing list