Mercurial > evolve
comparison hgext/evolve.py @ 1498:3d9a546dcbc5
evolve: annotate translatable strings with _()
author | timeless@mozdev.org |
---|---|
date | Wed, 09 Sep 2015 22:23:48 -0400 |
parents | cebe06c16837 |
children | c936a243346a |
comparison
equal
deleted
inserted
replaced
1497:cebe06c16837 | 1498:3d9a546dcbc5 |
---|---|
1494 ordering.extend(sorted(dependencies)) | 1494 ordering.extend(sorted(dependencies)) |
1495 return ordering | 1495 return ordering |
1496 | 1496 |
1497 @command('^evolve|stabilize|solve', | 1497 @command('^evolve|stabilize|solve', |
1498 [('n', 'dry-run', False, | 1498 [('n', 'dry-run', False, |
1499 'do not perform actions, just print what would be done'), | 1499 _('do not perform actions, just print what would be done')), |
1500 ('', 'confirm', False, | 1500 ('', 'confirm', False, |
1501 'ask for confirmation before performing the action'), | 1501 _('ask for confirmation before performing the action')), |
1502 ('A', 'any', False, 'also consider troubled changesets unrelated to current working directory'), | 1502 ('A', 'any', False, _('also consider troubled changesets unrelated to current working directory')), |
1503 ('r', 'rev', [], 'solves troubles of these revisions'), | 1503 ('r', 'rev', [], _('solves troubles of these revisions')), |
1504 ('', 'bumped', False, 'solves only bumped changesets'), | 1504 ('', 'bumped', False, _('solves only bumped changesets')), |
1505 ('', 'divergent', False, 'solves only divergent changesets'), | 1505 ('', 'divergent', False, _('solves only divergent changesets')), |
1506 ('', 'unstable', False, 'solves only unstable changesets (default)'), | 1506 ('', 'unstable', False, _('solves only unstable changesets (default)')), |
1507 ('a', 'all', False, 'evolve all troubled changesets related to the current ' | 1507 ('a', 'all', False, _('evolve all troubled changesets related to the current ' |
1508 'working directory and its descendants'), | 1508 'working directory and its descendants')), |
1509 ('c', 'continue', False, 'continue an interrupted evolution'), | 1509 ('c', 'continue', False, _('continue an interrupted evolution')), |
1510 ] + mergetoolopts, | 1510 ] + mergetoolopts, |
1511 _('[OPTIONS]...')) | 1511 _('[OPTIONS]...')) |
1512 def evolve(ui, repo, **opts): | 1512 def evolve(ui, repo, **opts): |
1513 """solve troubles in your repository | 1513 """solve troubles in your repository |
1514 | 1514 |
1905 displayer.show(divergent) | 1905 displayer.show(divergent) |
1906 ui.write(_('with: ')) | 1906 ui.write(_('with: ')) |
1907 displayer.show(other) | 1907 displayer.show(other) |
1908 ui.write(_('base: ')) | 1908 ui.write(_('base: ')) |
1909 displayer.show(base) | 1909 displayer.show(base) |
1910 if confirm and ui.prompt('perform evolve? [Ny]', 'n') != 'y': | 1910 if confirm and ui.prompt(_('perform evolve? [Ny]'), 'n') != 'y': |
1911 raise util.Abort(_('evolve aborted by user')) | 1911 raise util.Abort(_('evolve aborted by user')) |
1912 if dryrun: | 1912 if dryrun: |
1913 ui.write('hg update -c %s &&\n' % divergent) | 1913 ui.write('hg update -c %s &&\n' % divergent) |
1914 ui.write('hg merge %s &&\n' % other) | 1914 ui.write('hg merge %s &&\n' % other) |
1915 ui.write('hg commit -m "auto merge resolving conflict between ' | 1915 ui.write('hg commit -m "auto merge resolving conflict between ' |
2076 msg = _('(%i unstable changesets to be evolved here, ' | 2076 msg = _('(%i unstable changesets to be evolved here, ' |
2077 'do you want --evolve?)\n') | 2077 'do you want --evolve?)\n') |
2078 ui.warn(msg % len(aspchildren)) | 2078 ui.warn(msg % len(aspchildren)) |
2079 result = 1 | 2079 result = 1 |
2080 elif 1 < len(aspchildren): | 2080 elif 1 < len(aspchildren): |
2081 ui.warn("ambigious next (unstable) changeset:\n") | 2081 ui.warn(_("ambigious next (unstable) changeset:\n")) |
2082 for c in aspchildren: | 2082 for c in aspchildren: |
2083 displayer.show(repo[c]) | 2083 displayer.show(repo[c]) |
2084 ui.warn(_('(run "hg evolve --rev REV" on one of them)\n')) | 2084 ui.warn(_('(run "hg evolve --rev REV" on one of them)\n')) |
2085 return 1 | 2085 return 1 |
2086 else: | 2086 else: |