# HG changeset patch # User Yuya Nishihara # Date 2018-08-05 07:51:25 # Node ID 46f3ff64bea79695e22c1d8a018922c19a0cb776 # Parent 34ba47117164318716d93840d9dda21f5b77e336 status: rename {copy} to {source} for compatibility with {file_copies} (BC) .. bc:: ``{copy}`` in status command template is renamed to ``{source}``. diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -5191,7 +5191,7 @@ def status(ui, repo, *pats, **opts): fm.condwrite(showchar, 'status', '%s ', char, label=label) fm.plain(fmt % repo.pathto(f, cwd), label=label) if f in copy: - fm.data(copy=copy[f]) + fm.data(source=copy[f]) fm.plain((' %s' + end) % repo.pathto(copy[f], cwd), label='status.copied') diff --git a/mercurial/templates/map-cmdline.default b/mercurial/templates/map-cmdline.default --- a/mercurial/templates/map-cmdline.default +++ b/mercurial/templates/map-cmdline.default @@ -74,7 +74,7 @@ description = '{if(desc|strip, "{label(' {label('ui.note log.description', '{desc|strip}')}\n\n")}' -status = '{status} {path|relpath}\n{if(copy, " {copy|relpath}\n")}' +status = '{status} {path|relpath}\n{if(source, " {source|relpath}\n")}' # Obsfate templates, it would be removed once we introduce the obsfate # template fragment diff --git a/tests/test-status.t b/tests/test-status.t --- a/tests/test-status.t +++ b/tests/test-status.t @@ -239,8 +239,8 @@ hg status -A: "status": "A" }, { - "copy": "modified", "path": "copied", + "source": "modified", "status": "A" }, { @@ -282,7 +282,7 @@ hg status -A: Test templater support: - $ hg status -AT "[{status}]\t{if(copy, '{copy} -> ')}{path}\n" + $ hg status -AT "[{status}]\t{if(source, '{source} -> ')}{path}\n" [M] .hgignore [A] added [A] modified -> copied