mercurial/obsolete.py
changeset 36953 b9bbcf9ffac1
parent 36607 c6061cadb400
child 37017 98c14e857e71
equal deleted inserted replaced
36952:b24cde12061b 36953:b9bbcf9ffac1
   146         raise error.Abort(_("'createmarkers' obsolete option must be enabled "
   146         raise error.Abort(_("'createmarkers' obsolete option must be enabled "
   147                             "if other obsolete options are enabled"))
   147                             "if other obsolete options are enabled"))
   148 
   148 
   149     return _getoptionvalue(repo, option)
   149     return _getoptionvalue(repo, option)
   150 
   150 
   151 ### obsolescence marker flag
   151 bumpedfix = obsutil.bumpedfix
   152 
   152 usingsha256 = obsutil.usingsha256
   153 ## bumpedfix flag
       
   154 #
       
   155 # When a changeset A' succeed to a changeset A which became public, we call A'
       
   156 # "bumped" because it's a successors of a public changesets
       
   157 #
       
   158 # o    A' (bumped)
       
   159 # |`:
       
   160 # | o  A
       
   161 # |/
       
   162 # o    Z
       
   163 #
       
   164 # The way to solve this situation is to create a new changeset Ad as children
       
   165 # of A. This changeset have the same content than A'. So the diff from A to A'
       
   166 # is the same than the diff from A to Ad. Ad is marked as a successors of A'
       
   167 #
       
   168 # o   Ad
       
   169 # |`:
       
   170 # | x A'
       
   171 # |'|
       
   172 # o | A
       
   173 # |/
       
   174 # o Z
       
   175 #
       
   176 # But by transitivity Ad is also a successors of A. To avoid having Ad marked
       
   177 # as bumped too, we add the `bumpedfix` flag to the marker. <A', (Ad,)>.
       
   178 # This flag mean that the successors express the changes between the public and
       
   179 # bumped version and fix the situation, breaking the transitivity of
       
   180 # "bumped" here.
       
   181 bumpedfix = 1
       
   182 usingsha256 = 2
       
   183 
   153 
   184 ## Parsing and writing of version "0"
   154 ## Parsing and writing of version "0"
   185 #
   155 #
   186 # The header is followed by the markers. Each marker is made of:
   156 # The header is followed by the markers. Each marker is made of:
   187 #
   157 #