Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 37758:9b3a348c9b2f
commands: use command executor interface
Differential Revision: https://phab.mercurial-scm.org/D3391
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 14 Apr 2018 20:04:59 -0700 |
parents | e7bf5a73e4e1 |
children | 5527aa808dea |
comparison
equal
deleted
inserted
replaced
37757:2a8ad00b8aed | 37758:9b3a348c9b2f |
---|---|
4035 # will be updated with that name because of a race condition | 4035 # will be updated with that name because of a race condition |
4036 # server side. (See issue 4689 for details) | 4036 # server side. (See issue 4689 for details) |
4037 oldrevs = revs | 4037 oldrevs = revs |
4038 revs = [] # actually, nodes | 4038 revs = [] # actually, nodes |
4039 for r in oldrevs: | 4039 for r in oldrevs: |
4040 node = other.lookup(r) | 4040 with other.commandexecutor() as e: |
4041 node = e.callcommand('lookup', {'key': r}).result() | |
4042 | |
4041 revs.append(node) | 4043 revs.append(node) |
4042 if r == checkout: | 4044 if r == checkout: |
4043 checkout = node | 4045 checkout = node |
4044 except error.CapabilityError: | 4046 except error.CapabilityError: |
4045 err = _("other repository doesn't support revision lookup, " | 4047 err = _("other repository doesn't support revision lookup, " |