Mercurial > hg
comparison mercurial/crecord.py @ 43888:51bfd056a2ee
crecord: remove toggleamend
Previous commit removed its only calling site.
author | Jordi Gutiérrez Hermoso <jordigh@octave.org> |
---|---|
date | Tue, 10 Dec 2019 17:07:09 -0500 |
parents | c06eba91c380 |
children | ae596fac8ba0 |
comparison
equal
deleted
inserted
replaced
43887:c06eba91c380 | 43888:51bfd056a2ee |
---|---|
1764 response = "n" | 1764 response = "n" |
1765 if response.lower().startswith("y"): | 1765 if response.lower().startswith("y"): |
1766 return True | 1766 return True |
1767 else: | 1767 else: |
1768 return False | 1768 return False |
1769 | |
1770 def toggleamend(self, opts, test): | |
1771 """Toggle the amend flag. | |
1772 | |
1773 When the amend flag is set, a commit will modify the most recently | |
1774 committed changeset, instead of creating a new changeset. Otherwise, a | |
1775 new changeset will be created (the normal commit behavior). | |
1776 """ | |
1777 | |
1778 if opts.get(b'amend') is None: | |
1779 opts[b'amend'] = True | |
1780 msg = _( | |
1781 b"Amend option is turned on -- committing the currently " | |
1782 b"selected changes will not create a new changeset, but " | |
1783 b"instead update the most recently committed changeset.\n\n" | |
1784 b"Press any key to continue." | |
1785 ) | |
1786 elif opts.get(b'amend') is True: | |
1787 opts[b'amend'] = None | |
1788 msg = _( | |
1789 b"Amend option is turned off -- committing the currently " | |
1790 b"selected changes will create a new changeset.\n\n" | |
1791 b"Press any key to continue." | |
1792 ) | |
1793 if not test: | |
1794 self.confirmationwindow(msg) | |
1795 | 1769 |
1796 def recenterdisplayedarea(self): | 1770 def recenterdisplayedarea(self): |
1797 """ | 1771 """ |
1798 once we scrolled with pg up pg down we can be pointing outside of the | 1772 once we scrolled with pg up pg down we can be pointing outside of the |
1799 display zone. we print the patch with towin=False to compute the | 1773 display zone. we print the patch with towin=False to compute the |