# HG changeset patch # User Pierre-Yves David # Date 1343231597 -7200 # Node ID 1d6cc8c22cd9289ef30c547ee4c58189a128b6cc # Parent de3d112db51b4341a421b2091645b798d9fea04e# Parent 188afb394e1013163ffe1be169f61f8ec95b3517 merge with stable fix and preparation diff -r de3d112db51b -r 1d6cc8c22cd9 docs/from-mq.rst --- a/docs/from-mq.rst Tue Jul 17 19:49:08 2012 +0200 +++ b/docs/from-mq.rst Wed Jul 25 17:53:17 2012 +0200 @@ -13,7 +13,7 @@ qrefresh ``amend`` qpop ``update`` or ``qdown`` qpush ``update`` or ``gup`` sometimes ``stabilize`` -qrm ``prune`̀` +qrm ``prune`` qfold ``amend -c`` (for now, ``collapse`` soon) qdiff ``odiff`` diff -r de3d112db51b -r 1d6cc8c22cd9 docs/tutorials/tutorial.t --- a/docs/tutorials/tutorial.t Tue Jul 17 19:49:08 2012 +0200 +++ b/docs/tutorials/tutorial.t Wed Jul 25 17:53:17 2012 +0200 @@ -609,7 +609,7 @@ $ hg push other pushing to $TESTTMP/other searching for changes - abort: Trying to push unstable changeset: 9ac5d0e790a2! + abort: push includes an unstable changeset: 9ac5d0e790a2! (use 'hg stabilize' to get a stable history (or --force to proceed)) [255] diff -r de3d112db51b -r 1d6cc8c22cd9 hgext/obsolete.py --- a/hgext/obsolete.py Tue Jul 17 19:49:08 2012 +0200 +++ b/hgext/obsolete.py Wed Jul 25 17:53:17 2012 +0200 @@ -455,19 +455,18 @@ # checking heads only is enought because any thing base on obsolete # changeset is either obsolete or unstable. ctx = repo[h] - hint = _("use 'hg stabilize' to get a stable history (or --force to proceed)") if ctx.unstable(): - raise util.Abort(_("Trying to push unstable changeset: %s!") % ctx, - hint=hint) + raise util.Abort(_("push includes an unstable changeset: %s!") + % ctx) if ctx.obsolete(): - raise util.Abort(_("Trying to push obsolete changeset: %s!") % ctx, - hint=hint) + raise util.Abort(_("push includes an obsolete changeset: %s!") + % ctx) if ctx.latecomer(): - raise util.Abort(_("Trying to push latecomer changeset: %s!") % ctx, - hint=hint) + raise util.Abort(_("push includes an latecomer changeset: %s!") + % ctx) if ctx.conflicting(): - raise util.Abort(_("Trying to push conflicting changeset: %s!") % ctx, - hint=hint) + raise util.Abort(_("push includes conflicting changeset: %s!") + % ctx) ### patch remote branch map # do not read it this burn eyes try: @@ -960,7 +959,15 @@ def push(self, remote, *args, **opts): """wrapper around pull that pull obsolete relation""" self._turn_extinct_secret() - result = opush(remote, *args, **opts) + try: + result = opush(remote, *args, **opts) + except util.Abort, ex: + hint = _("use 'hg stabilize' to get a stable history (or --force to proceed)") + if (len(ex.args) >= 1 + and ex.args[0].startswith('push includes ') + and ex.hint is None): + ex.hint = hint + raise self._turn_extinct_secret() return result diff -r de3d112db51b -r 1d6cc8c22cd9 tests/test-obsolete.t --- a/tests/test-obsolete.t Tue Jul 17 19:49:08 2012 +0200 +++ b/tests/test-obsolete.t Wed Jul 25 17:53:17 2012 +0200 @@ -157,7 +157,7 @@ $ hg push ../other-new pushing to ../other-new searching for changes - abort: Trying to push unstable changeset: a7a6f2b5d8a5! + abort: push includes an unstable changeset: a7a6f2b5d8a5! (use 'hg stabilize' to get a stable history (or --force to proceed)) [255] $ hg push -f ../other-new @@ -210,7 +210,7 @@ $ hg push ../other-new pushing to ../other-new searching for changes - abort: Trying to push unstable changeset: 95de7fc6918d! + abort: push includes an unstable changeset: 95de7fc6918d! (use 'hg stabilize' to get a stable history (or --force to proceed)) [255] $ hg push ../other-new -f # use f because there is unstability @@ -279,7 +279,7 @@ $ hg push ../other-old pushing to ../other-old searching for changes - abort: Trying to push unstable changeset: 909a0fb57e5d! + abort: push includes an unstable changeset: 909a0fb57e5d! (use 'hg stabilize' to get a stable history (or --force to proceed)) [255] $ hg push -f ../other-old @@ -529,7 +529,7 @@ $ hg push ../other-new/ pushing to ../other-new/ searching for changes - abort: Trying to push latecomer changeset: 6db5e282cb91! + abort: push includes an latecomer changeset: 6db5e282cb91! (use 'hg stabilize' to get a stable history (or --force to proceed)) [255]