Mercurial > hg
comparison hgext/histedit.py @ 51700:7f0cb9ee0534
Backout accidental publication of a large range of revisions
I accidentally published 25e7f9dcad0f::bd1483fd7088, this is the inverse.
author | Raphaël Gomès <rgomes@octobus.net> |
---|---|
date | Tue, 23 Jul 2024 10:02:46 +0200 |
parents | 493034cc3265 |
children | ca7bde5dbafb |
comparison
equal
deleted
inserted
replaced
51699:bd1483fd7088 | 51700:7f0cb9ee0534 |
---|---|
1524 displayer.close() | 1524 displayer.close() |
1525 return displayer.hunk[rule.ctx.rev()].splitlines() | 1525 return displayer.hunk[rule.ctx.rev()].splitlines() |
1526 | 1526 |
1527 def move_cursor(self, oldpos, newpos): | 1527 def move_cursor(self, oldpos, newpos): |
1528 """Change the rule/changeset that the cursor is pointing to, regardless of | 1528 """Change the rule/changeset that the cursor is pointing to, regardless of |
1529 current mode (you can switch between patches from the view patch window). | 1529 current mode (you can switch between patches from the view patch window).""" |
1530 """ | |
1531 self.pos = newpos | 1530 self.pos = newpos |
1532 | 1531 |
1533 mode, _ = self.mode | 1532 mode, _ = self.mode |
1534 if mode == MODE_RULES: | 1533 if mode == MODE_RULES: |
1535 # Scroll through the list by updating the view for MODE_RULES, so that | 1534 # Scroll through the list by updating the view for MODE_RULES, so that |
1604 # display_pos_to_rule_pos() | 1603 # display_pos_to_rule_pos() |
1605 self.change_action(pos, KEY_LIST[index % len(KEY_LIST)]) | 1604 self.change_action(pos, KEY_LIST[index % len(KEY_LIST)]) |
1606 | 1605 |
1607 def change_view(self, delta, unit): | 1606 def change_view(self, delta, unit): |
1608 """Change the region of whatever is being viewed (a patch or the list of | 1607 """Change the region of whatever is being viewed (a patch or the list of |
1609 changesets). 'delta' is an amount (+/- 1) and 'unit' is 'page' or 'line'. | 1608 changesets). 'delta' is an amount (+/- 1) and 'unit' is 'page' or 'line'.""" |
1610 """ | |
1611 mode, _ = self.mode | 1609 mode, _ = self.mode |
1612 if mode != MODE_PATCH: | 1610 if mode != MODE_PATCH: |
1613 return | 1611 return |
1614 mode_state = self.modes[mode] | 1612 mode_state = self.modes[mode] |
1615 num_lines = len(mode_state[b'patchcontents']) | 1613 num_lines = len(mode_state[b'patchcontents']) |