##// END OF EJS Templates
addremove: respect ui.relative-paths...
Martin von Zweigbergk -
r41834:b81ecf35 default
parent child Browse files
Show More
@@ -2401,7 +2401,7 b' def commit(ui, repo, commitfunc, pats, o'
2401 with dsguard or util.nullcontextmanager():
2401 with dsguard or util.nullcontextmanager():
2402 if dsguard:
2402 if dsguard:
2403 relative = scmutil.anypats(pats, opts)
2403 relative = scmutil.anypats(pats, opts)
2404 uipathfn = scmutil.getuipathfn(repo, forcerelativevalue=relative)
2404 uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=relative)
2405 if scmutil.addremove(repo, matcher, "", uipathfn, opts) != 0:
2405 if scmutil.addremove(repo, matcher, "", uipathfn, opts) != 0:
2406 raise error.Abort(
2406 raise error.Abort(
2407 _("failed to mark all new/missing files as added/removed"))
2407 _("failed to mark all new/missing files as added/removed"))
@@ -2481,7 +2481,7 b' def amend(ui, repo, old, extra, pats, op'
2481 # was specified.
2481 # was specified.
2482 matcher = scmutil.match(wctx, pats, opts)
2482 matcher = scmutil.match(wctx, pats, opts)
2483 relative = scmutil.anypats(pats, opts)
2483 relative = scmutil.anypats(pats, opts)
2484 uipathfn = scmutil.getuipathfn(repo, forcerelativevalue=relative)
2484 uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=relative)
2485 if (opts.get('addremove')
2485 if (opts.get('addremove')
2486 and scmutil.addremove(repo, matcher, "", uipathfn, opts)):
2486 and scmutil.addremove(repo, matcher, "", uipathfn, opts)):
2487 raise error.Abort(
2487 raise error.Abort(
@@ -180,7 +180,7 b' def add(ui, repo, *pats, **opts):'
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 uipathfn = scmutil.getuipathfn(repo, forcerelativevalue=True)
183 uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=True)
184 rejected = cmdutil.add(ui, repo, m, "", uipathfn, False, **opts)
184 rejected = cmdutil.add(ui, repo, m, "", uipathfn, False, **opts)
185 return rejected and 1 or 0
185 return rejected and 1 or 0
186
186
@@ -256,7 +256,7 b' def addremove(ui, repo, *pats, **opts):'
256 opts['similarity'] = '100'
256 opts['similarity'] = '100'
257 matcher = scmutil.match(repo[None], pats, opts)
257 matcher = scmutil.match(repo[None], pats, opts)
258 relative = scmutil.anypats(pats, opts)
258 relative = scmutil.anypats(pats, opts)
259 uipathfn = scmutil.getuipathfn(repo, forcerelativevalue=relative)
259 uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=relative)
260 return scmutil.addremove(repo, matcher, "", uipathfn, opts)
260 return scmutil.addremove(repo, matcher, "", uipathfn, opts)
261
261
262 @command('annotate|blame',
262 @command('annotate|blame',
@@ -2258,7 +2258,7 b' def forget(ui, repo, *pats, **opts):'
2258
2258
2259 m = scmutil.match(repo[None], pats, opts)
2259 m = scmutil.match(repo[None], pats, opts)
2260 dryrun, interactive = opts.get('dry_run'), opts.get('interactive')
2260 dryrun, interactive = opts.get('dry_run'), opts.get('interactive')
2261 uipathfn = scmutil.getuipathfn(repo, forcerelativevalue=True)
2261 uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=True)
2262 rejected = cmdutil.forget(ui, repo, m, prefix="", uipathfn=uipathfn,
2262 rejected = cmdutil.forget(ui, repo, m, prefix="", uipathfn=uipathfn,
2263 explicitonly=False, dryrun=dryrun,
2263 explicitonly=False, dryrun=dryrun,
2264 interactive=interactive)[0]
2264 interactive=interactive)[0]
@@ -4720,7 +4720,7 b' def remove(ui, repo, *pats, **opts):'
4720
4720
4721 m = scmutil.match(repo[None], pats, opts)
4721 m = scmutil.match(repo[None], pats, opts)
4722 subrepos = opts.get('subrepos')
4722 subrepos = opts.get('subrepos')
4723 uipathfn = scmutil.getuipathfn(repo, forcerelativevalue=True)
4723 uipathfn = scmutil.getuipathfn(repo, legacyrelativevalue=True)
4724 return cmdutil.remove(ui, repo, m, "", uipathfn, after, force, subrepos,
4724 return cmdutil.remove(ui, repo, m, "", uipathfn, after, force, subrepos,
4725 dryrun=dryrun)
4725 dryrun=dryrun)
4726
4726
@@ -1125,7 +1125,7 b' def marktouched(repo, files, similarity='
1125 # TODO: We should probably have the caller pass in uipathfn and apply it to
1125 # TODO: We should probably have the caller pass in uipathfn and apply it to
1126 # the messages above too. forcerelativevalue=True is consistent with how
1126 # the messages above too. forcerelativevalue=True is consistent with how
1127 # it used to work.
1127 # it used to work.
1128 uipathfn = getuipathfn(repo, forcerelativevalue=True)
1128 uipathfn = getuipathfn(repo, legacyrelativevalue=True)
1129 renames = _findrenames(repo, m, added + unknown, removed + deleted,
1129 renames = _findrenames(repo, m, added + unknown, removed + deleted,
1130 similarity, uipathfn)
1130 similarity, uipathfn)
1131
1131
General Comments 0
You need to be logged in to leave comments. Login now