equal
deleted
inserted
replaced
6012 This command takes effect with the next commit by default. |
6012 This command takes effect with the next commit by default. |
6013 |
6013 |
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 |
6021 @command( |
6032 @command( |
6022 b'resolve', |
6033 b'resolve', |