hgext/obsolete.py
changeset 439 6cff54825233
parent 438 b1b7b5ef506a
child 440 5fa287e5087e
equal deleted inserted replaced
438:b1b7b5ef506a 439:6cff54825233
    37 
    37 
    38 Note that rebased changesets are now marked obsolete instead of being stripped.
    38 Note that rebased changesets are now marked obsolete instead of being stripped.
    39 
    39 
    40 """
    40 """
    41 
    41 
    42 import sys
    42 
    43 
       
    44 from mercurial.i18n import _
       
    45 
       
    46 import json
       
    47 
    43 
    48 from mercurial import util
    44 from mercurial import util
    49 
    45 
    50 try:
    46 try:
    51     from mercurial import obsolete
    47     from mercurial import obsolete
    52     obsolete._enabled = True
    48     obsolete._enabled = True
    53 except ImportError:
    49 except ImportError:
    54         raise util.Abort('Obsolete extension requires Mercurial 2.3 (or later)')
    50         raise util.Abort('Obsolete extension requires Mercurial 2.3 (or later)')
    55 
    51 
       
    52 import sys
       
    53 from mercurial.i18n import _
       
    54 from mercurial import cmdutil
       
    55 from mercurial import commands
    56 from mercurial import context
    56 from mercurial import context
       
    57 from mercurial import discovery
       
    58 from mercurial import error
       
    59 from mercurial import extensions
       
    60 from mercurial import phases
    57 from mercurial import revset
    61 from mercurial import revset
    58 from mercurial import scmutil
    62 from mercurial import scmutil
    59 from mercurial import extensions
    63 from mercurial import templatekw
    60 from mercurial import discovery
       
    61 from mercurial import error
       
    62 from mercurial import commands
       
    63 from mercurial import phases
       
    64 from mercurial.node import bin, short, nullid
    64 from mercurial.node import bin, short, nullid
    65 from mercurial import cmdutil
       
    66 from mercurial import templatekw
       
    67 
    65 
    68 # This extension hold the following code
    66 # This extension hold the following code
    69 #
    67 #
    70 # - Extension Helper code
    68 # - Extension Helper code
    71 # - ...
    69 # - ...
   942 ### Older format management                                       ###
   940 ### Older format management                                       ###
   943 #####################################################################
   941 #####################################################################
   944 
   942 
   945 # Code related to detection and management of older legacy format never
   943 # Code related to detection and management of older legacy format never
   946 # handled by core
   944 # handled by core
       
   945 
       
   946 import json
   947 
   947 
   948 @eh.reposetup
   948 @eh.reposetup
   949 def _checkoldobsolete(ui, repo):
   949 def _checkoldobsolete(ui, repo):
   950     """Detect that a repo still carry some old obsolete format
   950     """Detect that a repo still carry some old obsolete format
   951     """
   951     """