Mercurial > hg
diff hgext/mq.py @ 14596:6a0070d00bc8
mq: rename abort_if_wdir_patched to abortifwdirpatched
author | Adrian Buehlmann <adrian@cadifra.com> |
---|---|
date | Mon, 13 Jun 2011 13:53:58 +0200 |
parents | f2c9d4091e0e |
children | 17c16bcf6926 |
line wrap: on
line diff
--- a/hgext/mq.py Mon Jun 13 13:48:47 2011 +0200 +++ b/hgext/mq.py Mon Jun 13 13:53:58 2011 +0200 @@ -3095,7 +3095,7 @@ def mq(self): return queue(self.ui, self.join("")) - def abort_if_wdir_patched(self, errmsg, force=False): + def abortifwdirpatched(self, errmsg, force=False): if self.mq.applied and not force: parents = self.dirstate.parents() patches = [s.node for s in self.mq.applied] @@ -3104,7 +3104,7 @@ def commit(self, text="", user=None, date=None, match=None, force=False, editor=False, extra={}): - self.abort_if_wdir_patched( + self.abortifwdirpatched( _('cannot commit over an applied mq patch'), force) @@ -3189,9 +3189,9 @@ repo.__class__ = mqrepo def mqimport(orig, ui, repo, *args, **kwargs): - if (hasattr(repo, 'abort_if_wdir_patched') + if (hasattr(repo, 'abortifwdirpatched') and not kwargs.get('no_commit', False)): - repo.abort_if_wdir_patched(_('cannot import over an applied patch'), + repo.abortifwdirpatched(_('cannot import over an applied patch'), kwargs.get('force')) return orig(ui, repo, *args, **kwargs)