hgext3rd/topic/destination.py
branchmercurial-3.8
changeset 3005 f66227d76402
parent 2891 b18d2b2f18a6
child 3142 28e501581dc7
equal deleted inserted replaced
2812:6c4a05dc5b5c 3005:f66227d76402
   104         extensions.wrapfunction(destutil, '_destmergebranch', _destmergebranch)
   104         extensions.wrapfunction(destutil, '_destmergebranch', _destmergebranch)
   105     try:
   105     try:
   106         rebase = extensions.find('rebase')
   106         rebase = extensions.find('rebase')
   107     except KeyError:
   107     except KeyError:
   108         rebase = None
   108         rebase = None
       
   109 
       
   110     # Mercurial 4.4 rename _definesets into _definedestmap
       
   111     rebasebefore38 = not util.safehasattr(rebase, '_definesets')
       
   112     rebasebefore44 = not util.safehasattr(rebase, '_definedestmap')
       
   113 
   109     if (util.safehasattr(rebase, '_destrebase')
   114     if (util.safehasattr(rebase, '_destrebase')
   110             # logic not shared with merge yet < hg-3.8
   115             # logic not shared with merge yet < hg-3.8
   111             and not util.safehasattr(rebase, '_definesets')):
   116             and rebasebefore38 and rebasebefore44):
   112         extensions.wrapfunction(rebase, '_destrebase', _destmergebranch)
   117         extensions.wrapfunction(rebase, '_destrebase', _destmergebranch)
   113     if util.safehasattr(destutil, 'destupdatesteps'):
   118     if util.safehasattr(destutil, 'destupdatesteps'):
   114         bridx = destutil.destupdatesteps.index('branch')
   119         bridx = destutil.destupdatesteps.index('branch')
   115         destutil.destupdatesteps.insert(bridx, 'topic')
   120         destutil.destupdatesteps.insert(bridx, 'topic')
   116         destutil.destupdatestepmap['topic'] = _destupdatetopic
   121         destutil.destupdatestepmap['topic'] = _destupdatetopic