Show More
@@ -6014,7 +6014,18 b' def rename(ui, repo, *pats, **opts):' | |||||
6014 | Returns 0 on success, 1 if errors are encountered. |
|
6014 | Returns 0 on success, 1 if errors are encountered. | |
6015 | """ |
|
6015 | """ | |
6016 | opts = pycompat.byteskwargs(opts) |
|
6016 | opts = pycompat.byteskwargs(opts) | |
6017 | with repo.wlock(): |
|
6017 | context = repo.dirstate.changing_files | |
|
6018 | rev = opts.get(b'at_rev') | |||
|
6019 | ctx = None | |||
|
6020 | if rev: | |||
|
6021 | ctx = logcmdutil.revsingle(repo, rev) | |||
|
6022 | if ctx.rev() is not None: | |||
|
6023 | ||||
|
6024 | def context(repo): | |||
|
6025 | return util.nullcontextmanager() | |||
|
6026 | ||||
|
6027 | opts[b'at_rev'] = ctx.rev() | |||
|
6028 | with repo.wlock(), context(repo): | |||
6018 | return cmdutil.copy(ui, repo, pats, opts, rename=True) |
|
6029 | return cmdutil.copy(ui, repo, pats, opts, rename=True) | |
6019 |
|
6030 | |||
6020 |
|
6031 |
General Comments 0
You need to be logged in to leave comments.
Login now