diff --git a/hgext/mq.py b/hgext/mq.py --- a/hgext/mq.py +++ b/hgext/mq.py @@ -3521,7 +3521,7 @@ if self.mq.applied and self.mq.checkapplied and not force: parents = self.dirstate.parents() patches = [s.node for s in self.mq.applied] - if parents[0] in patches or parents[1] in patches: + if any(p in patches for p in parents): raise error.Abort(errmsg) def commit(self, text="", user=None, date=None, match=None,