Show More
@@ -2497,7 +2497,19 def copy(ui, repo, *pats, **opts): | |||||
2497 | Returns 0 on success, 1 if errors are encountered. |
|
2497 | Returns 0 on success, 1 if errors are encountered. | |
2498 | """ |
|
2498 | """ | |
2499 | opts = pycompat.byteskwargs(opts) |
|
2499 | opts = pycompat.byteskwargs(opts) | |
2500 | with repo.wlock(): |
|
2500 | ||
|
2501 | context = repo.dirstate.changing_files | |||
|
2502 | rev = opts.get(b'at_rev') | |||
|
2503 | ctx = None | |||
|
2504 | if rev: | |||
|
2505 | ctx = logcmdutil.revsingle(repo, rev) | |||
|
2506 | if ctx.rev() is not None: | |||
|
2507 | ||||
|
2508 | def context(repo): | |||
|
2509 | return util.nullcontextmanager() | |||
|
2510 | ||||
|
2511 | opts[b'at_rev'] = ctx.rev() | |||
|
2512 | with repo.wlock(), context(repo): | |||
2501 | return cmdutil.copy(ui, repo, pats, opts) |
|
2513 | return cmdutil.copy(ui, repo, pats, opts) | |
2502 |
|
2514 | |||
2503 |
|
2515 |
General Comments 0
You need to be logged in to leave comments.
Login now