equal
deleted
inserted
replaced
987 else: |
987 else: |
988 for item in self.headerlist: |
988 for item in self.headerlist: |
989 if not item.applied: |
989 if not item.applied: |
990 self.toggleapply(item) |
990 self.toggleapply(item) |
991 self.waslasttoggleallapplied = not self.waslasttoggleallapplied |
991 self.waslasttoggleallapplied = not self.waslasttoggleallapplied |
|
992 |
|
993 def flipselections(self): |
|
994 """ |
|
995 Flip all selections. Every selected line is unselected and vice |
|
996 versa. |
|
997 """ |
|
998 for header in self.headerlist: |
|
999 for hunk in header.allchildren(): |
|
1000 for line in hunk.allchildren(): |
|
1001 self.toggleapply(line) |
992 |
1002 |
993 def toggleallbetween(self): |
1003 def toggleallbetween(self): |
994 """toggle applied on or off for all items in range [lastapplied, |
1004 """toggle applied on or off for all items in range [lastapplied, |
995 current]. """ |
1005 current]. """ |
996 if ( |
1006 if ( |
1636 f : fold / unfold item, hiding/revealing its children |
1646 f : fold / unfold item, hiding/revealing its children |
1637 F : fold / unfold parent item and all of its ancestors |
1647 F : fold / unfold parent item and all of its ancestors |
1638 ctrl-l : scroll the selected line to the top of the screen |
1648 ctrl-l : scroll the selected line to the top of the screen |
1639 m : edit / resume editing the commit message |
1649 m : edit / resume editing the commit message |
1640 e : edit the currently selected hunk |
1650 e : edit the currently selected hunk |
1641 a : toggle amend mode, only with commit -i |
1651 a : toggle all selections |
1642 c : confirm selected changes |
1652 c : confirm selected changes |
1643 r : review/edit and confirm selected changes |
1653 r : review/edit and confirm selected changes |
1644 q : quit without confirming (no changes will be made) |
1654 q : quit without confirming (no changes will be made) |
1645 ? : help (what you're currently reading)""" |
1655 ? : help (what you're currently reading)""" |
1646 ) |
1656 ) |
1912 elif keypressed in ["H", "KEY_SLEFT"]: |
1922 elif keypressed in ["H", "KEY_SLEFT"]: |
1913 self.leftarrowshiftevent() |
1923 self.leftarrowshiftevent() |
1914 elif keypressed in ["q"]: |
1924 elif keypressed in ["q"]: |
1915 raise error.Abort(_(b'user quit')) |
1925 raise error.Abort(_(b'user quit')) |
1916 elif keypressed in ['a']: |
1926 elif keypressed in ['a']: |
1917 self.toggleamend(self.opts, test) |
1927 self.flipselections() |
1918 elif keypressed in ["c"]: |
1928 elif keypressed in ["c"]: |
1919 return True |
1929 return True |
1920 elif keypressed in ["r"]: |
1930 elif keypressed in ["r"]: |
1921 if self.reviewcommit(): |
1931 if self.reviewcommit(): |
1922 self.opts[b'review'] = True |
1932 self.opts[b'review'] = True |