equal
deleted
inserted
replaced
2399 if opts.get('addremove'): |
2399 if opts.get('addremove'): |
2400 dsguard = dirstateguard.dirstateguard(repo, 'commit') |
2400 dsguard = dirstateguard.dirstateguard(repo, 'commit') |
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")) |
2408 |
2408 |
2409 return commitfunc(ui, repo, message, matcher, opts) |
2409 return commitfunc(ui, repo, message, matcher, opts) |
2479 |
2479 |
2480 # add/remove the files to the working copy if the "addremove" option |
2480 # add/remove the files to the working copy if the "addremove" option |
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( |
2488 _("failed to mark all new/missing files as added/removed")) |
2488 _("failed to mark all new/missing files as added/removed")) |
2489 |
2489 |