Commit Graph

3 Commits

Author SHA1 Message Date
Yuya Nishihara
20d3269298 log: fix status template to list copy source per dest (issue5155)
Before, copied files were assumed as "A" (added) and listed followed by
non-copy added files. This could double entries of a copy if it had "M"
(modified) state.

So, this patch makes the template check if a file is included in copies dict.
This way, entries should never be doubled.

The output of "log -Tstatus -C" does not always agree with "status -C --change"
due to the bug of "status", which is documented in test-status.t. See also
21a68fa3c757.
2016-03-24 22:55:56 +09:00
Yuya Nishihara
35e047f889 templates: fix missing closing brace in map-cmdline.status
Currently the parser does not validate the last closing brace, but future
patches will make it less permissive for this kind of syntax errors.
2015-06-18 23:08:27 +09:00
Jordi Gutiérrez Hermoso
da35c599bb log: add a status template
It appears that git users like having a --name-status option on `git
log`. There exist at least three questions on StackOverflow on how to
do this for hg. The desired output is not difficult to build with
templates, and since this is something that svn users might also want,
it seems desirable to have this as another standard template.

This mimics the output of `hg status` and adds it to the log output.
It also follows status's convention of displaying copies with a -C
option. Brief example:

    $ hg log -T status -C
    changeset:   24883:7d1b9b7ac9fd
    bookmark:    statustemplate
    tag:         tip
    parent:      24864:a08f05e3a9cf
    user:        Jordi Gutiérrez Hermoso <jordigh@octave.org>
    date:        Wed Apr 22 14:05:04 2015 -0400
    summary:     log: add a status template
    files:
    A added
    A copied
      original
    M modified
    R removed

Of course, everything is also coloured correctly, and there are tests
to prove it.
2015-05-10 14:04:43 -04:00