# HG changeset patch # User Laurent Charignon # Date 1434492524 25200 # Node ID 08ae023882f17f2c5b2e529983dc6a7a3fe293d2 # Parent 7ddcbf5469bc631bc2fabcd0fcd540b988a14ada evolve: check for uncommited change earlier Before this patch we were checking for uncommited change multiple times and quite late for uncommited change. This patch moves the check at the beginning of the evolve method to avoid these shortcomings. diff -r 7ddcbf5469bc -r 08ae023882f1 hgext/evolve.py --- a/hgext/evolve.py Fri Jun 19 11:04:18 2015 -0700 +++ b/hgext/evolve.py Tue Jun 16 15:08:44 2015 -0700 @@ -1393,6 +1393,8 @@ raise util.Abort('cannot specify both "--all" and "--continue"') graftcmd = commands.table['graft'][0] return graftcmd(ui, repo, old_obsolete=True, **{'continue': True}) + cmdutil.bailifchanged(repo) + # Rev specified on the commands line if revopt: revs = repo.revs(revopt) @@ -1436,7 +1438,6 @@ def _evolveany(ui, repo, tro, dryrunopt, confirmopt, progresscb): repo = repo.unfiltered() tro = repo[tro.rev()] - cmdutil.bailifchanged(repo) troubles = tro.troubles() if 'unstable' in troubles: return _solveunstable(ui, repo, tro, dryrunopt, confirmopt, progresscb)