Commits

TakUnity  committed f914e31

evolve: remove magic return values from utility functions

  • Participants
  • Parent commits 90f0a1e
  • Branches default

Comments (0)

Files changed (1)

File hgext/evolve.py

 
     while tr is not None:
         result = _evolveany(ui, repo, tr, dryrunopt)
-        if 2 == result or not allopt:
+        if not allopt:
             return result
         tr = _picknexttroubled(ui, repo, anyopt or allopt)
         
         obs = obs.parents()[0]
         newer = obsolete.successorssets(repo, obs.node())
     if len(newer) > 1:
-        ui.write_err(_("conflict rewriting. can't choose destination\n"))
-        return 2
+        raise util.Abort(_("conflict rewriting. can't choose destination\n"))
     targets = newer[0]
     assert targets
     if len(targets) > 1:
-        ui.write_err(_("does not handle splitted parent yet\n"))
+        raise util.Abort(_("does not handle split parents yet\n"))
         return 2
     target = targets[0]
     displayer = cmdutil.show_changeset(ui, repo, {'template': shorttemplate})