comparison hgext/largefiles/overrides.py @ 41650: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 3d9d5e612e67
children b2df5dc3ebfb
comparison
equal deleted inserted replaced
41649:799e156785f7 41650:f8b18583049f
233 if opts.get(r'normal') and opts.get(r'large'): 233 if opts.get(r'normal') and opts.get(r'large'):
234 raise error.Abort(_('--normal cannot be used with --large')) 234 raise error.Abort(_('--normal cannot be used with --large'))
235 return orig(ui, repo, *pats, **opts) 235 return orig(ui, repo, *pats, **opts)
236 236
237 @eh.wrapfunction(cmdutil, 'add') 237 @eh.wrapfunction(cmdutil, 'add')
238 def cmdutiladd(orig, ui, repo, matcher, prefix, explicitonly, **opts): 238 def cmdutiladd(orig, ui, repo, matcher, prefix, uipathfn, explicitonly, **opts):
239 # The --normal flag short circuits this override 239 # The --normal flag short circuits this override
240 if opts.get(r'normal'): 240 if opts.get(r'normal'):
241 return orig(ui, repo, matcher, prefix, explicitonly, **opts) 241 return orig(ui, repo, matcher, prefix, uipathfn, explicitonly, **opts)
242 242
243 ladded, lbad = addlargefiles(ui, repo, False, matcher, **opts) 243 ladded, lbad = addlargefiles(ui, repo, False, matcher, **opts)
244 normalmatcher = composenormalfilematcher(matcher, repo[None].manifest(), 244 normalmatcher = composenormalfilematcher(matcher, repo[None].manifest(),
245 ladded) 245 ladded)
246 bad = orig(ui, repo, normalmatcher, prefix, explicitonly, **opts) 246 bad = orig(ui, repo, normalmatcher, prefix, uipathfn, explicitonly, **opts)
247 247
248 bad.extend(f for f in lbad) 248 bad.extend(f for f in lbad)
249 return bad 249 return bad
250 250
251 @eh.wrapfunction(cmdutil, 'remove') 251 @eh.wrapfunction(cmdutil, 'remove')