Mercurial > public > mercurial-scm > hg
comparison mercurial/cmdutil.py @ 5716:be367cbafe70
cmdutil: make bail_if_changed bail on uncommitted merge
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 27 Dec 2007 23:55:39 -0600 |
parents | 2493a478f395 |
children | 0145f9afb0e7 |
comparison
equal
deleted
inserted
replaced
5715:d280774a7498 | 5716:be367cbafe70 |
---|---|
62 return choice.values()[0] | 62 return choice.values()[0] |
63 | 63 |
64 raise UnknownCommand(cmd) | 64 raise UnknownCommand(cmd) |
65 | 65 |
66 def bail_if_changed(repo): | 66 def bail_if_changed(repo): |
67 if repo.dirstate.parents()[1] != nullid: | |
68 raise util.Abort(_('outstanding uncommitted merge')) | |
67 modified, added, removed, deleted = repo.status()[:4] | 69 modified, added, removed, deleted = repo.status()[:4] |
68 if modified or added or removed or deleted: | 70 if modified or added or removed or deleted: |
69 raise util.Abort(_("outstanding uncommitted changes")) | 71 raise util.Abort(_("outstanding uncommitted changes")) |
70 | 72 |
71 def logmessage(opts): | 73 def logmessage(opts): |