diff mercurial/commands.py @ 41661:f8b18583049f

add: pass around uipathfn and use instead of m.rel() (API) For now, the uipathfn we pass around always prints relative paths just like before, so this should have no effect. Well, there's one little change: I also made the "skipping missing subrepository: %s\n" message relative. Differential Revision: https://phab.mercurial-scm.org/D5901
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 07 Feb 2019 11:15:30 -0800
parents 446e1dcc3b5c
children b2df5dc3ebfb
line wrap: on
line diff
--- a/mercurial/commands.py	Fri Feb 08 10:32:48 2019 -0800
+++ b/mercurial/commands.py	Thu Feb 07 11:15:30 2019 -0800
@@ -180,7 +180,8 @@
     """
 
     m = scmutil.match(repo[None], pats, pycompat.byteskwargs(opts))
-    rejected = cmdutil.add(ui, repo, m, "", False, **opts)
+    uipathfn = scmutil.getuipathfn(repo, forcerelativevalue=True)
+    rejected = cmdutil.add(ui, repo, m, "", uipathfn, False, **opts)
     return rejected and 1 or 0
 
 @command('addremove',