[MERGE][Take Five] Show the diff in the commit messages

Goffredo Baroncelli kreijack at tiscalinet.it
Wed Jul 25 23:05:21 BST 2007


On Monday 23 July 2007, you (Aaron Bentley) wrote:
> If you pass an encoding into make_commit_message_template, you can turn
> the status output into the correct encoding.  You can also pass the
> encoding into show_diff trees, so that it can emit the paths in the
> desired encoding.

Hi All,

With this enclosed bundle (the 5th version)
[...]
 if you would like to see the diff that will be committed as you edit the
 message you can use the ``--show-diff`` option to ``commit``. This will
 include the diff in the editor when it is opened, below the separator and the
 information about the files that will be committed. This means that you can
 read it as you write the message, but the diff itself wont be seen in the
 commit message when you have finished. If you would like parts to be
 included in the message you can copy and paste them above the separator.
[...]

I addressed most part of the raised concerns:
- After a lot of email/discussion/flame .... the diff is NOT encoded (except 
the pathname). The function make_commit_message_template() returns the 
message already encoded plus the diff as 8-bit raw data.
In order to do so, the output encoding is passed to: 
make_commit_message_template() and show_diff_trees ( and the _* variants ); 
moreover the function edit_commit_message() now accepts encoded text only.

- The switch --diff was renamed in --show-diff. (John)

- The code handles the (wrong) case where both --show-diff and -m or --file 
were passed. (Jhon)

- The patch include the addendum to the tutorial. (James)

- Added a test case (Aaron)

In the next weeks I will be on vacation... so If this patch will be reject 
another time, I will re-work on it on september.

Comments are welcome
Goffredo

-- 
gpg key@ keyserver.linux.it: Goffredo Baroncelli (ghigo) <kreijack at inwind.it>
Key fingerprint = CE3C 7E01 6782 30A3 5B87  87C0 BB86 505C 6B2A CFF9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bzr-ci---show-diff.bundle.diff
Type: text/x-diff
Size: 26711 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070726/31886f2f/attachment-0001.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070726/31886f2f/attachment-0001.pgp 


More information about the bazaar mailing list