Mercurial > public > mercurial-scm > hg-stable
comparison 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 |
comparison
equal
deleted
inserted
replaced
41660:799e156785f7 | 41661:f8b18583049f |
---|---|
178 | 178 |
179 Returns 0 if all files are successfully added. | 179 Returns 0 if all files are successfully added. |
180 """ | 180 """ |
181 | 181 |
182 m = scmutil.match(repo[None], pats, pycompat.byteskwargs(opts)) | 182 m = scmutil.match(repo[None], pats, pycompat.byteskwargs(opts)) |
183 rejected = cmdutil.add(ui, repo, m, "", False, **opts) | 183 uipathfn = scmutil.getuipathfn(repo, forcerelativevalue=True) |
184 rejected = cmdutil.add(ui, repo, m, "", uipathfn, False, **opts) | |
184 return rejected and 1 or 0 | 185 return rejected and 1 or 0 |
185 | 186 |
186 @command('addremove', | 187 @command('addremove', |
187 similarityopts + subrepoopts + walkopts + dryrunopts, | 188 similarityopts + subrepoopts + walkopts + dryrunopts, |
188 _('[OPTION]... [FILE]...'), | 189 _('[OPTION]... [FILE]...'), |