Show More
@@ -418,6 +418,28 b' one shown by default::' | |||
|
418 | 418 | "HG: removed {file}\n" }{if(files, "", |
|
419 | 419 | "HG: no files changed\n")} |
|
420 | 420 | |
|
421 | ``diff()`` | |
|
422 | String: show the diff (see :hg:`help templates` for detail) | |
|
423 | ||
|
424 | Sometimes it is helpful to show the diff of the changeset in the editor without | |
|
425 | having to prefix 'HG: ' to each line so that highlighting works correctly. For | |
|
426 | this, Mercurial provides a special string which will ignore everything below | |
|
427 | it:: | |
|
428 | ||
|
429 | HG: ------------------------ >8 ------------------------ | |
|
430 | ||
|
431 | For example, the template configuration below will show the diff below the | |
|
432 | extra message:: | |
|
433 | ||
|
434 | [committemplate] | |
|
435 | changeset = {desc}\n\n | |
|
436 | HG: Enter commit message. Lines beginning with 'HG:' are removed. | |
|
437 | HG: {extramsg} | |
|
438 | HG: ------------------------ >8 ------------------------ | |
|
439 | HG: Do not touch the line above. | |
|
440 | HG: Everything below will be removed. | |
|
441 | {diff()} | |
|
442 | ||
|
421 | 443 | .. note:: |
|
422 | 444 | |
|
423 | 445 | For some problematic encodings (see :hg:`help win32mbcs` for |
General Comments 0
You need to be logged in to leave comments.
Login now