Mercurial > hg > mutable-history
changeset 381:3a161a89d65d
obsolete: rely on core to filter extinct changeset out
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Wed, 25 Jul 2012 19:08:45 +0200 |
parents | b36b07ae21bc |
children | 58fdb2180064 |
files | hgext/obsolete.py tests/test-obsolete-push.t tests/test-obsolete.t |
diffstat | 3 files changed, 2 insertions(+), 23 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/obsolete.py +++ b/hgext/obsolete.py @@ -436,26 +436,6 @@ ### Discovery wrapping ############################# -class blist(list, object): - """silly class to have non False but empty list""" - - def __nonzero__(self): - return bool(len(self.orig)) - -def wrapfindcommonoutgoing(orig, repo, *args, **kwargs): - """wrap mercurial.discovery.findcommonoutgoing to remove extinct changeset - - Such excluded changeset are removed from excluded and will *not* appear - are excluded secret changeset. - """ - outgoing = orig(repo, *args, **kwargs) - orig = outgoing.excluded - outgoing.excluded = blist(n for n in orig if not repo[n].extinct()) - # when no revision is specified (push everything) a shortcut is taken when - # nothign was exclude. taking this code path when extinct changeset have - # been excluded leads to repository corruption. - outgoing.excluded.orig = orig - return outgoing def wrapcheckheads(orig, repo, remote, outgoing, *args, **kwargs): """wrap mercurial.discovery.checkheads @@ -728,7 +708,6 @@ extensions.wrapcommand(commands.table, "debugobsolete", wrapmaycreateobsmarker) if util.safehasattr(cmdutil, 'amend'): extensions.wrapfunction(cmdutil, 'amend', wrapcmdutilamend) - extensions.wrapfunction(discovery, 'findcommonoutgoing', wrapfindcommonoutgoing) extensions.wrapfunction(discovery, 'checkheads', wrapcheckheads) extensions.wrapfunction(discovery, 'visibleheads', noextinctsvisibleheads) extensions.wrapfunction(phases, 'advanceboundary', wrapclearcache)