# HG changeset patch # User Matt Mackall # Date 2012-02-01 05:13:04 # Node ID 74d00b5d00ccc2efb26e45e2054460d0c13e1175 # Parent 4b7aa1c899dcaaef108aa5ee0b47a87769dbf07f qpush: avoid trying to manage existing history (issue2218) diff --git a/hgext/mq.py b/hgext/mq.py --- a/hgext/mq.py +++ b/hgext/mq.py @@ -745,8 +745,11 @@ class queue(object): repo.dirstate.setparents(p1, merge) match = scmutil.matchfiles(repo, files or []) + oldtip = repo['tip'] n = secretcommit(repo, message, ph.user, ph.date, match=match, force=True) + if repo['tip'] == oldtip: + raise util.Abort(_("qpush exactly duplicates child changeset")) if n is None: raise util.Abort(_("repository commit failed"))