[qbzr] qcommit: support for templates/drafts of commit message?
Alexander Belchenko
bialix at ukr.net
Thu Apr 29 16:00:53 BST 2010
Gary van der Merwe пишет:
> On 29/04/2010 15:00, Andrew Bennetts wrote:
>> Alexander Belchenko wrote:
>> [...]
>>>> It seems bzr has some sort of the hooks to get the message template.
>>>> http://doc.bazaar.canonical.com/bzr.2.1/en/user-reference/hooks-help.html#commit-message-template
>>>>
>>>>
>>>> Maybe we need to use that hook in qcommit?
>>> Quick chat with Jelmer and Andrew in #bzr reveals that this hook is
>>> CLI-only thing and should be used only when actual commit is
>>> started. Therefore we can't use it.
>>>
>>> Should we invent our own hook? Why not?
>> (I think the claim that it is CLI-only is too strong, as I tried to
>> explain on IRC.)
>>
>> Jelmer's suggestion that you propose an interface for the hook that
>> you'd like to use is a good one. It will help us understand your
>> requirements better, specifically exactly what information you feel
>> should be available to the hook to help it generate the template.
>>
>> -Andrew.
>
>
> I've allready been down this road. Please see
> lp:~garyvdm/qbzr/read_commit_message_hook.
>
> It works with the bzr-builddeb message template, but not with the news
> template.
>
> The commit-message-template gets passed a commit object. This is not
> available to qcommit when the template message is need. I've
> reimplemented some of this object in qbzr.lib.commit.MockCommitObj to
> get the builddeb template to work, but the news template uses stuff that
> I have not implemented.
>
> Ideally, commit-message-template should not be passed a commit object,
> rather arguments that qcommit can easily provide, e.g:
> * list of files to be commit/excluded
> * old tree,
> * new tree,
> * method to get delta
>
> These are provided in the commit object, but in a fashion that is
> difficult to reproduce.
>
> Previous discussion:
> https://lists.ubuntu.com/archives/bazaar/2009q3/062169.html
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.
--
All the dude wanted was his rug back
More information about the bazaar
mailing list