Mercurial > evolve
changeset 756:64c6bdfd0518
evolve: use super for calling parent class method
Otherwise we can bipass filtering (and break a lot of things)
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Thu, 26 Dec 2013 14:42:22 -0800 |
parents | 0021301f7fde |
children | 0ff862dcddbd |
files | hgext/evolve.py tests/test-obsolete.t |
diffstat | 2 files changed, 3 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/evolve.py Mon Dec 02 23:31:45 2013 +0530 +++ b/hgext/evolve.py Thu Dec 26 14:42:22 2013 -0800 @@ -604,13 +604,11 @@ if not repo.local(): return - opush = repo.push - class evolvingrepo(repo.__class__): def push(self, remote, *args, **opts): """wrapper around pull that pull obsolete relation""" try: - result = opush(remote, *args, **opts) + result = super(evolvingrepo, self).push(remote, *args, **opts) except util.Abort, ex: hint = _("use 'hg evolve' to get a stable history " "or --force to ignore warnings")
--- a/tests/test-obsolete.t Mon Dec 02 23:31:45 2013 +0530 +++ b/tests/test-obsolete.t Thu Dec 26 14:42:22 2013 -0800 @@ -517,6 +517,7 @@ Does not complain about new head if you obsolete the old one +(re necesarry when we start runnind discovery on unfiltered repo in core) $ hg push ../other-new --traceback pushing to ../other-new @@ -524,7 +525,7 @@ adding changesets adding manifests adding file changes - added 2 changesets with 1 changes to 1 files + added 2 changesets with 1 changes to [12] files (re) $ hg up -q 10 $ mkcommit "obsol_d'''" created new head