Mercurial > evolve
changeset 395:822e5305e377 stable
merge
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Thu, 26 Jul 2012 15:23:05 +0200 |
parents | 188afb394e10 (diff) f2168d0b5700 (current diff) |
children | 9dda5c1f6a45 |
files | |
diffstat | 4 files changed, 23 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/docs/from-mq.rst Wed Jul 18 12:40:41 2012 +0200 +++ b/docs/from-mq.rst Thu Jul 26 15:23:05 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 Wed Jul 18 12:40:41 2012 +0200 +++ b/docs/tutorials/tutorial.t Thu Jul 26 15:23:05 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 Wed Jul 18 12:40:41 2012 +0200 +++ b/hgext/obsolete.py Thu Jul 26 15:23:05 2012 +0200 @@ -491,19 +491,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: @@ -1201,7 +1200,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 if 'obsolete' in remote.listkeys('namespaces') and self.obsstore: data = self.obsstore._writemarkers() r = remote.pushkey('obsolete', 'dump', '',
--- a/tests/test-obsolete.t Wed Jul 18 12:40:41 2012 +0200 +++ b/tests/test-obsolete.t Thu Jul 26 15:23:05 2012 +0200 @@ -147,7 +147,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 @@ -200,7 +200,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 @@ -269,7 +269,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 @@ -517,7 +517,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]