$ hg clone "any repo" test $ cd test $ hg up -r -4 $ hg export -r -3 > foo $ hg qimport foo $ hg qpush $ hg qpop abort: popping would remove a revision not managed by this patch queue My guess is qpush should bail and not update the status file if it doesn't create a new changeset. The normal import command should also note this condition and report it.
Perhaps it's easier to check if qpush creates a head changeset?
Fixed by http://selenic.com/repo/hg/rev/74d00b5d00cc Matt Mackall <mpm@selenic.com> qpush: avoid trying to manage existing history (issue2218) (please test the fix)
--- Bug imported by bugzilla@serpentine.com 2012-05-12 09:09 EDT --- This bug was previously known as _bug_ 2218 at http://mercurial.selenic.com/bts/issue2218