Mercurial > hg
comparison hgext/rebase.py @ 42532:12243f15d53e
statecheck: added support for STATES
This removes `STATES` from `state.py` and adds support to
`statecheck` class to handle its features.
`getrepostate()` function is modified accordingly.
This adds a method 'cmdutil.addunfinished()' for appending to
the unfinishedstate list so as to keep 'merge' and 'bisect' at the last.
This also makes two separate message formats for `checkunfinished()` and
`getrepostate()` as there were previously present.
Results of test changed are shown.
Differential Revision: https://phab.mercurial-scm.org/D6503
author | Taapas Agrawal <taapas2897@gmail.com> |
---|---|
date | Sun, 09 Jun 2019 02:12:58 +0530 |
parents | dc3fdd1b5af4 |
children | 0231032729c4 |
comparison
equal
deleted
inserted
replaced
42531:5bddd2244814 | 42532:12243f15d53e |
---|---|
1820 if opts.get(r'update'): | 1820 if opts.get(r'update'): |
1821 del opts[r'update'] | 1821 del opts[r'update'] |
1822 ui.debug('--update and --rebase are not compatible, ignoring ' | 1822 ui.debug('--update and --rebase are not compatible, ignoring ' |
1823 'the update flag\n') | 1823 'the update flag\n') |
1824 | 1824 |
1825 cmdutil.checkunfinished(repo) | 1825 cmdutil.checkunfinished(repo, skipmerge=True) |
1826 cmdutil.bailifchanged(repo, hint=_('cannot pull with rebase: ' | 1826 cmdutil.bailifchanged(repo, hint=_('cannot pull with rebase: ' |
1827 'please commit or shelve your changes first')) | 1827 'please commit or shelve your changes first')) |
1828 | 1828 |
1829 revsprepull = len(repo) | 1829 revsprepull = len(repo) |
1830 origpostincoming = commands.postincoming | 1830 origpostincoming = commands.postincoming |
1948 entry[1].append(('', 'rebase', None, | 1948 entry[1].append(('', 'rebase', None, |
1949 _("rebase working directory to branch head"))) | 1949 _("rebase working directory to branch head"))) |
1950 entry[1].append(('t', 'tool', '', | 1950 entry[1].append(('t', 'tool', '', |
1951 _("specify merge tool for rebase"))) | 1951 _("specify merge tool for rebase"))) |
1952 cmdutil.summaryhooks.add('rebase', summaryhook) | 1952 cmdutil.summaryhooks.add('rebase', summaryhook) |
1953 statemod.addunfinished('rebase', fname='rebasestate') | 1953 statemod.addunfinished('rebase', fname='rebasestate', stopflag=True) |
1954 cmdutil.afterresolvedstates.append( | 1954 cmdutil.afterresolvedstates.append( |
1955 ['rebasestate', _('hg rebase --continue')]) | 1955 ['rebasestate', _('hg rebase --continue')]) |