comparison mercurial/subrepo.py @ 41648:d8cdd5320f75

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
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 08 Feb 2019 10:19:30 -0800
parents 3d9d5e612e67
children f8b18583049f
comparison
equal deleted inserted replaced
41647:ec37db02fc72 41648:d8cdd5320f75
1622 continue 1622 continue
1623 if not opts.get(r'dry_run'): 1623 if not opts.get(r'dry_run'):
1624 self._gitcommand(command + [f]) 1624 self._gitcommand(command + [f])
1625 1625
1626 for f in rejected: 1626 for f in rejected:
1627 ui.warn(_("%s already tracked!\n") % match.abs(f)) 1627 ui.warn(_("%s already tracked!\n") % match.rel(f))
1628 1628
1629 return rejected 1629 return rejected
1630 1630
1631 @annotatesubrepoerror 1631 @annotatesubrepoerror
1632 def remove(self): 1632 def remove(self):