Details
Details
- Reviewers
- None
- Group Reviewers
hg-reviewers - Commits
- rHGc7eb9bce6041: py3: slice over bytes to prevent getting ascii values
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
hg-reviewers |
Lint Skipped |
Unit Tests Skipped |
'$$ show &patch' | '$$ show &patch' | ||||
'$$ &commit selected changesets' | '$$ &commit selected changesets' | ||||
'$$ &quit and cancel transplant' | '$$ &quit and cancel transplant' | ||||
'$$ &? (show this help)') | '$$ &? (show this help)') | ||||
for node in nodes: | for node in nodes: | ||||
displayer.show(repo[node]) | displayer.show(repo[node]) | ||||
action = None | action = None | ||||
while not action: | while not action: | ||||
action = 'ynmpcq?'[ui.promptchoice(prompt)] | choice = ui.promptchoice(prompt) | ||||
action = 'ynmpcq?'[choice:choice + 1] | |||||
if action == '?': | if action == '?': | ||||
for c, t in ui.extractchoices(prompt)[1]: | for c, t in ui.extractchoices(prompt)[1]: | ||||
ui.write('%s: %s\n' % (c, t)) | ui.write('%s: %s\n' % (c, t)) | ||||
action = None | action = None | ||||
elif action == 'p': | elif action == 'p': | ||||
parent = repo.changelog.parents(node)[0] | parent = repo.changelog.parents(node)[0] | ||||
for chunk in patch.diff(repo, parent, node): | for chunk in patch.diff(repo, parent, node): | ||||
ui.write(chunk) | ui.write(chunk) |
command = ['diff-tree', '--no-renames', '-r', rev1, rev2] | command = ['diff-tree', '--no-renames', '-r', rev1, rev2] | ||||
else: | else: | ||||
command = ['diff-index', '--no-renames', rev1] | command = ['diff-index', '--no-renames', rev1] | ||||
out = self._gitcommand(command) | out = self._gitcommand(command) | ||||
for line in out.split('\n'): | for line in out.split('\n'): | ||||
tab = line.find('\t') | tab = line.find('\t') | ||||
if tab == -1: | if tab == -1: | ||||
continue | continue | ||||
status, f = line[tab - 1], line[tab + 1:] | status, f = line[tab - 1:tab], line[tab + 1:] | ||||
if status == 'M': | if status == 'M': | ||||
modified.append(f) | modified.append(f) | ||||
elif status == 'A': | elif status == 'A': | ||||
added.append(f) | added.append(f) | ||||
elif status == 'D': | elif status == 'D': | ||||
removed.append(f) | removed.append(f) | ||||
deleted, unknown, ignored, clean = [], [], [], [] | deleted, unknown, ignored, clean = [], [], [], [] |