Mercurial > evolve
comparison hgext/evolve.py @ 986:c1f8ece4182d
evolve: add --tool option so we don't have to use HGMERGE
author | Greg Ward <greg@gerg.ca> |
---|---|
date | Sun, 22 Jun 2014 20:10:07 -0400 |
parents | 6a37044ec0b3 |
children | 85d213215d2c |
comparison
equal
deleted
inserted
replaced
985:6a37044ec0b3 | 986:c1f8ece4182d |
---|---|
60 from mercurial import patch | 60 from mercurial import patch |
61 from mercurial import revset | 61 from mercurial import revset |
62 from mercurial import scmutil | 62 from mercurial import scmutil |
63 from mercurial import templatekw | 63 from mercurial import templatekw |
64 from mercurial.i18n import _ | 64 from mercurial.i18n import _ |
65 from mercurial.commands import walkopts, commitopts, commitopts2 | 65 from mercurial.commands import walkopts, commitopts, commitopts2, mergetoolopts |
66 from mercurial.node import nullid | 66 from mercurial.node import nullid |
67 from mercurial import wireproto | 67 from mercurial import wireproto |
68 from mercurial import localrepo | 68 from mercurial import localrepo |
69 from mercurial.hgweb import hgweb_mod | 69 from mercurial.hgweb import hgweb_mod |
70 from mercurial import bundle2 | 70 from mercurial import bundle2 |
1149 @command('^evolve|stabilize|solve', | 1149 @command('^evolve|stabilize|solve', |
1150 [('n', 'dry-run', False, | 1150 [('n', 'dry-run', False, |
1151 'do not perform actions, just print what would be done'), | 1151 'do not perform actions, just print what would be done'), |
1152 ('A', 'any', False, 'evolve any troubled changeset'), | 1152 ('A', 'any', False, 'evolve any troubled changeset'), |
1153 ('a', 'all', False, 'evolve all troubled changesets'), | 1153 ('a', 'all', False, 'evolve all troubled changesets'), |
1154 ('c', 'continue', False, 'continue an interrupted evolution'), ], | 1154 ('c', 'continue', False, 'continue an interrupted evolution'), |
1155 ] + mergetoolopts, | |
1155 _('[OPTIONS]...')) | 1156 _('[OPTIONS]...')) |
1156 def evolve(ui, repo, **opts): | 1157 def evolve(ui, repo, **opts): |
1157 """Solve trouble in your repository | 1158 """Solve trouble in your repository |
1158 | 1159 |
1159 - rebase unstable changesets to make them stable again, | 1160 - rebase unstable changesets to make them stable again, |
1179 | 1180 |
1180 contopt = opts['continue'] | 1181 contopt = opts['continue'] |
1181 anyopt = opts['any'] | 1182 anyopt = opts['any'] |
1182 allopt = opts['all'] | 1183 allopt = opts['all'] |
1183 dryrunopt = opts['dry_run'] | 1184 dryrunopt = opts['dry_run'] |
1185 ui.setconfig('ui', 'forcemerge', opts.get('tool', ''), 'evolve') | |
1184 | 1186 |
1185 if contopt: | 1187 if contopt: |
1186 if anyopt: | 1188 if anyopt: |
1187 raise util.Abort('cannot specify both "--any" and "--continue"') | 1189 raise util.Abort('cannot specify both "--any" and "--continue"') |
1188 if allopt: | 1190 if allopt: |