Mercurial > evolve
comparison hgext/evolve.py @ 1409:3276730e4b32
evolve: move the 'update' if '.' is obsolete earlier
A big refactoring of the computation of the revision to evolve is coming. This
case won't be handled by it, so we extract it earlier.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Fri, 19 Jun 2015 14:32:54 -0700 |
parents | b3afdc0815d0 |
children | 2c451fece7a6 |
comparison
equal
deleted
inserted
replaced
1408:b3afdc0815d0 | 1409:3276730e4b32 |
---|---|
1410 if 1 < len(specifiedcategories): | 1410 if 1 < len(specifiedcategories): |
1411 msg = _('cannot specify more than one trouble category to solve (yet)') | 1411 msg = _('cannot specify more than one trouble category to solve (yet)') |
1412 raise util.Abort(msg) | 1412 raise util.Abort(msg) |
1413 elif len(specifiedcategories) == 1: | 1413 elif len(specifiedcategories) == 1: |
1414 targetcat = specifiedcategories[0] | 1414 targetcat = specifiedcategories[0] |
1415 elif repo['.'].obsolete(): | |
1416 displayer = cmdutil.show_changeset(ui, repo, {'template': shorttemplate}) | |
1417 # no args and parent is obsolete, update to successors | |
1418 try: | |
1419 ctx = repo[_singlesuccessor(repo, repo['.'])] | |
1420 except MultipleSuccessorsError, exc: | |
1421 repo.ui.write_err('parent is obsolete with multiple successors:\n') | |
1422 for ln in exc.successorssets: | |
1423 for n in ln: | |
1424 displayer.show(repo[n]) | |
1425 return 2 | |
1426 | |
1415 | 1427 |
1416 ui.setconfig('ui', 'forcemerge', opts.get('tool', ''), 'evolve') | 1428 ui.setconfig('ui', 'forcemerge', opts.get('tool', ''), 'evolve') |
1417 troubled = set(repo.revs('troubled()')) | 1429 troubled = set(repo.revs('troubled()')) |
1418 | 1430 |
1419 # Progress handling | 1431 # Progress handling |