This is needed so we can use "pushkey," which relies on empty
values being special.
Details
Details
- Reviewers
- None
- Group Reviewers
hg-reviewers
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
( )
hg-reviewers |
This is needed so we can use "pushkey," which relies on empty
values being special.
Lint Skipped |
Unit Tests Skipped |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/debugcommands.py (9 lines) |
Status | Author | Revision | |
---|---|---|---|
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Abandoned | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Abandoned | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg |
if not peer: | if not peer: | ||||
raise error.Abort(_('cannot send commands unless peer instance ' | raise error.Abort(_('cannot send commands unless peer instance ' | ||||
'is available')) | 'is available')) | ||||
command = action.split(' ', 1)[1] | command = action.split(' ', 1)[1] | ||||
args = {} | args = {} | ||||
for line in lines: | for line in lines: | ||||
key, value = line.lstrip().split(' ', 1) | # We need to allow empty values. | ||||
fields = line.lstrip().split(' ', 1) | |||||
if len(fields) == 1: | |||||
key = fields[0] | |||||
value = '' | |||||
else: | |||||
key, value = fields | |||||
args[key] = ast.literal_eval(b'b"%s"' % value) | args[key] = ast.literal_eval(b'b"%s"' % value) | ||||
if batchedcommands is not None: | if batchedcommands is not None: | ||||
batchedcommands.append((command, args)) | batchedcommands.append((command, args)) | ||||
continue | continue | ||||
ui.status(_('sending %s command\n') % command) | ui.status(_('sending %s command\n') % command) | ||||
res = peer._call(command, **args) | res = peer._call(command, **args) |