# HG changeset patch # User Martin von Zweigbergk # Date 1549649970 28800 # Node ID d8cdd5320f7562757e6d6256b66791f3f7492b7f # Parent ec37db02fc728840fca4c9535ba4f4e96a104516 subrepo: use relative path for "already tracked" message From 932de135041f (subrepo: warn when adding already tracked files in gitsubrepo, 2015-02-27): The file is printed with abs() to be consistent with how it is printed in workingctx, even though that is inconsistent with how added files are printed in verbose mode. However, a few year later, the same author wrote 7008f6819002 (context: name files relative to cwd in warning messages, 2017-07-11) and now it's inconsistent. This fixes that inconsistency. Differential Revision: https://phab.mercurial-scm.org/D5899 diff -r ec37db02fc72 -r d8cdd5320f75 mercurial/subrepo.py --- a/mercurial/subrepo.py Wed Feb 06 23:56:59 2019 -0800 +++ b/mercurial/subrepo.py Fri Feb 08 10:19:30 2019 -0800 @@ -1624,7 +1624,7 @@ self._gitcommand(command + [f]) for f in rejected: - ui.warn(_("%s already tracked!\n") % match.abs(f)) + ui.warn(_("%s already tracked!\n") % match.rel(f)) return rejected