# HG changeset patch # User Pierre-Yves David # Date 1459332763 25200 # Node ID 7e31d3e798068b3483225152eed738d7267b9ed1 # Parent 60b7de2b3dd1e1b310d3f510b27f73c1a9074709 destination: make sure 'setupdest' is the latest function in the module Let's introduce some consistency, end of module seems fine. diff -r 60b7de2b3dd1 -r 7e31d3e79806 hgext3rd/topic/destination.py --- a/hgext3rd/topic/destination.py Wed Mar 30 03:45:29 2016 -0700 +++ b/hgext3rd/topic/destination.py Wed Mar 30 03:12:43 2016 -0700 @@ -68,21 +68,6 @@ return revs.min() return None -def setupdest(): - if util.safehasattr(destutil, '_destmergebranch'): - extensions.wrapfunction(destutil, '_destmergebranch', _destmergebranch) - rebase = extensions.find('rebase') - if (util.safehasattr(rebase, '_destrebase') - # logic not shared with merge yet < hg-3.8 - and not util.safehasattr(rebase, '_definesets')): - extensions.wrapfunction(rebase, '_destrebase', _destmergebranch) - if util.safehasattr(destutil, 'destupdatesteps'): - bridx = destutil.destupdatesteps.index('branch') - destutil.destupdatesteps.insert(bridx, 'topic') - destutil.destupdatestepmap['topic'] = _destupdatetopic - if util.safehasattr(destutil, 'desthistedit'): - extensions.wrapfunction(destutil, 'desthistedit', desthistedit) - def ngtip(repo, branch, all=False): """tip new generation""" ## search for untopiced heads of branch @@ -100,3 +85,18 @@ if not all: subquery = 'max(%s)' % subquery return repo.revs(subquery, branch, branch, branch) + +def setupdest(): + if util.safehasattr(destutil, '_destmergebranch'): + extensions.wrapfunction(destutil, '_destmergebranch', _destmergebranch) + rebase = extensions.find('rebase') + if (util.safehasattr(rebase, '_destrebase') + # logic not shared with merge yet < hg-3.8 + and not util.safehasattr(rebase, '_definesets')): + extensions.wrapfunction(rebase, '_destrebase', _destmergebranch) + if util.safehasattr(destutil, 'destupdatesteps'): + bridx = destutil.destupdatesteps.index('branch') + destutil.destupdatesteps.insert(bridx, 'topic') + destutil.destupdatestepmap['topic'] = _destupdatetopic + if util.safehasattr(destutil, 'desthistedit'): + extensions.wrapfunction(destutil, 'desthistedit', desthistedit)