diff --git a/mercurial/templates/map-cmdline.status b/mercurial/templates/map-cmdline.status --- a/mercurial/templates/map-cmdline.status +++ b/mercurial/templates/map-cmdline.status @@ -8,18 +8,13 @@ changeset_debug = '{fullcset}{branches}{ # Override the file templates lfiles = '{if(files, label('ui.note log.files', - 'files:\n'))}{lfile_mods}{lfile_adds}{lfile_copies_switch}{lfile_dels}' + 'files:\n'))}{lfile_mods}{lfile_adds}{lfile_dels}' -# Exclude copied files, will display those in lfile_copies_switch -lfile_adds = '{file_adds % "{ifcontains(file, file_copies_switch, - '', - '{lfile_add}')}"}' +lfile_adds = '{file_adds % "{lfile_add}{lfile_src}"}' +lfile_mods = '{file_mods % "{lfile_mod}{lfile_src}"}' lfile_add = '{label("status.added", "A {file}\n")}' - -lfile_copies_switch = '{file_copies_switch % "{lfile_copy_orig}{lfile_copy_dest}"}' -lfile_copy_orig = '{label("status.added", "A {name}\n")}' -lfile_copy_dest = '{label("status.copied", " {source}\n")}' - -lfile_mods = '{file_mods % "{label('status.modified', 'M {file}\n')}"}' +lfile_mod = '{label("status.modified", "M {file}\n")}' +lfile_src = '{ifcontains(file, file_copies_switch, + label("status.copied", " {get(file_copies_switch, file)}\n"))}' lfile_dels = '{file_dels % "{label('status.removed', 'R {file}\n')}"}' diff --git a/tests/test-status.t b/tests/test-status.t --- a/tests/test-status.t +++ b/tests/test-status.t @@ -513,6 +513,18 @@ using ui.statuscopies setting M a R b +using log status template (issue5155) + $ hg log -Tstatus -r 'wdir()' -C + changeset: 2147483647:ffffffffffff + parent: 0:8c55c58b4c0e + user: test + date: * (glob) + files: + M a + b + R b + + Other "bug" highlight, the revision status does not report the copy information. This is buggy behavior. @@ -521,4 +533,17 @@ This is buggy behavior. M a R b +using log status template, the copy information is displayed correctly. + $ hg log -Tstatus -r. -C + changeset: 1:6685fde43d21 + tag: tip + user: test + date: * (glob) + summary: blah + files: + M a + b + R b + + $ cd ..