# HG changeset patch # User Yuya Nishihara # Date 1533455485 -32400 # 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 -r 34ba47117164 -r 46f3ff64bea7 mercurial/commands.py --- a/mercurial/commands.py Sun Aug 05 16:44:16 2018 +0900 +++ b/mercurial/commands.py Sun Aug 05 16:51:25 2018 +0900 @@ -5191,7 +5191,7 @@ 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 -r 34ba47117164 -r 46f3ff64bea7 mercurial/templates/map-cmdline.default --- a/mercurial/templates/map-cmdline.default Sun Aug 05 16:44:16 2018 +0900 +++ b/mercurial/templates/map-cmdline.default Sun Aug 05 16:51:25 2018 +0900 @@ -74,7 +74,7 @@ {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 -r 34ba47117164 -r 46f3ff64bea7 tests/test-status.t --- a/tests/test-status.t Sun Aug 05 16:44:16 2018 +0900 +++ b/tests/test-status.t Sun Aug 05 16:51:25 2018 +0900 @@ -239,8 +239,8 @@ "status": "A" }, { - "copy": "modified", "path": "copied", + "source": "modified", "status": "A" }, { @@ -282,7 +282,7 @@ 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