comparison mercurial/obsutil.py @ 36953:b9bbcf9ffac1

obsolete: move marker flags to obsutil Evolve extension expects to have obsolete.bumpedfix (imported in hgext3rd/evolve/evolvecmd.py), so we provide it.
author Anton Shestakov <av6@dwimlabs.net>
date Tue, 13 Mar 2018 20:34:38 +0800
parents c6061cadb400
children efc4fb344c05
comparison
equal deleted inserted replaced
36952:b24cde12061b 36953:b9bbcf9ffac1
14 node as nodemod, 14 node as nodemod,
15 phases, 15 phases,
16 util, 16 util,
17 ) 17 )
18 from .utils import dateutil 18 from .utils import dateutil
19
20 ### obsolescence marker flag
21
22 ## bumpedfix flag
23 #
24 # When a changeset A' succeed to a changeset A which became public, we call A'
25 # "bumped" because it's a successors of a public changesets
26 #
27 # o A' (bumped)
28 # |`:
29 # | o A
30 # |/
31 # o Z
32 #
33 # The way to solve this situation is to create a new changeset Ad as children
34 # of A. This changeset have the same content than A'. So the diff from A to A'
35 # is the same than the diff from A to Ad. Ad is marked as a successors of A'
36 #
37 # o Ad
38 # |`:
39 # | x A'
40 # |'|
41 # o | A
42 # |/
43 # o Z
44 #
45 # But by transitivity Ad is also a successors of A. To avoid having Ad marked
46 # as bumped too, we add the `bumpedfix` flag to the marker. <A', (Ad,)>.
47 # This flag mean that the successors express the changes between the public and
48 # bumped version and fix the situation, breaking the transitivity of
49 # "bumped" here.
50 bumpedfix = 1
51 usingsha256 = 2
19 52
20 class marker(object): 53 class marker(object):
21 """Wrap obsolete marker raw data""" 54 """Wrap obsolete marker raw data"""
22 55
23 def __init__(self, repo, data): 56 def __init__(self, repo, data):