Mercurial > evolve
changeset 377:1d6cc8c22cd9
merge with stable fix and preparation
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Wed, 25 Jul 2012 17:53:17 +0200 |
parents | de3d112db51b (current diff) 188afb394e10 (diff) |
children | 0313cb49fa1a |
files | docs/from-mq.rst docs/tutorials/tutorial.t hgext/obsolete.py tests/test-obsolete.t |
diffstat | 4 files changed, 23 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- 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``
--- 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]
--- 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
--- 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]