Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/cmdutil.py @ 14289:d68ddccf276b
cmdutil: bail_if_changed to bailifchanged
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 10 May 2011 16:08:46 -0500 |
parents | 66257848c154 |
children | 86e70956da4f |
comparison
equal
deleted
inserted
replaced
14288:00a0ab08f986 | 14289:d68ddccf276b |
---|---|
76 if p == oldp: | 76 if p == oldp: |
77 return None | 77 return None |
78 | 78 |
79 return p | 79 return p |
80 | 80 |
81 def bail_if_changed(repo): | 81 def bailifchanged(repo): |
82 if repo.dirstate.p2() != nullid: | 82 if repo.dirstate.p2() != nullid: |
83 raise util.Abort(_('outstanding uncommitted merge')) | 83 raise util.Abort(_('outstanding uncommitted merge')) |
84 modified, added, removed, deleted = repo.status()[:4] | 84 modified, added, removed, deleted = repo.status()[:4] |
85 if modified or added or removed or deleted: | 85 if modified or added or removed or deleted: |
86 raise util.Abort(_("outstanding uncommitted changes")) | 86 raise util.Abort(_("outstanding uncommitted changes")) |